Hogyan lehet véletlenül megírni a Web-GUI-t a Haproxy-hoz

A modern world of system administrators has spoiled us with beautiful web interfaces, making it less appealing to install software without a proper GUI (I can already feel the stones flying from the purists). After all, who wants to keep accessing it through the command line all the time, right? Everything would be fine if you could just install the software, configure it, and forget about it, but what if you need to constantly dive in, make adjustments, and, of course, there’s no log of all actions? You can't be writing cp cfg cfg_back every time, or you'll get confused over time and just give up on it.

Hogyan lehet véletlenül megírni a Web-GUI-t a Haproxy-hoz

Many years ago, I became acquainted with a wonderful load balancer called Haproxy. Everything was wonderful and beautiful. I ended up having many of them and began to look for a GUI, but surprisingly, there wasn’t one. It's a very popular piece of software and quite old too, but I thought, why not continue to edit it occasionally by hand in my favorite vi while having a ton of open tabs with statistics of all the active instances. szerverek. But the time came when I had to satisfy the 'wants' of people who wrote software to work via http, and that’s where the interesting part began…

My hands itched, my eyes lit up, and I got started. Or rather, I began to ponder what to write it in, recalling the long-forgotten PHP; I wasn’t quite keen on it, and it seemed not entirely suitable for this task. In the end, I settled on Python, thinking it would definitely be useful in the future, and started soaking up information.

Initially, the tasks weren’t all that complicated: the ability to edit configs from a web interface from a single entry point, saving previous versions of configs. This not-so-large functionality was implemented quite quickly, but then the admin laziness or the infamous perfectionism kicked in, and I found that it just wasn't enough. And that’s when features like: comparing two configs, logging all actions related to configs, Runtime API, and adding sections through the web started to appear.

Hogyan lehet véletlenül megírni a Web-GUI-t a Haproxy-hoz

And as a proper UNIX administrator living off free software, I decided to share it with the world, perhaps someone else would find it useful? But for that, everything had to be done in such a way that you wouldn’t need to dive into the code, but rather just into the config files (Currently, most settings have migrated to the database. To me, it's become easier to edit them, and there won't be errors during updates due to the absence of some parameter in the config).

Egy hónap elteltével feltöltöttem a művem a Githubra, nem számítva sok jóra. De tévedtem, a szoftver meglehetősen keresett lett, és elkezdődött a legérdekesebb rész… Az aktív „fejlesztés” már majdnem egy éve tart. Néha van kedvem mindezt abbahagyni, mivel a szükségleteim régóta kielégítettek. De minek nekem az, hogy lehetőségem legyen „klasztert” telepíteni a keepalived és a HAProxy segítségével egy webes felületen, ha ez nekem legfeljebb pár percet vesz igénybe? Az embereknek viszont szükségük van rá, és nekem is érdekes, van min dolgozni. Persze vannak szükséges funkciók is, mint például a háttérszerverek monitorozása, hogy elérhetők-e a Haproxy számára. Van persze vállalati monitorozásunk, de ott olyan emberek vannak, akik elég sokáig reagálhatnak, plusz én azzal foglalkozom, hogy fejlesztést végzek, és a szoftver folyamatosan jön-megy, ami elég sokáig tart, hogy áttörjük a bürokráciát.

Hogyan lehet véletlenül megírni a Web-GUI-t a Haproxy-hoz

Összességében úgy döntöttem, megosztom, mert ez az egyetlen ingyenes GUI. Talán valakinek hasznos lesz? GitHub link.

Forrás: habr.com

Megbízható hosting vásárlása weboldalak számára, DDoS védelemmel, VPS VDS szerverek. 🔥 Megbízható webtárhely vásárlása DDoS védelemmel, VPS VDS szerverek | ProHoster