sous-chefs / haproxy

Development repository for the haproxy cookbook
https://supermarket.chef.io/cookbooks/haproxy
Apache License 2.0
158 stars 248 forks source link

Add support for a single frontend and multiple backends #111

Closed ianrossi closed 7 years ago

ianrossi commented 9 years ago

I just wrote a wrapper cookbook that will accomplish this. It uses most of what is already in the haproxy cookbook and does some additional things with attributes. Do you think there is an interest to have this option in the upstream cookbook? I could fork it and setup a PR. It could basically offer an option specify an array of app roles instead of just one.

My _discovery recipes does the same thing as the current _discovery except it iterates additionally through an array of app roles. Then my wrapper's default recipe sets up the frontend and backends with the LWRPs.

I imagine there are others that want to use one load balancer in front of multiple different app clusters. We're doing this currently in our infrastructure because it means less nodes to manage. If we load balanced each app cluster, we would have 7 load balancers.

damacus commented 7 years ago

@ianrossi thanks!

We're moving towards custom resources. Feel free to take a look at the #164 PR and see if that meets your needs. It if doesn't I'd love some feedback.

Cheers Dan

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.