Set all RabbitMQ queues as mirrored when clustered
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller.pp
index 4136303..8f6398f 100644 (file)
@@ -129,30 +129,19 @@ if hiera('step') >= 2 {
     cluster_nodes    => $rabbit_nodes,
     node_ip_address  => hiera('controller_host'),
   }
-
-  rabbitmq_vhost { '/':
-    provider => 'rabbitmqctl',
+  if $rabbit_cluster {
+    rabbitmq_policy { 'ha-all@/':
+      pattern    => '^(?!amq\.).*',
+      definition => {
+        'ha-mode'      => 'all',
+        'ha-sync-mode' => 'automatic',
+      },
+    }
   }
-  rabbitmq_user { ['nova','glance','neutron','cinder','ceilometer','heat']:
-    admin    => true,
-    password => hiera('rabbit_password'),
+  rabbitmq_vhost { '/':
     provider => 'rabbitmqctl',
   }
 
-  rabbitmq_user_permissions {[
-    'nova@/',
-    'glance@/',
-    'neutron@/',
-    'cinder@/',
-    'ceilometer@/',
-    'heat@/',
-  ]:
-    configure_permission => '.*',
-    write_permission     => '.*',
-    read_permission      => '.*',
-    provider             => 'rabbitmqctl',
-  }
-
   # pre-install swift here so we can build rings
   include ::swift
 
@@ -220,7 +209,6 @@ if hiera('step') >= 3 {
   include ::glance::backend::swift
 
   class { 'nova':
-    rabbit_hosts           => [hiera('controller_virtual_ip')],
     glance_api_servers     => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]),
   }
 
@@ -232,10 +220,7 @@ if hiera('step') >= 3 {
   include ::nova::vncproxy
   include ::nova::scheduler
 
-  class {'neutron':
-    rabbit_hosts => [hiera('controller_virtual_ip')],
-  }
-
+  include ::neutron
   include ::neutron::server
   include ::neutron::agents::dhcp
   include ::neutron::agents::l3
@@ -268,10 +253,7 @@ if hiera('step') >= 3 {
   Service['neutron-server'] -> Service['neutron-ovs-agent-service']
   Service['neutron-server'] -> Service['neutron-metadata']
 
-  class {'cinder':
-    rabbit_hosts => [hiera('controller_virtual_ip')],
-  }
-
+  include ::cinder
   include ::cinder::api
   include ::cinder::glance
   include ::cinder::scheduler