messaging: add erlang_cookie parameter

We updated puppetlabs-rabbitmq to latest stable version, so we need to
set erlang_cookie parameter.
Also, we set it as required without default value so we ensure all
deployments need to configure it in the data.

Change-Id: I1fba5d7277ec54281913f1a30d88649cd3c5b17b
This commit is contained in:
Emilien Macchi
2015-02-05 12:12:17 -05:00
parent 7cd7e010cc
commit 882effed2b
2 changed files with 13 additions and 0 deletions

View File

@@ -45,12 +45,18 @@
# (optional) Port of RabbitMQ service.
# Defaults to '5672'
#
# [*erlang_cookie*]
# (required) Erlang cookie to use.
# When running a cluster, this value should be the same for all
# the nodes.
#
# [*firewall_settings*]
# (optional) Allow to add custom parameters to firewall rules
# Should be an hash.
# Default to {}
#
class cloud::messaging(
$erlang_cookie,
$cluster_node_type = 'disc',
$rabbit_names = $::hostname,
$rabbit_password = 'rabbitpassword',
@@ -88,6 +94,7 @@ class cloud::messaging(
cluster_node_type => $cluster_node_type,
node_ip_address => $rabbitmq_ip,
port => $rabbitmq_port,
erlang_cookie => $erlang_cookie,
}
rabbitmq_vhost { '/':

View File

@@ -27,6 +27,7 @@ describe 'cloud::messaging' do
:cluster_node_type => 'disc',
:rabbit_names => ['foo','boo','zoo'],
:rabbit_password => 'secrete',
:erlang_cookie => 'MY_COOKIE',
:rabbitmq_ip => '10.0.0.1',
}
end
@@ -39,6 +40,7 @@ describe 'cloud::messaging' do
:wipe_db_on_cookie_change => true,
:cluster_node_type => params[:cluster_node_type],
:node_ip_address => params[:rabbitmq_ip],
:erlang_cookie => params[:erlang_cookie],
:port => '5672',
)
end
@@ -102,6 +104,10 @@ describe 'cloud::messaging' do
{ :osfamily => 'RedHat' }
end
let :params do
{ :erlang_cookie => 'MY_COOKIE' }
end
it_configures 'openstack messaging'
it 'should create rabbitmq binaries symbolic links' do