diff options
author | 2015-02-13 06:36:05 -0500 | |
---|---|---|
committer | 2015-02-13 11:24:44 -0500 | |
commit | 112a42f34d4384eab729f039ad60b88cc714d09b (patch) | |
tree | 35e9de63428f37373ee577429d72c08cbdf0618d /puppet | |
parent | b639d3c7c28b6913da997b823452f33b9bd721c8 (diff) |
Puppet/RabbitMQ: support clustering
Allow to install & configure RabbitMQ in cluster with Puppet on
the controller node.
Change-Id: Iebbf55c75b8c80453c7313bb41faf42c7fdf7159
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/controller-puppet.yaml | 2 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index a4d68ff3..a3a422c1 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -698,9 +698,9 @@ resources: # Rabbit rabbit_username: {get_input: rabbit_username} rabbit_password: {get_input: rabbit_password} - rabbit_cookie: {get_input: rabbit_cookie} rabbit_client_use_ssl: {get_input: rabbit_client_use_ssl} rabbit_client_port: {get_input: rabbit_client_port} + rabbitmq::erlang_cookie: {get_input: rabbit_cookie} # Misc neutron_public_interface_ip: {get_input: neutron_public_interface_ip} ntp::servers: {get_input: ntp_servers} diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index b37f7235..2e83b8c3 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -110,11 +110,18 @@ if hiera('step') >= 1 { Class['rabbitmq'] -> Rabbitmq_user <| |> Class['rabbitmq'] -> Rabbitmq_user_permissions <| |> - # TODO Rabbit HA + $rabbit_nodes = split(downcase(hiera('rabbit_nodes', $::hostname)), ',') + if count($rabbit_nodes) > 1 { + $rabbit_cluster = true + } + else { + $rabbit_cluster = false + } class { 'rabbitmq': - package_provider => $rabbit_provider, - config_cluster => false, - node_ip_address => hiera('controller_host'), + package_provider => $rabbit_provider, + config_cluster => $rabbit_cluster, + cluster_nodes => $rabbit_nodes, + node_ip_address => hiera('controller_host'), } rabbitmq_vhost { '/': |