Support separate oslo.messaging services for RPC and Notifications

This commit introduces separate oslo.messaging services in place of
a single rabbitmq server. This enables the separation of rpc and
notifications, the continued use of single rabbitmq server as well
as the use of alternative oslo.messaging drivers/backends.

This patch:
* adds oslo_messaging_* hiera parameters
* update rabbitmq and qdrourterd services
* add release note

Depends-On: I03e99d35ed043cf11bea9b7462058bd80f4d99da
Depends-On: I934561612d26befd88a9053262836b47bdf4efb0
Change-Id: Ie181a92731e254b7f613ad25fee6cc37e985c315
This commit is contained in:
Andrew Smith 2017-10-09 16:29:29 -04:00
parent 79ccad4b8d
commit c04557fba4
24 changed files with 734 additions and 665 deletions

View File

@ -27,69 +27,69 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('aodh::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::aodh (
$step = Integer(hiera('step')),
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('aodh::rabbit_password'),
$oslomsg_rpc_port = hiera('aodh::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('aodh::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('aodh::rabbit_password'),
$oslomsg_notify_port = hiera('aodh::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('aodh::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('aodh::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
@ -99,25 +99,24 @@ class tripleo::profile::base::aodh (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts,[]))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts,[]))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::aodh' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::aodh::auth

View File

@ -48,53 +48,53 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('barbican::api::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::barbican::api (
$barbican_network = hiera('barbican_api_network', undef),
@ -102,18 +102,18 @@ class tripleo::profile::base::barbican::api (
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('barbican::api::rabbit_password'),
$oslomsg_rpc_port = hiera('barbican::api::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('barbican::api::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('barbican::api::rabbit_password'),
$oslomsg_notify_port = hiera('barbican::api::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('barbican::api::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('barbican::api::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -137,26 +137,25 @@ class tripleo::profile::base::barbican::api (
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::tripleo::profile::base::barbican::backends
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::barbican::api':
sync_db => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
multiple_secret_stores_enabled => true,
enabled_secret_stores => $::tripleo::profile::base::barbican::backends::enabled_secret_stores,

View File

@ -23,90 +23,89 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('ceilometer::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::ceilometer (
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('ceilometer::rabbit_password'),
$oslomsg_rpc_port = hiera('ceilometer::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('ceilometer::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('ceilometer::rabbit_password'),
$oslomsg_notify_port = hiera('ceilometer::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('ceilometer::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('ceilometer::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $step >= 3 {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::ceilometer' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::ceilometer::config

View File

@ -30,70 +30,70 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('cinder::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::cinder (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$cinder_enable_db_purge = true,
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('cinder::rabbit_password'),
$oslomsg_rpc_port = hiera('cinder::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('cinder::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('cinder::rabbit_password'),
$oslomsg_notify_port = hiera('cinder::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('cinder::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('cinder::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -102,27 +102,26 @@ class tripleo::profile::base::cinder (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::cinder' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}
class { '::cinder::ceilometer' :
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::cinder::config

View File

@ -26,44 +26,39 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('congress::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
class tripleo::profile::base::congress (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('congress::rabbit_password'),
$oslomsg_rpc_port = hiera('congress::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('congress::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('congress::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -72,17 +67,16 @@ class tripleo::profile::base::congress (
}
if $step >= 4 or ($step >= 3 and $sync_db){
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::congress':
sync_db => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}

View File

@ -56,17 +56,53 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*rabbit_port*]
# IP port for rabbitmq service
# Defaults to hiera('glance::notify::rabbitmq::rabbit_port', 5672)
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
#
# [*tls_proxy_bind_ip*]
# IP on which the TLS proxy will listen on. Required only if
@ -87,20 +123,29 @@
# RBD client naem
# (optional) Defaults to hiera('glance::backend::rbd::rbd_store_user')
class tripleo::profile::base::glance::api (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$glance_network = hiera('glance_api_network', undef),
$glance_nfs_enabled = false,
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672),
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 9292,
$glance_rbd_client_name = hiera('glance::backend::rbd::rbd_store_user','openstack'),
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$glance_network = hiera('glance_api_network', undef),
$glance_nfs_enabled = false,
$step = Integer(hiera('step')),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 9292,
$glance_rbd_client_name = hiera('glance::backend::rbd::rbd_store_user','openstack'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -161,10 +206,25 @@ class tripleo::profile::base::glance::api (
stores => $glance_store,
sync_db => $sync_db,
}
$oslomsg_rpc_hosts_real = pick($rabbit_hosts, $oslomsg_rpc_hosts, [])
$rabbit_endpoints = suffix(any2array($oslomsg_rpc_hosts_real), ":${rabbit_port}")
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::glance::notify::rabbitmq' :
rabbit_hosts => $rabbit_endpoints,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include join(['::glance::backend::', $glance_backend])
}

View File

@ -35,71 +35,71 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('heat::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('heat::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('heat::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('heat::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::heat (
$bootstrap_node = downcase(hiera('bootstrap_nodeid')),
$manage_db_purge = hiera('heat_enable_db_purge', true),
$notification_driver = 'messaging',
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('heat::rabbit_password'),
$oslomsg_rpc_port = hiera('heat::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('heat::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('heat::rabbit_password'),
$oslomsg_notify_port = hiera('heat::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('heat::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('heat::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
# Domain resources will be created at step5 on the node running keystone.pp
# configure heat.conf at step3 and 4 but actually create the domain later.
@ -110,26 +110,25 @@ class tripleo::profile::base::heat (
manage_role => false,
}
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::heat' :
notification_driver => $notification_driver,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::heat::config

View File

@ -26,44 +26,39 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('ironic::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
class tripleo::profile::base::ironic (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('ironic::rabbit_password'),
$oslomsg_rpc_port = hiera('ironic::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('ironic::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('ironic::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
) {
# Database is accessed by both API and conductor, hence it's here.
if $::hostname == downcase($bootstrap_node) {
@ -73,18 +68,17 @@ class tripleo::profile::base::ironic (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::ironic':
sync_db => $sync_db,
db_online_data_migrations => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}

View File

@ -77,53 +77,53 @@
# This is set by t-h-t.
# Defaults to hiera('keystone_public_api_network', undef)
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('keystone::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
#
# [*ceilometer_notification_topics*]
# Notification topics that keystone should use for ceilometer to consume.
@ -159,18 +159,18 @@ class tripleo::profile::base::keystone (
$ldap_backend_enable = false,
$manage_db_purge = hiera('keystone_enable_db_purge', true),
$public_endpoint_network = hiera('keystone_public_api_network', undef),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('keystone::rabbit_password'),
$oslomsg_rpc_port = hiera('keystone::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('keystone::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('keystone::rabbit_password'),
$oslomsg_notify_port = hiera('keystone::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('keystone::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('keystone::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$ceilometer_notification_topics = [],
$barbican_notification_topics = [],
$extra_notification_topics = [],
@ -209,27 +209,26 @@ class tripleo::profile::base::keystone (
}
if $step >= 4 or ( $step >= 3 and $sync_db ) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::keystone':
sync_db => $sync_db,
enable_bootstrap => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
notification_topics => union($ceilometer_notification_topics,
$barbican_notification_topics,

View File

@ -26,69 +26,69 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('manila::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('manila::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('manila::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('manila::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::manila (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('manila::rabbit_password'),
$oslomsg_rpc_port = hiera('manila::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('manila::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('manila::rabbit_password'),
$oslomsg_notify_port = hiera('manila::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('manila::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('manila::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -97,25 +97,24 @@ class tripleo::profile::base::manila (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::manila' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::manila::config

View File

@ -27,69 +27,69 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_short_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('mistral::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::mistral (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('mistral::rabbit_password'),
$oslomsg_rpc_port = hiera('mistral::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('mistral::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('mistral::rabbit_password'),
$oslomsg_notify_port = hiera('mistral::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('mistral::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('mistral::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -98,25 +98,24 @@ class tripleo::profile::base::mistral (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::mistral':
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::mistral::config

View File

@ -22,53 +22,53 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_user', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_user', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('neutron::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
#
# [*dhcp_agents_per_network*]
# (Optional) TripleO configured number of DHCP agents
@ -85,25 +85,24 @@
class tripleo::profile::base::neutron (
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('neutron::rabbit_password'),
$oslomsg_rpc_port = hiera('neutron::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('neutron::rabbit_user', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('neutron::rabbit_password'),
$oslomsg_notify_port = hiera('neutron::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('neutron::rabbit_user', 'guest'),
$oslomsg_use_ssl = hiera('neutron::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$dhcp_agents_per_network = undef,
$dhcp_nodes = hiera('neutron_dhcp_short_node_names', []),
) {
if $step >= 3 {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
$dhcp_agent_count = size($dhcp_nodes)
if $dhcp_agents_per_network {
$dhcp_agents_per_net = $dhcp_agents_per_network
@ -118,19 +117,19 @@ class tripleo::profile::base::neutron (
class { '::neutron' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
dhcp_agents_per_network => $dhcp_agents_per_net,
}

View File

@ -22,53 +22,53 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('nova::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('nova::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('nova::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('nova::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
#
# [*step*]
# (Optional) The current step of the deployment
@ -80,18 +80,18 @@
class tripleo::profile::base::nova (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('nova::rabbit_password'),
$oslomsg_rpc_port = hiera('nova::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('nova::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('nova::rabbit_password'),
$oslomsg_notify_port = hiera('nova::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('nova::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('nova::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips'),
) {
@ -109,9 +109,8 @@ class tripleo::profile::base::nova (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
include ::nova::config
class { '::nova::cache':
enabled => true,
@ -121,19 +120,19 @@ class tripleo::profile::base::nova (
class { '::nova':
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::nova::placement

View File

@ -25,33 +25,29 @@
# Enable FreeIPA client installation for the node this runs on.
# Defaults to false
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to undef
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to '5672'
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to 'guest'
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to '0'
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*step*]
# (Optional) The current step of the deployment
@ -61,28 +57,26 @@
class tripleo::profile::base::novajoin (
$service_password,
$enable_ipa_client_install = false,
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = undef,
$oslomsg_rpc_port = '5672',
$oslomsg_rpc_username = 'guest',
$oslomsg_use_ssl = '0',
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$step = Integer(hiera('step')),
) {
if $step >= 3 {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::nova::metadata::novajoin::api' :
service_password => $service_password,
enable_ipa_client_install => $enable_ipa_client_install,
transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}
}

View File

@ -22,55 +22,49 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('octavia::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('octavia::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('octavia::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('octavia::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
class tripleo::profile::base::octavia (
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('octavia::rabbit_password'),
$oslomsg_rpc_port = hiera('octavia::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('octavia::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('octavia::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
) {
if $step >= 3 {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::octavia' :
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}
include ::octavia::config

View File

@ -31,10 +31,6 @@
# directly because it requires a string and we have a number.
# Defaults to hiera('tripleo::profile::base::qdr::qdr_listener_port', 5672)
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
@ -48,11 +44,10 @@ class tripleo::profile::base::qdr (
$qdr_username = undef,
$qdr_password = undef,
$qdr_listener_port = hiera('tripleo::profile::base::qdr::qdr_listener_port', 5672),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$step = Integer(hiera('step')),
) {
$qdr_node_names = pick($oslomsg_rpc_hosts, $rabbit_hosts, [])
$qdr_node_names = $oslomsg_rpc_hosts
if $step >= 1 {
# For multi-node deployments of the dispatch router, a mesh of
# inter-router links is created. Bi-directional links must

View File

@ -55,9 +55,29 @@
# (Optional) RabbitMQ environment.
# Defaults to hiera('rabbitmq_environment').
#
# [*rabbit_nodes*]
# (Optional) Array of host(s) for RabbitMQ nodes.
# Defaults to hiera('rabbitmq_node_names', undef).
# [*rpc_scheme*]
# (Optional) Protocol for oslo messaging rpc backend.
# Defaults to hiera('oslo_messaging_rpc_scheme', 'rabbit').
#
# [*rpc_nodes*]
# (Optional) Array of host(s) for oslo messaging rpc nodes.
# Defaults to hiera('oslo_messaging_rpc_node_names', []).
#
# [*rpc_bootstrap_node*]
# (Optional) The hostname of the rpc node for bootstrapping tasks
# Defaults to hiera('oslo_messaging_rpc_short_bootstrap_node_name')
#
# [*notify_scheme*]
# (Optional) oslo messaging notify backend indicator.
# Defaults to hiera('oslo_messaging_notify_scheme', 'rabbit').
#
# [*notify_nodes*]
# (Optional) Array of host(s) for oslo messaging notify nodes.
# Defaults to hiera('oslo_messaging_notify_node_names', []).
#
# [*notify_bootstrap_node*]
# (Optional) The hostname of the notify node for bootstrapping tasks
# Defaults to hiera('oslo_messaging_notify_short_bootstrap_node_name')
#
# [*rabbitmq_pass*]
# (Optional) RabbitMQ Default Password.
@ -67,10 +87,6 @@
# (Optional) RabbitMQ Default User.
# Defaults to hiera('rabbitmq::default_user')
#
# [*oslomsg_rpc_nodes*]
# (Optional) Array of host(s) for Oslo Messaging rpc nodes.
# Defaults to hiera('oslo_messaging_rpc_node_names', undef).
#
# [*stack_action*]
# (Optional) Action of the stack deployment.
# Defaults to hiera('stack_action')
@ -80,14 +96,6 @@
# for more details.
# Defaults to hiera('step')
#
# [*rabbit_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('rabbitmq_short_bootstrap_node_name')
#
# [*oslomsg_rpc_bootstrap_node*]
# (Optional) The hostname of the rpc node responsible for bootstrapping tasks
# Defaults to hiera('oslo_messaging_rpc_short_bootstrap_node_name')
#
class tripleo::profile::base::rabbitmq (
$certificate_specs = {},
$config_variables = hiera('rabbitmq_config_variables'),
@ -96,16 +104,27 @@ class tripleo::profile::base::rabbitmq (
$inet_dist_interface = hiera('rabbitmq::interface', undef),
$ipv6 = str2bool(hiera('rabbit_ipv6', false)),
$kernel_variables = hiera('rabbitmq_kernel_variables'),
$rabbit_nodes = hiera('rabbitmq_node_names', undef),
$rpc_scheme = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$rpc_nodes = hiera('oslo_messaging_rpc_node_names', []),
$rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name'),
$notify_scheme = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$notify_nodes = hiera('oslo_messaging_notify_node_names', []),
$notify_bootstrap_node = hiera('oslo_messaging_notify_short_bootstrap_node_name'),
$rabbitmq_pass = hiera('rabbitmq::default_pass'),
$oslomsg_rpc_nodes = hiera('oslo_messaging_rpc_node_names', undef),
$rabbitmq_user = hiera('rabbitmq::default_user'),
$stack_action = hiera('stack_action'),
$step = Integer(hiera('step')),
$rabbit_bootstrap_node = hiera('rabbitmq_short_bootstrap_node_name', undef),
$oslomsg_rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name', undef),
) {
$bootstrap_node = pick($rabbit_bootstrap_node, $oslomsg_rpc_bootstrap_node, [])
if $rpc_scheme == 'rabbit' {
$nodes = $rpc_nodes
$bootstrap_node = $rpc_bootstrap_node
} elsif $notify_scheme == 'rabbit' {
$nodes = $notify_nodes
$bootstrap_node = $notify_bootstrap_node
} else {
$nodes = []
}
if $enable_internal_tls {
$tls_certfile = $certificate_specs['service_certificate']
$tls_keyfile = $certificate_specs['service_key']
@ -133,7 +152,6 @@ class tripleo::profile::base::rabbitmq (
$real_kernel_variables = $kernel_variables
}
$nodes = pick($rabbit_nodes, $oslomsg_rpc_nodes, [])
$manage_service = hiera('rabbitmq::service_manage', true)
if $step >= 1 {
# Specific configuration for multi-nodes or when running with Pacemaker.

View File

@ -26,69 +26,69 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names', undef)
# Defaults to hiera('oslo_messaging_notify_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_notify_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_password')
# Defaults to hiera('oslo_messaging_notify_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('sahara::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
class tripleo::profile::base::sahara (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = Integer(hiera('step')),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('sahara::rabbit_password'),
$oslomsg_rpc_port = hiera('sahara::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('sahara::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = hiera('oslo_messaging_notify_node_names', undef),
$oslomsg_notify_password = hiera('sahara::rabbit_password'),
$oslomsg_notify_port = hiera('sahara::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('sahara::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('sahara::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -97,28 +97,27 @@ class tripleo::profile::base::sahara (
}
if $step >= 4 or ($step >= 3 and $sync_db){
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_notify_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_notify_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
class { '::sahara':
sync_db => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}
class { '::sahara::notify':
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts_real,
'hosts' => $oslomsg_notify_hosts,
'port' => $oslomsg_notify_port,
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
include ::sahara::keystone::authtoken

View File

@ -26,29 +26,29 @@
# Whether the ceilometer pipeline is enabled.
# Defaults to true
#
# [*ceilometer_messaging_driver*]
# Driver for messaging service.
# Defaults to hiera('messaging_notify_service_name', 'rabbit')
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*ceilometer_messaging_hosts*]
# list of the messaging host fqdns
# Defaults to hiera('rabbitmq_node_names')
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*ceilometer_messaging_password*]
# Password for messaging nova queue
# Defaults to hiera('swift::proxy::ceilometer::rabbit_password', undef)
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*ceilometer_messaging_port*]
# IP port for messaging service
# Defaults to hiera('tripleo::profile::base::swift::proxy::rabbit_port', 5672)
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*ceilometer_messaging_use_ssl*]
# Flag indicating ssl usage.
# Defaults to '0'
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*ceilometer_messaging_username*]
# Username for messaging nova queue
# Defaults to hiera('swift::proxy::ceilometer::rabbit_user', 'guest')
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*certificates_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
@ -74,10 +74,6 @@
# (Optional) List of memcache servers
# Defaults to hiera('memcached_node_ips')
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
@ -104,24 +100,23 @@
# defaults to 8080
#
class tripleo::profile::base::swift::proxy (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$ceilometer_enabled = true,
$ceilometer_messaging_driver = hiera('messaging_notify_service_name', 'rabbit'),
$ceilometer_messaging_hosts = hiera('rabbitmq_node_names', undef),
$ceilometer_messaging_password = hiera('swift::proxy::ceilometer::rabbit_password', undef),
$ceilometer_messaging_port = hiera('tripleo::profile::base::swift::proxy::rabbit_port', '5672'),
$ceilometer_messaging_use_ssl = '0',
$ceilometer_messaging_username = hiera('swift::proxy::ceilometer::rabbit_user', 'guest'),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$memcache_port = 11211,
$memcache_servers = hiera('memcached_node_ips'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$step = Integer(hiera('step')),
$swift_proxy_network = hiera('swift_proxy_network', undef),
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 8080,
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$ceilometer_enabled = true,
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$memcache_port = 11211,
$memcache_servers = hiera('memcached_node_ips'),
$step = Integer(hiera('step')),
$swift_proxy_network = hiera('swift_proxy_network', undef),
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 8080,
) {
if $::hostname == downcase($bootstrap_node) {
$is_bootstrap = true
@ -164,17 +159,16 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::tempurl
include ::swift::proxy::formpost
include ::swift::proxy::bulk
$ceilometer_messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($ceilometer_messaging_use_ssl)))
$ceilometer_messaging_hosts_real = any2array(pick($ceilometer_messaging_hosts,$oslomsg_rpc_hosts, []))
if $ceilometer_enabled {
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::swift::proxy::ceilometer':
default_transport_url => os_transport_url({
'transport' => $ceilometer_messaging_driver,
'hosts' => $ceilometer_messaging_hosts_real,
'port' => sprintf('%s', $ceilometer_messaging_port),
'username' => $ceilometer_messaging_username,
'password' => $ceilometer_messaging_password,
'ssl' => $ceilometer_messaging_use_ssl_real,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => $oslomsg_rpc_port,
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}
}

View File

@ -22,33 +22,29 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
# [*rabbit_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names', undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# Defaults to hiera('oslo_messaging_rpc_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('tacker::rabbit_port', 5672)
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('tacker::rabbit_userid', 'guest')
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('tacker::rabbit_password')
# Defaults to hiera('oslo_messaging_rpc_password')
#
# [*oslomsg_use_ssl*]
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('tacker::rabbit_use_ssl', '0')
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
#
# [*step*]
# (Optional) The current step of the deployment
@ -56,13 +52,12 @@
class tripleo::profile::base::tacker (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = hiera('oslo_messaging_rpc_node_names', undef),
$oslomsg_rpc_password = hiera('tacker::rabbit_password'),
$oslomsg_rpc_port = hiera('tacker::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('tacker::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('tacker::rabbit_use_ssl', '0'),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
@ -72,17 +67,16 @@ class tripleo::profile::base::tacker (
}
if $step >= 4 or ($step >= 3 and $sync_db){
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
$oslomsg_rpc_hosts_real = any2array(pick($rabbit_hosts, $oslomsg_rpc_hosts, []))
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
class { '::tacker':
sync_db => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts_real,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
'ssl' => $oslomsg_rpc_use_ssl_real,
}),
}

View File

@ -18,14 +18,6 @@
#
# === Parameters
#
# [*rabbit_bootstrap_node*]
# (Optional) The hostname of the rabbit node responsible for bootstrapping tasks
# Defaults to hiera('rabbitmq_short_bootstrap_node_name')
#
# [*oslomsg_rpc_bootstrap_node*]
# (Optional) The hostname of the rpc node responsible for bootstrapping tasks
# Defaults to hiera('oslo_messaging_rpc_short_bootstrap_node_name')
#
# [*erlang_cookie*]
# (Optional) Content of erlang cookie.
# Defaults to hiera('rabbitmq::erlang_cookie').
@ -36,34 +28,64 @@
# that the queues number will be CEIL(N/2) where N is the number of rabbitmq
# nodes. The special value of -1 represents the mode 'ha-mode: all'
#
# [*rabbit_nodes*]
# (Optional) The list of rabbitmq nodes names
# Defaults to hiera('rabbitmq_node_names')
# [*rpc_scheme*]
# (Optional) Protocol for oslo messaging rpc backend.
# Defaults to hiera('oslo_messaging_rpc_scheme').
#
# [*oslomsg_rpc_nodes*]
# (Optional) The list of oslo messaging rpc nodes names
# Defaults to hiera('oslo_messaging_rpc_node_names')
# [*rpc_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_rpc_bootstrap_node_name')
#
# [*rpc_nodes*]
# (Optional) Array of host(s) for oslo messaging rpc nodes.
# Defaults to hiera('oslo_messaging_rpc_node_names', []).
#
# [*notify_scheme*]
# (Optional) oslo messaging notify backend indicator.
# Defaults to hiera('oslo_messaging_notify_scheme').
#
# [*notify_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_notify_bootstrap_node_name')
#
# [*notify_nodes*]
# (Optional) Array of host(s) for oslo messaging notify nodes.
# Defaults to hiera('oslo_messaging_notify_node_names', []).
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
class tripleo::profile::pacemaker::rabbitmq (
$rabbit_bootstrap_node = hiera('rabbitmq_short_bootstrap_node_name', undef),
$oslomsg_rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name', undef),
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rabbit_nodes = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_nodes = hiera('oslo_messaging_rpc_node_names', undef),
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rpc_scheme = hiera('oslo_messaging_rpc_scheme'),
$rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name'),
$rpc_nodes = hiera('oslo_messaging_rpc_node_names', []),
$notify_scheme = hiera('oslo_messaging_notify_scheme'),
$notify_bootstrap_node = hiera('oslo_messaging_notify_short_bootstrap_node_name'),
$notify_nodes = hiera('oslo_messaging_notify_node_names', []),
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
) {
$bootstrap_node = pick($rabbit_bootstrap_node, $oslomsg_rpc_bootstrap_node, [])
if $rpc_scheme == 'rabbit' {
$bootstrap_node = $rpc_bootstrap_node
$rabbit_nodes = $rpc_nodes
} elsif $notify_scheme == 'rabbit' {
$bootstrap_node = $notify_bootstrap_node
$rabbit_nodes = $notify_nodes
} else {
$bootstrap_node = undef
$rabbit_nodes = []
}
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
@ -99,8 +121,7 @@ class tripleo::profile::pacemaker::rabbitmq (
include ::stdlib
# The default nr of ha queues is ceiling(N/2)
if $user_ha_queues == 0 {
$messaging_nodes = pick($rabbit_nodes, $oslomsg_rpc_nodes, [])
$nr_rabbit_nodes = size($messaging_nodes)
$nr_rabbit_nodes = size($rabbit_nodes)
$nr_ha_queues = $nr_rabbit_nodes / 2 + ($nr_rabbit_nodes % 2)
$params = "set_policy='ha-all ^(?!amq\\.).* {\"ha-mode\":\"exactly\",\"ha-params\":${nr_ha_queues}}'"
} elsif $user_ha_queues == -1 {

View File

@ -26,14 +26,6 @@
# (Optional) The bundle's pacemaker_remote control port on the host
# Defaults to hiera('tripleo::profile::pacemaker::rabbitmq_bundle::control_port', '3122')
#
# [*rabbit_bootstrap_node*]
# (Optional) The hostname of the rabbit node responsible for bootstrapping tasks
# Defaults to hiera('rabbitmq_short_bootstrap_node_name')
#
# [*oslomsg_rpc_bootstrap_node*]
# (Optional) The hostname of the rpc node responsible for bootstrapping tasks
# Defaults to hiera('oslo_messaging_rpc_short_bootstrap_node_name')
#
# [*erlang_cookie*]
# (Optional) Content of erlang cookie.
# Defaults to hiera('rabbitmq::erlang_cookie').
@ -44,52 +36,71 @@
# that the queues number will be CEIL(N/2) where N is the number of rabbitmq
# nodes.
#
# [*rabbit_nodes*]
# (Optional) The list of rabbitmq nodes names
# Defaults to hiera('rabbitmq_node_names', undef)
# [*rpc_scheme*]
# (Optional) Protocol for oslo messaging rpc backend.
# Defaults to hiera('oslo_messaging_rpc_scheme').
#
# [*oslomsg_rpc_nodes*]
# (Optional) The list of oslo messaging rpc nodes names
# Defaults to hiera('oslo_messaging_rpc_node_names', undef)
# [*rpc_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_rpc_bootstrap_node_name')
#
# [*rabbit_short_node_names*]
# (Optional) The list of rabbitmq short nodes names
# Defaults to hiera('rabbitmq_short_node_names', undef)
# [*rpc_nodes*]
# (Optional) Array of host(s) for oslo messaging rpc nodes.
# Defaults to hiera('oslo_messaging_rpc_node_names', []).
#
# [*oslomsg_rpc_short_node_names*]
# (Optional) The list of oslo messaging rpc shortnodes names
# Defaults to hiera('oslo_messaging_rpc_short_node_names', undef)
# [*notify_scheme*]
# (Optional) oslo messaging notify backend indicator.
# Defaults to hiera('oslo_messaging_notify_scheme').
#
# [*notify_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_notify_bootstrap_node_name')
#
# [*notify_nodes*]
# (Optional) Array of host(s) for oslo messaging notify nodes.
# Defaults to hiera('oslo_messaging_notify_node_names', []).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
class tripleo::profile::pacemaker::rabbitmq_bundle (
$rabbitmq_docker_image = hiera('tripleo::profile::pacemaker::rabbitmq_bundle::rabbitmq_docker_image', undef),
$rabbitmq_docker_control_port = hiera('tripleo::profile::pacemaker::rabbitmq_bundle::control_port', '3122'),
$rabbit_bootstrap_node = hiera('rabbitmq_short_bootstrap_node_name', undef),
$oslomsg_rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name', undef),
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rabbit_nodes = hiera('rabbitmq_node_names', undef),
$oslomsg_rpc_nodes = hiera('oslo_messaging_rpc_node_names', undef),
$rabbit_short_node_names = hiera('rabbitmq_short_node_names', undef),
$oslomsg_rpc_short_node_names = hiera('oslo_messaging_rpc_short_node_names', undef),
$rpc_scheme = hiera('oslo_messaging_rpc_scheme'),
$rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name'),
$rpc_nodes = hiera('oslo_messaging_rpc_node_names', []),
$notify_scheme = hiera('oslo_messaging_notify_scheme'),
$notify_bootstrap_node = hiera('oslo_messaging_notify_short_bootstrap_node_name'),
$notify_nodes = hiera('oslo_messaging_notify_node_names', []),
$enable_internal_tls = hiera('enable_internal_tls', false),
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
) {
$messaging_nodes = pick($rabbit_nodes, $oslomsg_rpc_nodes)
$bootstrap_node = pick($rabbit_bootstrap_node, $oslomsg_rpc_bootstrap_node, [])
if $rpc_scheme == 'rabbit' {
$bootstrap_node = $rpc_bootstrap_node
$rabbit_nodes = $rpc_nodes
} elsif $notify_scheme == 'rabbit' {
$bootstrap_node = $notify_bootstrap_node
$rabbit_nodes = $notify_nodes
} else {
$bootstrap_node = undef
$rabbit_nodes = []
}
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
@ -117,9 +128,13 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
if $step >= 2 {
if $pacemaker_master {
$messaging_short_node_names = pick($rabbit_short_node_names, $oslomsg_rpc_short_node_names, [])
$rabbitmq_nodes_count = count($messaging_short_node_names)
$messaging_short_node_names.each |String $node_name| {
if $rpc_scheme == 'rabbit' {
$rabbitmq_short_node_names = hiera('oslo_messaging_rpc_short_node_names')
} elsif $notify_scheme == 'rabbit' {
$rabbitmq_short_node_names = hiera('oslo_messaging_notify_short_node_names')
}
$rabbitmq_nodes_count = count($rabbitmq_short_node_names)
$rabbitmq_short_node_names.each |String $node_name| {
pacemaker::property { "rabbitmq-role-${node_name}":
property => 'rabbitmq-role',
value => true,
@ -216,7 +231,7 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
# The default nr of ha queues is ceiling(N/2)
if $user_ha_queues == 0 {
$nr_rabbit_nodes = size($messaging_nodes)
$nr_rabbit_nodes = size($rabbit_nodes)
$nr_ha_queues = $nr_rabbit_nodes / 2 + ($nr_rabbit_nodes % 2)
$params = "set_policy='ha-all ^(?!amq\\.).* {\"ha-mode\":\"exactly\",\"ha-params\":${nr_ha_queues}}'"
} elsif $user_ha_queues == -1 {
@ -242,7 +257,7 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
before => Exec['rabbitmq-ready'],
}
if size($messaging_nodes) == 1 {
if size($rabbit_nodes) == 1 {
$check_command = 'rabbitmqctl status | grep -F "{rabbit,"'
} else {
# This grep makes sure the rabbit app in erlang is up and running

View File

@ -0,0 +1,4 @@
---
features:
- Support separate oslo.messaging services for RPC and Notifications.
Enable separate messaging backend servers.

View File

@ -62,6 +62,9 @@ horizon_node_names:
- 'controller-1'
#Neutron related
neutron::rabbit_password: 'password'
# oslo.messaging related
oslo_messaging_rpc_password: 'password'
oslo_messaging_notify_password: 'password'
# Pacemaker related
pacemaker_short_bootstrap_node_name: 'node.example.com'
pacemaker_short_node_names: