#1 2013-05-15 22:43:24

chanuk
Member
Registered: 2013-05-12
Posts: 7

Automate HA Proxy

Just a suggestion...

It is possible create a page for end users to add domains (A records) to the HA Proxy on port 80?
I'm guessing every new config require HA Proxy restarts, so perhaps only reload the configuration (if changed) once an hour?

Btw, IPv4 NAT is a great way to utilise VPS with only native IPv6 connectivity - great work!

Offline

#2 2013-05-16 08:52:03

johnlth93
Awesome =D
Registered: 2013-04-28
Posts: 73

Re: Automate HA Proxy

That would be a nice feature
+ 1 for this if it's possible


big_smile

Offline

#3 2013-05-16 09:16:19

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,970
Website

Re: Automate HA Proxy

I don't know of any way of doing that but as I have said in the past, this would cost money to get developed, I am happy to get quotes and put up a bounty for the feature.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#4 2013-05-16 13:16:35

chanuk
Member
Registered: 2013-05-12
Posts: 7

Re: Automate HA Proxy

Depends which part needs development...

I guess you can quite simply create a script to build a new ha proxy config file based on a file containing a list of domains.
This same script can also restart/reload ha proxy.

So you may need someone to create a page, or perhaps a web service api?

Offline

#5 2013-05-16 16:57:58

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,970
Website

Re: Automate HA Proxy

It needs to integrate in to solusvm's WHMCS module and be approved by them also.

I can do the shell script no problem, there is a hell of a lot more to do consider and secure then that though.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#6 2013-05-16 19:35:33

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,785
Website

Re: Automate HA Proxy

Not to mention that there need to be some sort of validation, to weed out unwanted characters.

And the check that the domain is pointing to the correct ip, otherwise it would be discarded.
Anyone up for the challenge?

Offline

#7 2013-05-17 18:07:18

chanuk
Member
Registered: 2013-05-12
Posts: 7

Re: Automate HA Proxy

Ok, so may I suggest a web service approach?:-

Backtogeek wrote:

It needs to integrate in to solusvm's WHMCS module and be approved by them also.

If its a web service, we can do without the WHMCS integration and approval.

mikho wrote:

validation, to weed out unwanted characters. And the check that the domain is pointing to the correct ip, otherwise it would be discarded.

This can be done as part of the web service request, to look for a single line, alphanumeric and a 'host' check can be made to see if it matches the ha proxy IP.

Backtogeek wrote:

consider and secure

So I was thinking the web service URL can only be made from the internal network...
So for example, you have to ssh into one of the VPS and make a wget/curl request?

This ensures the request is made by a real customer (unless the VPS is compromised I guess)
You can also use this to configure where the domain points to. So if the request is made from 10.10.10.123 - that's where ha proxy forwards the domain.

What's your thoughts? Is it a crazy idea or could this work?

Last edited by chanuk (2013-05-17 18:08:28)

Offline

#8 2013-05-17 18:18:22

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,970
Website

Re: Automate HA Proxy

It could work, I could not code that in a secure enough manner to release though.

How does this middle ground approach sound...

I set something up on the host nodes that periodically scans your container for a file e.g. /etc/haproxy (obviousy a guide will be available in the knowledgebase on creating the file or better still a command e.g. echo "www.mydomain.com" >/etc/haproxy then then it auto sets it up on the node for you and deletes the haproxy file after?

That way I don't need to worry about any reach in services or security?

I need to think about updating changes and more than 1 record but that is simple logic for a script.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#9 2013-05-17 18:42:39

chanuk
Member
Registered: 2013-05-12
Posts: 7

Re: Automate HA Proxy

That sounds ok, but it does sound like your script have to scan a lot of containers periodically (every VPS you have set up).

If the task is validating, verifying the host and writing a list of domains into a file for your script to process, I'm happy to develop a web service for you.

Offline

#10 2013-05-17 20:03:53

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,970
Website

Re: Automate HA Proxy

I will have a think about the process and logic needed.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#11 2013-05-17 22:29:57

marcelomartins
Member
Registered: 2013-05-06
Posts: 24

Re: Automate HA Proxy

That would be fantastic wink

Offline

#12 2013-05-27 13:11:21

titanicsaled
Trusted Member
Registered: 2013-03-08
Posts: 20

Re: Automate HA Proxy

Sounds like a great idea. Would love to see this implemented.

If you require a developer then you could set up a fund and I'm sure people would contribute to it to get it done.

Offline

#13 2013-05-27 13:23:51

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,970
Website

Re: Automate HA Proxy

I have looked at a few options here, what I plan to do is to first get all 5 locations set up, then centralise the HAproxy with a geo-ip cluster of LEB's all maintaining the ha proxy records, this will then forward the requests to the local node which can then also load balance as well.

I will write up a more detailed plan when I have time but this way will also allow me to set it up more like a high availability cluster and CDN.

When I have finished doing the plan and technical requirements I will be getting a developer to write a complete front end for the whole LES system and perhaps even moving away from SolusVM.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#14 2013-05-27 16:29:21

titanicsaled
Trusted Member
Registered: 2013-03-08
Posts: 20

Re: Automate HA Proxy

Wow, good luck!

Offline

Board footer

Powered by FluxBB