Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server-Manager Provisioning changes for rabbit ip:port list change
Changing the contrail config files to use ip:port list for rabbit_server knob instead of rabbit_server and rabbit_port with vip and haproxy frontend port. Closes-Bug: #1515773 - Rabbit HA change Closes-Bug: #1536753 - Rabbit HA queues never set Accompanies commit: https://review.opencontrail.org/#/c/15076/ Patch 2: Added openstack files deleting the setting of rabbit_port per Thilak response Patch 3: Changed all config of rabbit_host to rabbit_hosts, verified that rabbit_hosts is available as a config option Patch 4: Added user specified amqp_ip_list and amqp_port to params (Used to set contrail_rabbit_servers) Patch 5: Added rabbitmq.pp as separate manifest as part of config to allow rabbitmq to be provisioned conditionally based on amqp_ip_list supplied by user. Removed rabbit mq provisioning from config/config.pp and moved to config/rabbitmq.pp Patch 6: Added separate openstack_amqp_ip_list and contrail_amqp_ip_list for user to be able to configure separate rabbitmq clusters for config and opentack nodes. Patch 7: Redid after puppet refactoring changes Patch 8: Fixed bugs in uuid (rabbitmq clustering), params, init.pp, neutron and haproxy Patch 9: Changed defaults for amqp_port,list,etc - new params introduced. Defaults changed from false to ''. Change-Id: I1c916ca4bcc455f877d3f77fda9a69d3442d6754
- Loading branch information
nitishkrishna
committed
Feb 3, 2016
1 parent
2b356e0
commit 6fa8beb
Showing
24 changed files
with
193 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
contrail/environment/modules/contrail/manifests/config/rabbitmq.pp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
class contrail::config::rabbitmq ( | ||
$host_control_ip = $::contrail::params::host_ip, | ||
$control_ip_list = $::contrail::params::control_ip_list, | ||
$haproxy = $::contrail::params::haproxy, | ||
$openstack_manage_amqp = $::contrail::params::openstack_manage_amqp, | ||
$amqp_server_ip = $::contrail::params::amqp_server_ip, | ||
$config_ip_list = $::contrail::params::config_ip_list, | ||
$config_name_list = $::contrail::params::config_name_list, | ||
$config_ip = $::contrail::params::config_ip_to_use, | ||
$collector_ip = $::contrail::params::collector_ip_to_use, | ||
$contrail_rabbit_servers= $::contrail::params::contrail_rabbit_servers, | ||
$contrail_logoutput = $::contrail::params::contrail_logoutput, | ||
$contrail_amqp_ip_list = $::contrail::params::contrail_amqp_ip_list, | ||
$uuid = $::contrail::params::uuid, | ||
) { | ||
# Check to see if amqp_ip_list was passed by user. If yes, rabbitmq provisioning can be skipped | ||
if (! $contrail_amqp_ip_list) { | ||
# Set number of config nodes | ||
$cfgm_number = size($config_ip_list) | ||
if ($cfgm_number == 1) { | ||
$rabbitmq_conf_template = 'rabbitmq_config_single_node.erb' | ||
} else { | ||
$rabbitmq_conf_template = 'rabbitmq_config.erb' | ||
} | ||
|
||
if ( $host_control_ip == $config_ip_list[0]) { | ||
$master = 'yes' | ||
} else { | ||
$master = 'no' | ||
} | ||
|
||
$cfgm_ip_list_shell = join($config_ip_list,",") | ||
$cfgm_name_list_shell = join($config_name_list, ",") | ||
$rabbit_env = "NODE_IP_ADDRESS=${host_control_ip}\nNODENAME=rabbit@${::hostname}ctl\n" | ||
|
||
# Handle rabbitmq.config changes | ||
file {'/var/lib/rabbitmq/.erlang.cookie': | ||
mode => '0400', | ||
owner => rabbitmq, | ||
group => rabbitmq, | ||
content => $uuid | ||
}-> | ||
file { '/etc/rabbitmq/rabbitmq.config' : | ||
content => template("${module_name}/${rabbitmq_conf_template}"), | ||
} | ||
-> | ||
file { '/etc/rabbitmq/rabbitmq-env.conf' : | ||
mode => '0755', | ||
group => root, | ||
content => $rabbit_env, | ||
} | ||
-> | ||
class {'::contrail::config::add_etc_hosts': | ||
cfgm_ip_list_shell => $cfgm_ip_list_shell, | ||
cfgm_name_list_shell => $cfgm_name_list_shell | ||
} | ||
-> | ||
class {'::contrail::config::verify_rabbitmq': | ||
master => $master, | ||
host_control_ip => $host_control_ip, | ||
config_ip_list => $config_ip_list | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.