James Carr
2013-Feb-01 20:32 UTC
[Puppet Users] Cannot get puppetlabs-haproxy to do what I want
I''ve been having a mess of a time using this module, which stinks because its behavior is EXACTLY what I am looking for... whenever I bootstrap new rabbitMQ nodes I want to add them to our HAProxy instance. Here''s my relevant site.pp entries: node /^rabbit.*/ inherits basenode { @@haproxy::balancermember { $fqdn: listening_service => ''messaging00'', server_names => $::hostname, ipaddresses => $::ipaddress, ports => [''55672'', ''5672''], options => ''check'' } include roles::rabbitmq::worker_broker } node thelonius inherits basenode { Haproxy::Balancermember <<| listening_service == ''messaging00'' |>> class { ''haproxy'': } haproxy::listen { ''messaging00'': options => { ''mode'' => ''tcp'', ''balance'' => ''roundrobin'', ''option'' => [ ''tcplog'', ''tcpka'' ] }, ipaddress => $::ipaddress, ports => [''55672'',''5672''], } haproxy::listen { ''private_monitoring01'': options => { ''mode'' => ''http'', ''stats'' => [ ''enable'', ''uri /'', ''refresh 5s'' ], ''option'' => [ ''httplog'', ] }, ipaddress => "", ports => [80], } } When these run, haproxy goes down because it puts the server entry under defaults instead of messaging00: defaults log global maxconn 8000 option redispatch retries 3 stats enable timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout check 10s server rabbit01 10.0.2.15:55672,10.0.2.15:5672 check listen messaging00 10.0.2.15:55672,10.0.2.15:5672 balance roundrobin mode tcp option tcplog option tcpka Any help would be GREATLY appreciated ... I''ve done much yak shaving to get this far and this is the last piece to give me the sweet setup I am looking for. :) Thanks, James -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
James Carr
2013-Feb-01 21:31 UTC
[Puppet Users] Re: Cannot get puppetlabs-haproxy to do what I want
I don''t get it... really I DON''T! :) For reasons that makes absolutely no sense to me whatsoever, the following works... if anyone could shed some light on why in the world this would work I would love to hear it... I don''t feel safe going forward with it because it feels like it is working by coincidence and could simply break at any time. node /^rabbit.*/ inherits basenode { @@haproxy::balancermember { $fqdn: listening_service => ''puppet00'', server_names => $::hostname, ipaddresses => $::ipaddress, ports => [''55672'', ''5672''], options => ''check'' } include roles::rabbitmq::worker_broker } node thelonius inherits basenode { Haproxy::Balancermember <<| listening_service == ''puppet00'' |>> class { ''haproxy'': } haproxy::listen { ''puppet55'': options => { ''mode'' => ''tcp'', ''balance'' => ''roundrobin'', ''option'' => [ ''tcplog'', ''tcpka'' ] }, ipaddress => $::ipaddress, ports => [''55672'',''5672''], } } On Friday, February 1, 2013 2:32:43 PM UTC-6, James Carr wrote:> > I''ve been having a mess of a time using this module, which stinks because > its behavior is EXACTLY what I am looking for... whenever I bootstrap new > rabbitMQ nodes I want to add them to our HAProxy instance. > > Here''s my relevant site.pp entries: > > node /^rabbit.*/ inherits basenode { > @@haproxy::balancermember { $fqdn: > listening_service => ''messaging00'', > server_names => $::hostname, > ipaddresses => $::ipaddress, > ports => [''55672'', ''5672''], > options => ''check'' > } > > include roles::rabbitmq::worker_broker > } > > node thelonius inherits basenode { > Haproxy::Balancermember <<| listening_service == ''messaging00'' |>> > class { ''haproxy'': } > haproxy::listen { ''messaging00'': > options => { > ''mode'' => ''tcp'', > ''balance'' => ''roundrobin'', > ''option'' => [ > ''tcplog'', > ''tcpka'' > ] > }, > ipaddress => $::ipaddress, > ports => [''55672'',''5672''], > } > > haproxy::listen { ''private_monitoring01'': > options => { > ''mode'' => ''http'', > ''stats'' => [ > ''enable'', > ''uri /'', > ''refresh 5s'' > ], > ''option'' => [ > ''httplog'', > ] > }, > ipaddress => "", > ports => [80], > } > } > > When these run, haproxy goes down because it puts the server entry under > defaults instead of messaging00: > > defaults > log global > maxconn 8000 > option redispatch > retries 3 > stats enable > timeout http-request 10s > timeout queue 1m > timeout connect 10s > timeout client 1m > timeout server 1m > timeout check 10s > > server rabbit01 10.0.2.15:55672,10.0.2.15:5672 check > > > listen messaging00 10.0.2.15:55672,10.0.2.15:5672 > balance roundrobin > mode tcp > option tcplog > option tcpka > > Any help would be GREATLY appreciated ... I''ve done much yak shaving to > get this far and this is the last piece to give me the sweet setup I am > looking for. :) > > > Thanks, > James >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Aaron Blew
2013-Mar-25 05:53 UTC
[Puppet Users] Re: Cannot get puppetlabs-haproxy to do what I want
I''m running into this issue as well, but I can''t figure out what James changed in order to get his setup working. Here''s what I''m calling from within one of my modules: #Node 1 - Load balancer: #... class { "haproxy": } haproxy::listen { "beanstalk00": ipaddress => $::ipaddress_eth1, ports => "8080", mode => "http", }#...#LB Members: #... include apache # Set up the node in the load balancer @@haproxy::balancermember { $fqdn: listening_service => "beanstalk00", server_names => $::hostname, ipaddresses => $::ipaddress_eth1, ports => ''80'', options => ''check'' }#... Everything renders out as I''d expect, but as James experienced, the nodes were in the defaults section instead of the load balancer section. -Aaron On Friday, February 1, 2013 1:31:46 PM UTC-8, James Carr wrote:> > I don''t get it... really I DON''T! :) > > For reasons that makes absolutely no sense to me whatsoever, the following > works... if anyone could shed some light on why in the world this would > work I would love to hear it... I don''t feel safe going forward with it > because it feels like it is working by coincidence and could simply break > at any time. > > node /^rabbit.*/ inherits basenode { > @@haproxy::balancermember { $fqdn: > listening_service => ''puppet00'', > server_names => $::hostname, > ipaddresses => $::ipaddress, > ports => [''55672'', ''5672''], > options => ''check'' > } > > > > include roles::rabbitmq::worker_broker > > } > > node thelonius inherits basenode { > Haproxy::Balancermember <<| listening_service == ''puppet00'' |>> > class { ''haproxy'': } > haproxy::listen { ''puppet55'': > options => { > ''mode'' => ''tcp'', > ''balance'' => ''roundrobin'', > ''option'' => [ > ''tcplog'', > ''tcpka'' > ] > }, > ipaddress => $::ipaddress, > ports => [''55672'',''5672''], > } > > } > > On Friday, February 1, 2013 2:32:43 PM UTC-6, James Carr wrote: >> >> I''ve been having a mess of a time using this module, which stinks because >> its behavior is EXACTLY what I am looking for... whenever I bootstrap new >> rabbitMQ nodes I want to add them to our HAProxy instance. >> >> Here''s my relevant site.pp entries: >> >> node /^rabbit.*/ inherits basenode { >> @@haproxy::balancermember { $fqdn: >> listening_service => ''messaging00'', >> server_names => $::hostname, >> ipaddresses => $::ipaddress, >> ports => [''55672'', ''5672''], >> options => ''check'' >> } >> >> include roles::rabbitmq::worker_broker >> } >> >> node thelonius inherits basenode { >> Haproxy::Balancermember <<| listening_service == ''messaging00'' |>> >> class { ''haproxy'': } >> haproxy::listen { ''messaging00'': >> options => { >> ''mode'' => ''tcp'', >> ''balance'' => ''roundrobin'', >> ''option'' => [ >> ''tcplog'', >> ''tcpka'' >> ] >> }, >> ipaddress => $::ipaddress, >> ports => [''55672'',''5672''], >> } >> >> haproxy::listen { ''private_monitoring01'': >> options => { >> ''mode'' => ''http'', >> ''stats'' => [ >> ''enable'', >> ''uri /'', >> ''refresh 5s'' >> ], >> ''option'' => [ >> ''httplog'', >> ] >> }, >> ipaddress => "", >> ports => [80], >> } >> } >> >> When these run, haproxy goes down because it puts the server entry under >> defaults instead of messaging00: >> >> defaults >> log global >> maxconn 8000 >> option redispatch >> retries 3 >> stats enable >> timeout http-request 10s >> timeout queue 1m >> timeout connect 10s >> timeout client 1m >> timeout server 1m >> timeout check 10s >> >> server rabbit01 10.0.2.15:55672,10.0.2.15:5672 check >> >> >> listen messaging00 10.0.2.15:55672,10.0.2.15:5672 >> balance roundrobin >> mode tcp >> option tcplog >> option tcpka >> >> Any help would be GREATLY appreciated ... I''ve done much yak shaving to >> get this far and this is the last piece to give me the sweet setup I am >> looking for. :) >> >> >> Thanks, >> James >> >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Fiddyspence
2013-Mar-25 12:51 UTC
[Puppet Users] Re: Cannot get puppetlabs-haproxy to do what I want
There''s a bug in the manifests/listen.pp defined resource definition that hasn''t made it to the module on the forge yet - either check the release on github at https://github.com/puppetlabs/puppetlabs-haproxy or edit the listen.pp order => "20-${name}-00", That should put the fragment in the right place. On Friday, 1 February 2013 20:32:43 UTC, James Carr wrote:> > I''ve been having a mess of a time using this module, which stinks because > its behavior is EXACTLY what I am looking for... whenever I bootstrap new > rabbitMQ nodes I want to add them to our HAProxy instance. > > Here''s my relevant site.pp entries: > > node /^rabbit.*/ inherits basenode { > @@haproxy::balancermember { $fqdn: > listening_service => ''messaging00'', > server_names => $::hostname, > ipaddresses => $::ipaddress, > ports => [''55672'', ''5672''], > options => ''check'' > } > > include roles::rabbitmq::worker_broker > } > > node thelonius inherits basenode { > Haproxy::Balancermember <<| listening_service == ''messaging00'' |>> > class { ''haproxy'': } > haproxy::listen { ''messaging00'': > options => { > ''mode'' => ''tcp'', > ''balance'' => ''roundrobin'', > ''option'' => [ > ''tcplog'', > ''tcpka'' > ] > }, > ipaddress => $::ipaddress, > ports => [''55672'',''5672''], > } > > haproxy::listen { ''private_monitoring01'': > options => { > ''mode'' => ''http'', > ''stats'' => [ > ''enable'', > ''uri /'', > ''refresh 5s'' > ], > ''option'' => [ > ''httplog'', > ] > }, > ipaddress => "", > ports => [80], > } > } > > When these run, haproxy goes down because it puts the server entry under > defaults instead of messaging00: > > defaults > log global > maxconn 8000 > option redispatch > retries 3 > stats enable > timeout http-request 10s > timeout queue 1m > timeout connect 10s > timeout client 1m > timeout server 1m > timeout check 10s > > server rabbit01 10.0.2.15:55672,10.0.2.15:5672 check > > > listen messaging00 10.0.2.15:55672,10.0.2.15:5672 > balance roundrobin > mode tcp > option tcplog > option tcpka > > Any help would be GREATLY appreciated ... I''ve done much yak shaving to > get this far and this is the last piece to give me the sweet setup I am > looking for. :) > > > Thanks, > James >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.