multi-machine with chef-solo and haproxy::app_lb

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

multi-machine with chef-solo and haproxy::app_lb

louis gueye
Hi all,

After having a hard time getting a multi-machine configuration to work dynamically with chef-solo (via omnibus and berkshelf) provisioning I finally decided to post on the group as I'm still stuck.

I configured my Vagrantfile to reach some goals. Some are met, the last one is not:

1 - create 1 mysql vm with chef-solo => OK
2 - create 2 jetty vm with chef-solo => OK
3 - create 1 haproxy vm with chef-solo => OK
4 - configure haproxy to register jetty instances as backend servers => KO

My ultimate goal is to add app server instances to haproxy with vagrant and chef-solo.

I've read a lot about the topic and apparently, the "cleanest" way to achieve that goal is to run the "haproxy::app_lb" recipe.
That recipe should lookup (don't know how) the servers tagged with the "appserver" role, register hostname and ip, then interpolate haproxy.cfg.erb to /etc/haproxy/haproxy.cfg
The lookup part first complained about a non-existent role. I added the role, specified by chef.roles_path
Then it complained about a non-existent data_bags_path. I added an empty data bag path, specified by chef.data_bags_path
I even added the landrush plugin which acts as a dns server: still doesn't change anything: the /etc/haproxy/haproxy.cfg doesn't get updated.

This project reproduces the error : https://github.com/lgueye/vagrant-multi-vms if interrested in details.

Any help will greatly be appreciated.

Cheers,

Louis





--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.