{"id":91701,"date":"2020-08-17T07:42:05","date_gmt":"2020-08-17T05:42:05","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy"},"modified":"2020-08-17T07:42:05","modified_gmt":"2020-08-17T05:42:05","slug":"kak-sluchajno-napisat-web-gui-dlya-haproxy","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy","title":{"rendered":"How to Accidentally Write a Web GUI for Haproxy","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>The modern world of system administrators has spoiled us with beautiful web interfaces, making it hard to use software that lacks this very \"GUI\" (I can feel the stones flying from the devoted coders). After all, who wants to dive into the command line all the time? Everything would be fine if you could just install, configure, and forget the software, but what do you do when you have to constantly make adjustments, and of course, there's no log of all actions? You can't write cp cfg cfg_back every time\u2014eventually, you'll get confused and abandon the task.<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habrastorage.org\/webt\/lm\/yl\/3g\/lmyl3gjbzhzlqdig_cmrzg3yl3w.jpeg\"><img decoding=\"async\" alt=\"How to Accidentally Write a Web GUI for Haproxy\" src=\"\/wp-content\/uploads\/2020\/08\/874da79a28fbc29d1fd6511463ba14a5.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nMany years ago, I was introduced to a wonderful load balancer called Haproxy. Everything was marvelous and beautiful. I ended up with quite a few of them and started looking for a GUI, but surprisingly, none existed. It's very popular software and rather old as well. I thought to myself, \u2018Oh well,\u2019 and continued to make occasional edits manually in my favorite vi, alongside a whole bunch of open tabs displaying the statistics of all active instances. <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/server\/\"   title=\"servers\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"1510\">servers<\/a>But the time came when I had to accommodate the \"requests\" of those who wrote software for http interactions, and that's when the real fun began\u2026 <\/p>\n<p>My hands were itching, my eyes sparkled, and I got started. More precisely, I began to think about what to use for development. I recalled long-forgotten PHP, which I didn't want to use, feeling that it wasn't quite right for this task. Ultimately, I chose Python, thinking it would definitely come in handy in the future, and the absorption of information began.<\/p>\n<p>At first, the tasks weren't too complicated: the ability to edit configs from a web interface from a single entry point, and to save previous versions of configs. This not overly complex functionality was implemented fairly quickly, but then the admin's laziness or the notorious perfectionism kicked in, and I found it to be insufficient. That's when features like config comparison, logging of all actions related to configs, a Runtime API, and section additions through the web began to emerge.<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habrastorage.org\/webt\/tx\/rk\/hg\/txrkhgoa8-zmpuvx1gswjkj2vou.jpeg\"><img decoding=\"async\" alt=\"How to Accidentally Write a Web GUI for Haproxy\" src=\"\/wp-content\/uploads\/2020\/08\/abb93ee655e49bddd7367821eec781d0.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><\/p>\n<p>As a decent UNIX administrator living off free software, I decided to share it with the world, thinking it might come in handy for someone. However, everything had to be done in a way that avoided delving into the code, sticking to the config settings at most (Currently, most settings have moved to a database. In my opinion, it's more convenient to edit them this way, and there won't be any errors due to missing parameters in the config during updates). <\/p>\n<p>A month later, I posted my project on GitHub without expecting much. It turned out to be somewhat in demand, and that\u2019s when the real fun began\u2026 The active enhancement has been going on for almost a year. Sometimes I feel like giving it all up, as my needs have long been met. But why would I need the ability to deploy a cluster with keepalived and HAProxy through a web interface when it takes me a couple of minutes at most? But people actually need it, and I find it interesting, plus there\u2019s always something to work on. Of course, there are functions I need, such as monitoring backend servers to see if they are available for HAProxy. We have corporate monitoring, but there are people who can take quite some time to respond, and since my department focuses on development, the software is constantly coming and going, making it difficult to navigate through the bureaucracy.<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habrastorage.org\/webt\/_b\/th\/pl\/_bthplwgh1ggsiutfblcd6exbg4.jpeg\"><img decoding=\"async\" alt=\"How to Accidentally Write a Web GUI for Haproxy\" src=\"\/wp-content\/uploads\/2020\/08\/72427d65430c891959b68c54efd8ab4a.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><\/p>\n<p>In short, I decided to share, as it turns out this is the only free GUI available. Maybe it will be useful to someone? <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Aidaho12\/haproxy-wi\">Link to GitHub<\/a><\/noindex>.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/419865\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0431\u043b\u0435\u043d\u0438\u043b \u043d\u0430\u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 web-face-\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0445\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0444\u0442, \u0433\u0434\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u00ab\u0433\u0443\u044f\u00bb (\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u0435\u0442\u044f\u0442 \u043a\u0430\u043c\u043d\u0438 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0432\u0435\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0435\u0440\u043e\u0432), \u043d\u0443 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u043a\u0443 \u0436\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0442\u0443\u0434\u0430 \u043b\u0430\u0437\u0438\u0442\u044c, \u043f\u0440\u0430\u0432\u0434\u0430? \u0412\u0441\u0435 \u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0441\u043e\u0444\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0438 \u0437\u0430\u0431\u044b\u043b, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u0443\u0434\u0430 \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043b\u0430\u0437\u0438\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043d\u0443 \u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":91702,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-91701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0431\u043b\u0435\u043d\u0438\u043b \u043d\u0430\u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 web-face-\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0445\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0444\u0442, \u0433\u0434\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u00ab\u0433\u0443\u044f\u00bb (\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u0435\u0442\u044f\u0442 \u043a\u0430\u043c\u043d\u0438 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0432\u0435\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0435\u0440\u043e\u0432), \u043d\u0443 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u043a\u0443 \u0436\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Web-GUI \u0434\u043b\u044f Haproxy | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0431\u043b\u0435\u043d\u0438\u043b \u043d\u0430\u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 web-face-\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0445\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0444\u0442, \u0433\u0434\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u00ab\u0433\u0443\u044f\u00bb (\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u0435\u0442\u044f\u0442 \u043a\u0430\u043c\u043d\u0438 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0432\u0435\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0435\u0440\u043e\u0432), \u043d\u0443 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u043a\u0443 \u0436\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-08-17T05:42:05+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-08-17T05:42:05+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47How to Accidentally Write a Web GUI for HAProxy | ProHoster","description":"The modern world of system administrators has spoiled us with beautiful web interfaces, making it hard even to install software that doesn't have this \u2018GUI\u2019 (I can feel the backlash from hardcore text-based users coming), as if it\u2019s not worth using if it\u2019s command-line only.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Web-GUI \u0434\u043b\u044f Haproxy | ProHoster","og:description":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0431\u043b\u0435\u043d\u0438\u043b \u043d\u0430\u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 web-face-\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0445\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0444\u0442, \u0433\u0434\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u00ab\u0433\u0443\u044f\u00bb (\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u0435\u0442\u044f\u0442 \u043a\u0430\u043c\u043d\u0438 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0432\u0435\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0435\u0440\u043e\u0432), \u043d\u0443 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u043a\u0443 \u0436\u0435.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-sluchajno-napisat-web-gui-dlya-haproxy","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-08-17T05:42:05+00:00","article:modified_time":"2020-08-17T05:42:05+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"91701","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 12:22:24","updated":"2026-02-09 16:50:33","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/91701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=91701"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/91701\/revisions"}],"predecessor-version":[{"id":158754,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/91701\/revisions\/158754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/91702"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=91701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=91701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=91701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}