pin puppetlabs-rabbitmq to 5.4.0

Change-Id: Ic589f5b0e978a3884d80f0fbcbdafc1e62f6c843
Closes-Bug: #1574678
Signed-off-by: Maksim Malchuk <mmalchuk@mirantis.com>
This commit is contained in:
Maksim Malchuk 2016-05-18 16:22:36 +03:00
parent 42924c8a81
commit 5726e825b6
4 changed files with 64 additions and 57 deletions

View File

@ -143,10 +143,9 @@ mod 'corosync',
:ref => '0.8.0-mos-rc3'
# Pull in puppetlabs-rabbitmq
# FIXME(bogdando) We need the 5.3.1-dc0964d. Use the 5.3.2 once released.
mod 'rabbitmq',
:git => 'https://github.com/fuel-infra/puppetlabs-rabbitmq.git',
:ref => '5.3.1-mos-rc1'
:ref => '5.4.0'
# Pull in puppetlabs-mysql
# FIXME(mmalchuk) 498b085 (3.6.3-rc1) is a fix for the 3.6.x branch

View File

@ -27,13 +27,13 @@ class fuel::rabbitmq (
before => Service['rabbitmq-server'],
}
group { "rabbitmq" :
provider => "groupadd",
ensure => "present",
group { 'rabbitmq':
ensure => 'present',
provider => 'groupadd',
gid => $rabbitmq_gid,
}
user { "rabbitmq":
user { 'rabbitmq':
ensure => present,
managehome => true,
uid => $rabbitmq_uid,
@ -41,26 +41,26 @@ class fuel::rabbitmq (
shell => '/bin/bash',
home => '/var/lib/rabbitmq',
comment => 'RabbitMQ messaging server',
require => Group["rabbitmq"],
require => Group['rabbitmq'],
}
file { "/var/log/rabbitmq":
file { '/var/log/rabbitmq':
ensure => directory,
owner => 'rabbitmq',
group => 'rabbitmq',
mode => 0755,
mode => '0755',
require => User['rabbitmq'],
before => Service["rabbitmq-server"],
before => Service['rabbitmq-server'],
}
rabbitmq_user { $astute_user:
admin => true,
password => $astute_password,
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
admin => true,
password => $astute_password,
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
}
rabbitmq_vhost { "/":
rabbitmq_vhost { '/':
require => Class['::rabbitmq'],
}
@ -72,17 +72,17 @@ class fuel::rabbitmq (
require => [Class['::rabbitmq'], Rabbitmq_vhost['/']]
}
file { "/etc/rabbitmq/enabled_plugins":
file { '/etc/rabbitmq/enabled_plugins':
content => '[amqp_client,rabbitmq_stomp,rabbitmq_management].',
owner => root,
group => root,
mode => 0644,
require => Package["rabbitmq-server"],
notify => Service["rabbitmq-server"],
mode => '0644',
require => Package['rabbitmq-server'],
notify => Service['rabbitmq-server'],
}
if $stomp {
$actual_mco_vhost = "/"
$actual_mco_vhost = '/'
} else {
rabbitmq_vhost { $mco_vhost:
require => Class['::rabbitmq'],
@ -91,10 +91,10 @@ class fuel::rabbitmq (
}
rabbitmq_user { $mco_user:
admin => true,
password => $mco_password,
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
admin => true,
password => $mco_password,
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
}
rabbitmq_user_permissions { "${mco_user}@${actual_mco_vhost}":
@ -107,14 +107,14 @@ class fuel::rabbitmq (
exec { 'create-mcollective-directed-exchange':
command => "curl -L -i -u ${mco_user}:${mco_password} -H \"content-type:application/json\" -XPUT \
-d'{\"type\":\"direct\",\"durable\":true}'\
command => "curl -L -i -u ${mco_user}:${mco_password} -H \"content-type:application/json\" -XPUT \
-d'{\"type\":\"direct\",\"durable\":true}' \
http://${management_bind_ip}:${management_port}/api/exchanges/${actual_mco_vhost}/mcollective_directed",
logoutput => true,
require => [
Service['rabbitmq-server'],
Rabbitmq_user_permissions["${mco_user}@${actual_mco_vhost}"],
],
Service['rabbitmq-server'],
Rabbitmq_user_permissions["${mco_user}@${actual_mco_vhost}"],
],
path => '/bin:/usr/bin:/sbin:/usr/sbin',
tries => 10,
try_sleep => 3,
@ -139,34 +139,40 @@ class fuel::rabbitmq (
]"
}
$real_env_config = {
'NODE_IP_ADDRESS' => $bind_ip
}
$cluster_nodes = []
# NOTE(bogdando) requires rabbitmq module >=4.0
class { '::rabbitmq':
repos_ensure => false,
package_provider => 'yum',
package_source => undef,
environment_variables => $env_config,
service_ensure => 'running',
delete_guest_user => true,
config_cluster => false,
cluster_nodes => [],
config_stomp => true,
stomp_port => $stompport,
ssl => false,
node_ip_address => $bind_ip,
tcp_keepalive => true,
config_kernel_variables => {
'inet_dist_listen_min' => '41055',
'inet_dist_listen_max' => '41055',
'inet_default_connect_options' => '[{nodelay,true}]',
repos_ensure => false,
package_provider => 'yum',
package_source => undef,
environment_variables => merge($env_config, $real_env_config),
service_ensure => 'running',
delete_guest_user => true,
config_cluster => false,
cluster_nodes => $cluster_nodes,
config_stomp => true,
stomp_port => $stompport,
ssl => false,
node_ip_address => 'UNSET',
tcp_keepalive => true,
config_kernel_variables => {
'inet_dist_listen_min' => '41055',
'inet_dist_listen_max' => '41055',
'inet_default_connect_options' => '[{nodelay,true}]',
},
config_variables => {
'log_levels' => '[{connection,debug,info,error}]',
'default_vhost' => '<<"">>',
'default_permissions' => '[<<".*">>, <<".*">>, <<".*">>]',
config_variables => {
'log_levels' => '[{connection,debug,info,error}]',
'default_vhost' => '<<"">>',
'default_permissions' => '[<<".*">>, <<".*">>, <<".*">>]',
},
config_management_variables => $rabbitmq_management_variables,
require => User["rabbitmq"],
admin_enable => true,
config_management_variables => $rabbitmq_management_variables,
require => User['rabbitmq'],
}
# NOTE(bogdando) retries for the rabbitmqadmin curl command, unmerged MODULES-1650

View File

@ -108,7 +108,6 @@ class osnailyfacter::rabbitmq::rabbitmq {
$config_management_variables_default ={
'rates_mode' => 'none',
'listener' => "[{port, ${management_port}}, {ip,\"${management_bind_ip_address}\"}]",
}
$config_management_variables_merged = merge($config_management_variables_default, $config_management_variables)
@ -122,7 +121,10 @@ class osnailyfacter::rabbitmq::rabbitmq {
'PID_FILE' => $pid_file,
}
)
$environment_variables = merge($environment_variables_init,{'NODENAME' => "rabbit@${fqdn_prefix}${hostname}"})
$environment_variables = merge($environment_variables_init, {
'NODENAME' => "rabbit@${fqdn_prefix}${::hostname}",
'NODE_IP_ADDRESS' => $rabbitmq_bind_ip_address,
})
if ($enabled) {
class { '::rabbitmq':
@ -146,7 +148,7 @@ class osnailyfacter::rabbitmq::rabbitmq {
#cluster_node_type => 'disc',
#cluster_partition_handling => $cluster_partition_handling,
version => $version,
node_ip_address => $rabbitmq_bind_ip_address,
node_ip_address => $management_bind_ip_address,
config_kernel_variables => $config_kernel_variables_merged,
config_management_variables => $config_management_variables_merged,
config_variables => $config_variables_merged,

View File

@ -88,7 +88,7 @@ describe manifest do
:default_pass => rabbit_hash['password'],
:config_cluster => false,
:version => version,
:node_ip_address => rabbitmq_bind_ip_address,
:node_ip_address => management_bind_ip_address,
:config_kernel_variables => $config_kernel_variables,
:config_management_variables => $config_management_variables,
:config_variables => $config_variables.merge(rabbit_config_variables),