1 # == Class: nova::rabbitmq
3 # Installs and manages rabbitmq server for nova
8 # (optional) The username to use when connecting to Rabbit
12 # (optional) The password to use when connecting to Rabbit
16 # (optional) The port to use when connecting to Rabbit
20 # (optional) The virtual host to use when connecting to Rabbit
23 # [*cluster_disk_nodes*]
24 # (optional) Enables/disables RabbitMQ clustering. Specify an array of Rabbit Broker
25 # IP addresses to configure clustering.
29 # (optional) Whether to enable the Rabbit service
33 # (optional) The rabbitmq puppet class to depend on,
34 # which is dependent on the puppet-rabbitmq version.
35 # Use the default for 1.x, use 'rabbitmq' for 3.x
36 # Defaults to 'rabbitmq::server'
43 $cluster_disk_nodes = false,
45 $rabbitmq_class = 'rabbitmq::server'
48 # only configure nova after the queue is up
49 Class[$rabbitmq_class] -> Anchor<| title == 'nova-start' |>
52 if $userid == 'guest' {
53 $delete_guest_user = false
55 $delete_guest_user = true
56 rabbitmq_user { $userid:
58 password => $password,
59 provider => 'rabbitmqctl',
60 require => Class[$rabbitmq_class],
62 # I need to figure out the appropriate permissions
63 rabbitmq_user_permissions { "${userid}@${virtual_host}":
64 configure_permission => '.*',
65 write_permission => '.*',
66 read_permission => '.*',
67 provider => 'rabbitmqctl',
68 }->Anchor<| title == 'nova-start' |>
70 $service_ensure = 'running'
72 $service_ensure = 'stopped'
75 if $cluster_disk_nodes {
76 class { $rabbitmq_class:
77 service_ensure => $service_ensure,
79 delete_guest_user => $delete_guest_user,
80 config_cluster => true,
81 cluster_disk_nodes => $cluster_disk_nodes,
82 wipe_db_on_cookie_change => true,
85 class { $rabbitmq_class:
86 service_ensure => $service_ensure,
88 delete_guest_user => $delete_guest_user,
93 rabbitmq_vhost { $virtual_host:
94 provider => 'rabbitmqctl',
95 require => Class[$rabbitmq_class],