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+unsubscr...@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.


Reply via email to