Use rpc and notify transport_url for oslo_messaging backends

This commit adds the transport_url for specifying the oslo.messaging
rpc and notify transport schemes. The rpc or notification backend
can be one of rabbit, amqp, zmq, etc. Oslo.messaging is deprecating
the host, port and auth configuration options. All drivers will
get the options via the transport_url.

This patch:
* Adds transport_url to base services
* Updates the corresponding specs
* Adds to default hierdata

Depends-On: I1cf93d2caebfa1f7373c16754a2ad9bd15eb1a40

Change-Id: Iea5607dbb3ee6b1dd50acc1395de52dc920aa915
This commit is contained in:
Andrew Smith 2017-01-25 20:08:42 -05:00
parent 3cea0982f9
commit e1a1a5cbed
45 changed files with 1017 additions and 334 deletions

View File

@ -27,19 +27,64 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks # (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid') # Defaults to hiera('bootstrap_nodeid')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_port', 5672) # Defaults to hiera('aodh::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('aodh::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('aodh::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('aodh::rabbit_use_ssl', '0')
class tripleo::profile::base::aodh ( class tripleo::profile::base::aodh (
$step = hiera('step'), $step = hiera('step'),
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('aodh::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
@ -49,9 +94,24 @@ class tripleo::profile::base::aodh (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::aodh' : class { '::aodh' :
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::aodh::auth include ::aodh::auth
include ::aodh::config include ::aodh::config

View File

@ -56,6 +56,50 @@
# for more details. # for more details.
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('barbican::api::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('barbican::api::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('barbican::api::rabbit_use_ssl', '0')
class tripleo::profile::base::barbican::api ( class tripleo::profile::base::barbican::api (
$barbican_network = hiera('barbican_api_network', undef), $barbican_network = hiera('barbican_api_network', undef),
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
@ -63,6 +107,17 @@ class tripleo::profile::base::barbican::api (
$enable_internal_tls = hiera('enable_internal_tls', false), $enable_internal_tls = hiera('enable_internal_tls', false),
$generate_service_certificates = hiera('generate_service_certificates', false), $generate_service_certificates = hiera('generate_service_certificates', false),
$step = hiera('step'), $step = hiera('step'),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -92,8 +147,25 @@ class tripleo::profile::base::barbican::api (
} }
if $step >= 4 or ( $step >= 3 and $sync_db ) { if $step >= 4 or ( $step >= 3 and $sync_db ) {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::barbican::api': class { '::barbican::api':
sync_db => $sync_db sync_db => $sync_db,
default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::barbican::keystone::authtoken include ::barbican::keystone::authtoken
include ::barbican::api::logging include ::barbican::api::logging

View File

@ -23,24 +23,84 @@
# for more details. # for more details.
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_port', 5672) # Defaults to hiera('ceilometer::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('ceilometer::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('ceilometer::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('ceilometer::rabbit_use_ssl', '0')
class tripleo::profile::base::ceilometer ( class tripleo::profile::base::ceilometer (
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('ceilometer::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $step >= 3 { if $step >= 3 {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::ceilometer' : class { '::ceilometer' :
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::ceilometer::config include ::ceilometer::config
} }

View File

@ -30,20 +30,65 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_port', 5672) # Defaults to hiera('cinder::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('cinder::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('cinder::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('cinder::rabbit_use_ssl', '0')
class tripleo::profile::base::cinder ( class tripleo::profile::base::cinder (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$cinder_enable_db_purge = true, $cinder_enable_db_purge = true,
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('cinder::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -52,9 +97,26 @@ class tripleo::profile::base::cinder (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::cinder' : class { '::cinder' :
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
}
class { '::cinder::ceilometer' :
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::cinder::config include ::cinder::config
include ::cinder::glance include ::cinder::glance

View File

@ -22,43 +22,43 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks # (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid') # Defaults to hiera('bootstrap_nodeid')
# #
# [*messaging_driver*]
# Driver for messaging service.
# Defaults to hiera('messaging_service_name', 'rabbit')
#
# [*messaging_hosts*]
# list of the messaging host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*messaging_password*]
# Password for messaging congress queue
# Defaults to hiera('congress::rabbit_password')
#
# [*messaging_port*]
# IP port for messaging service
# Defaults to hiera('congress::rabbit_port', 5672)
#
# [*messaging_username*]
# Username for messaging congress queue
# Defaults to hiera('congress::rabbit_userid', 'guest')
#
# [*messaging_use_ssl*]
# Flag indicating ssl usage.
# Defaults to hiera('congress::rabbit_use_ssl', '0')
#
# [*step*] # [*step*]
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('congress::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('congress::rabbit_use_ssl', '0')
class tripleo::profile::base::congress ( class tripleo::profile::base::congress (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$messaging_driver = hiera('messaging_service_name', 'rabbit'),
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$messaging_password = hiera('congress::rabbit_password'),
$messaging_port = hiera('congress::rabbit_port', '5672'),
$messaging_username = hiera('congress::rabbit_userid', 'guest'),
$messaging_use_ssl = hiera('congress::rabbit_use_ssl', '0'),
$step = hiera('step'), $step = hiera('step'),
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -67,16 +67,16 @@ class tripleo::profile::base::congress (
} }
if $step >= 4 or ($step >= 3 and $sync_db){ if $step >= 4 or ($step >= 3 and $sync_db){
$messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($messaging_use_ssl))) $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::congress': class { '::congress':
sync_db => $sync_db, sync_db => $sync_db,
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
'transport' => $messaging_driver, 'transport' => $oslomsg_rpc_proto,
'hosts' => $messaging_hosts, 'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $messaging_port), 'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $messaging_username, 'username' => $oslomsg_rpc_username,
'password' => $messaging_password, 'password' => $oslomsg_rpc_password,
'ssl' => $messaging_use_ssl_real, 'ssl' => $oslomsg_use_ssl_real,
}), }),
} }

View File

@ -26,30 +26,6 @@
# (Optional) Whether keystone token flushing should be enabled # (Optional) Whether keystone token flushing should be enabled
# Defaults to hiera('keystone_enable_db_purge', true) # Defaults to hiera('keystone_enable_db_purge', true)
# #
# [*messaging_driver*]
# Driver for messaging service.
# Defaults to hiera('messaging_service_name', 'rabbit')
#
# [*messaging_hosts*]
# list of the messaging host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*messaging_password*]
# Password for messaging heat queue
# Defaults to hiera('heat::rabbit_password')
#
# [*messaging_port*]
# IP port for messaging service
# Defaults to hiera('heat::rabbit_port', 5672)
#
# [*messaging_username*]
# Username for messaging heat queue
# Defaults to hiera('heat::rabbit_userid', 'guest')
#
# [*messaging_use_ssl*]
# Flag indicating ssl usage.
# Defaults to hiera('heat::rabbit_use_ssl', '0')
#
# [*notification_driver*] # [*notification_driver*]
# (Optional) Heat notification driver to use. # (Optional) Heat notification driver to use.
# Defaults to 'messaging' # Defaults to 'messaging'
@ -59,18 +35,66 @@
# for more details. # for more details.
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('heat::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('heat::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('heat::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('heat::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('heat::rabbit_use_ssl', '0')
class tripleo::profile::base::heat ( class tripleo::profile::base::heat (
$bootstrap_node = downcase(hiera('bootstrap_nodeid')), $bootstrap_node = downcase(hiera('bootstrap_nodeid')),
$manage_db_purge = hiera('heat_enable_db_purge', true), $manage_db_purge = hiera('heat_enable_db_purge', true),
$messaging_driver = hiera('messaging_service_name', 'rabbit'), $notification_driver = 'messaging',
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)), $step = hiera('step'),
$messaging_password = hiera('heat::rabbit_password'), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$messaging_port = hiera('heat::rabbit_port', '5672'), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$messaging_username = hiera('heat::rabbit_userid', 'guest'), $oslomsg_rpc_password = hiera('heat::rabbit_password'),
$messaging_use_ssl = hiera('heat::rabbit_use_ssl', '0'), $oslomsg_rpc_port = hiera('heat::rabbit_port', '5672'),
$notification_driver = 'messaging', $oslomsg_rpc_username = hiera('heat::rabbit_userid', 'guest'),
$step = hiera('step'), $oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('rabbitmq_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'),
) { ) {
# Domain resources will be created at step5 on the node running keystone.pp # 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. # configure heat.conf at step3 and 4 but actually create the domain later.
@ -81,19 +105,27 @@ class tripleo::profile::base::heat (
manage_role => false, manage_role => false,
} }
$messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($messaging_use_ssl))) $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
# TODO(ccamacho): remove sprintf once we properly type the port, needs # TODO(ccamacho): remove sprintf once we properly type the port, needs
# to be a string for the os_transport_url function. # to be a string for the os_transport_url function.
class { '::heat' : class { '::heat' :
notification_driver => $notification_driver, notification_driver => $notification_driver,
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
'transport' => $messaging_driver, 'transport' => $oslomsg_rpc_proto,
'hosts' => $messaging_hosts, 'hosts' => $oslomsg_rpc_hosts,
'password' => $messaging_password, 'port' => sprintf('%s', $oslomsg_rpc_port),
'port' => sprintf('%s', $messaging_port), 'username' => $oslomsg_rpc_username,
'username' => $messaging_username, 'password' => $oslomsg_rpc_password,
'ssl' => $messaging_use_ssl_real, 'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}), }),
} }
include ::heat::config include ::heat::config

View File

@ -26,19 +26,39 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_port', 5672) # Defaults to hiera('ironic::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('ironic::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('ironic::rabbit_use_ssl', '0')
class tripleo::profile::base::ironic ( class tripleo::profile::base::ironic (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('ironic::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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'),
) { ) {
# Database is accessed by both API and conductor, hence it's here. # Database is accessed by both API and conductor, hence it's here.
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
@ -48,10 +68,17 @@ class tripleo::profile::base::ironic (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::ironic': class { '::ironic':
sync_db => $sync_db, sync_db => $sync_db,
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::ironic::config include ::ironic::config

View File

@ -76,15 +76,50 @@
# This is set by t-h-t. # This is set by t-h-t.
# Defaults to hiera('keystone_public_api_network', undef) # Defaults to hiera('keystone_public_api_network', undef)
# #
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_hosts*]
# list of the rabbbit host fqdns # list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_port', 5672) # Defaults to hiera('keystone::rabbit_port', 5672)
# #
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('keystone::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('keystone::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('keystone::rabbit_use_ssl', '0')
#
# [*step*] # [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates # (Optional) The current step in deployment. See tripleo-heat-templates
# for more details. # for more details.
@ -102,8 +137,17 @@ class tripleo::profile::base::keystone (
$heat_admin_user = undef, $heat_admin_user = undef,
$manage_db_purge = hiera('keystone_enable_db_purge', true), $manage_db_purge = hiera('keystone_enable_db_purge', true),
$public_endpoint_network = hiera('keystone_public_api_network', undef), $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'),
$rabbit_port = hiera('keystone::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
$step = hiera('step'), $step = hiera('step'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
@ -142,11 +186,26 @@ class tripleo::profile::base::keystone (
} }
if $step >= 4 or ( $step >= 3 and $sync_db ) { if $step >= 4 or ( $step >= 3 and $sync_db ) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::keystone': class { '::keystone':
sync_db => $sync_db, sync_db => $sync_db,
enable_bootstrap => $sync_db, enable_bootstrap => $sync_db,
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::keystone::config include ::keystone::config

View File

@ -26,19 +26,64 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_port', 5672) # Defaults to hiera('manila::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('manila::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('manila::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('manila::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('manila::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('manila::rabbit_use_ssl', '0')
class tripleo::profile::base::manila ( class tripleo::profile::base::manila (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('manila::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -47,9 +92,24 @@ class tripleo::profile::base::manila (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::manila' : class { '::manila' :
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::manila::config include ::manila::config
} }

View File

@ -27,19 +27,64 @@
# for more details. # for more details.
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_port', 5672) # Defaults to hiera('mistral::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('mistral::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('mistral::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('mistral::rabbit_use_ssl', '0')
class tripleo::profile::base::mistral ( class tripleo::profile::base::mistral (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('mistral::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -48,9 +93,24 @@ class tripleo::profile::base::mistral (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::mistral': class { '::mistral':
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::mistral::config include ::mistral::config
include ::mistral::client include ::mistral::client

View File

@ -22,23 +22,83 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_port', 5672 # Defaults to hiera('neutron::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('neutron::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('neutron::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('neutron::rabbit_use_ssl', '0')
class tripleo::profile::base::neutron ( class tripleo::profile::base::neutron (
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('neutron::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$oslomsg_rpc_password = hiera('neutron::rabbit_password'),
$oslomsg_rpc_port = hiera('neutron::rabbit_port', '5672'),
$oslomsg_rpc_username = hiera('neutron::rabbit_userid', 'guest'),
$oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$oslomsg_notify_password = hiera('neutron::rabbit_password'),
$oslomsg_notify_port = hiera('neutron::rabbit_port', '5672'),
$oslomsg_notify_username = hiera('neutron::rabbit_userid', 'guest'),
$oslomsg_use_ssl = hiera('neutron::rabbit_use_ssl', '0'),
) { ) {
if $step >= 3 { if $step >= 3 {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::neutron' : class { '::neutron' :
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::neutron::config include ::neutron::config
} }

View File

@ -30,28 +30,48 @@
# (Optional) Whether or not manage Nova Live migration # (Optional) Whether or not manage Nova Live migration
# Defaults to false # Defaults to false
# #
# [*messaging_driver*] # [*oslomsg_rpc_proto*]
# Driver for messaging service. # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_service_name', 'rabbit') # Defaults to hiera('messaging_rpc_service_name', rabbit)
# #
# [*messaging_hosts*] # [*oslomsg_rpc_hosts*]
# list of the messaging host fqdns # list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*messaging_password*] # [*oslomsg_rpc_port*]
# Password for messaging nova queue # IP port for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_password')
#
# [*messaging_port*]
# IP port for messaging service
# Defaults to hiera('nova::rabbit_port', 5672) # Defaults to hiera('nova::rabbit_port', 5672)
# #
# [*messaging_username*] # [*oslomsg_rpc_username*]
# Username for messaging nova queue # Username for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_userid', 'guest') # Defaults to hiera('nova::rabbit_userid', 'guest')
# #
# [*messaging_use_ssl*] # [*oslomsg_rpc_password*]
# Flag indicating ssl usage. # Password for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('nova::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('nova::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('nova::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('nova::rabbit_use_ssl', '0') # Defaults to hiera('nova::rabbit_use_ssl', '0')
# #
# [*nova_compute_enabled*] # [*nova_compute_enabled*]
@ -63,17 +83,22 @@
# Defaults to hiera('step') # Defaults to hiera('step')
# #
class tripleo::profile::base::nova ( class tripleo::profile::base::nova (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$libvirt_enabled = false, $libvirt_enabled = false,
$manage_migration = false, $manage_migration = false,
$messaging_driver = hiera('messaging_service_name', 'rabbit'), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$messaging_password = hiera('nova::rabbit_password'), $oslomsg_rpc_password = hiera('nova::rabbit_password'),
$messaging_port = hiera('nova::rabbit_port', '5672'), $oslomsg_rpc_port = hiera('nova::rabbit_port', '5672'),
$messaging_username = hiera('nova::rabbit_userid', 'guest'), $oslomsg_rpc_username = hiera('nova::rabbit_userid', 'guest'),
$messaging_use_ssl = hiera('nova::rabbit_use_ssl', '0'), $oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
$nova_compute_enabled = false, $oslomsg_notify_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$step = hiera('step'), $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'),
$nova_compute_enabled = false,
$step = hiera('step'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -88,17 +113,25 @@ class tripleo::profile::base::nova (
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
$messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($messaging_use_ssl))) $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
# TODO(ccamacho): remove sprintf once we properly type the port, needs # TODO(ccamacho): remove sprintf once we properly type the port, needs
# to be a string for the os_transport_url function. # to be a string for the os_transport_url function.
class { '::nova' : class { '::nova' :
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
'transport' => $messaging_driver, 'transport' => $oslomsg_rpc_proto,
'hosts' => $messaging_hosts, 'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $messaging_port), 'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $messaging_username, 'username' => $oslomsg_rpc_username,
'password' => $messaging_password, 'password' => $oslomsg_rpc_password,
'ssl' => $messaging_use_ssl_real, 'ssl' => $oslomsg_use_ssl_real,
}),
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}), }),
} }
include ::nova::config include ::nova::config

View File

@ -22,35 +22,50 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_user*] # [*oslomsg_rpc_proto*]
# [*rabbit_password*] # Protocol driver for the oslo messaging rpc service
# (Optional) RabbitMQ user details # Defaults to hiera('messaging_rpc_service_name', rabbit)
# Defaults to undef
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_hosts*]
# list of the rabbbit host fqdns # list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to 5672. # Defaults to hiera('octavia::rabbit_port', 5672)
# #
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('octavia::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('octavia::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('octavia::rabbit_use_ssl', '0')
class tripleo::profile::base::octavia ( class tripleo::profile::base::octavia (
$step = hiera('step'), $step = hiera('step'),
$rabbit_user = undef, $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_password = undef, $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_password = hiera('octavia::rabbit_password'),
$rabbit_port = '5672' $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'),
) { ) {
if $step >= 3 { if $step >= 3 {
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::octavia' : class { '::octavia' :
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
'transport' => 'rabbit', 'transport' => $oslomsg_rpc_proto,
'hosts' => $rabbit_hosts, 'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $rabbit_port), 'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $rabbit_user, 'username' => $oslomsg_rpc_username,
'password' => $rabbit_password 'password' => $oslomsg_rpc_password,
}) 'ssl' => $oslomsg_use_ssl_real,
}),
} }
include ::octavia::config include ::octavia::config
} }

View File

@ -26,19 +26,64 @@
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
# [*rabbit_hosts*] # [*oslomsg_rpc_proto*]
# list of the rabbbit host fqdns # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_rpc_service_name', rabbit)
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*rabbit_port*] # [*oslomsg_rpc_port*]
# IP port for rabbitmq service # IP port for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_port', 5672) # Defaults to hiera('sahara::rabbit_port', 5672)
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_userid', 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('sahara::rabbit_password')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('messaging_notify_service_name', rabbit)
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('rabbitmq_node_names')
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_port', 5672)
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_userid', 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('sahara::rabbit_password')
#
# [*oslomsg_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('sahara::rabbit_use_ssl', '0')
class tripleo::profile::base::sahara ( class tripleo::profile::base::sahara (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'), $step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_names', undef), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$rabbit_port = hiera('sahara::rabbit_port', 5672), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
$sync_db = true $sync_db = true
@ -47,10 +92,27 @@ class tripleo::profile::base::sahara (
} }
if $step >= 4 or ($step >= 3 and $sync_db){ if $step >= 4 or ($step >= 3 and $sync_db){
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}") $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::sahara': class { '::sahara':
sync_db => $sync_db, sync_db => $sync_db,
rabbit_hosts => $rabbit_endpoints, default_transport_url => os_transport_url({
'transport' => $oslomsg_rpc_proto,
'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $oslomsg_rpc_username,
'password' => $oslomsg_rpc_password,
'ssl' => $oslomsg_use_ssl_real,
}),
}
class { '::sahara::notify':
notification_transport_url => os_transport_url({
'transport' => $oslomsg_notify_proto,
'hosts' => $oslomsg_notify_hosts,
'port' => sprintf('%s', $oslomsg_notify_port),
'username' => $oslomsg_notify_username,
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
} }
} }
} }

View File

@ -24,7 +24,7 @@
# #
# [*ceilometer_messaging_driver*] # [*ceilometer_messaging_driver*]
# Driver for messaging service. # Driver for messaging service.
# Defaults to hiera('messaging_service_name', 'rabbit') # Defaults to hiera('messaging_notify_service_name', 'rabbit')
# #
# [*ceilometer_messaging_hosts*] # [*ceilometer_messaging_hosts*]
# list of the messaging host fqdns # list of the messaging host fqdns
@ -61,7 +61,7 @@
# #
class tripleo::profile::base::swift::proxy ( class tripleo::profile::base::swift::proxy (
$ceilometer_enabled = true, $ceilometer_enabled = true,
$ceilometer_messaging_driver = hiera('messaging_service_name', 'rabbit'), $ceilometer_messaging_driver = hiera('messaging_notify_service_name', 'rabbit'),
$ceilometer_messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)), $ceilometer_messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$ceilometer_messaging_password = hiera('swift::proxy::ceilometer::rabbit_password', 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_port = hiera('tripleo::profile::base::swift::proxy::rabbit_port', '5672'),

View File

@ -22,29 +22,29 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks # (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid') # Defaults to hiera('bootstrap_nodeid')
# #
# [*messaging_driver*] # [*oslomsg_rpc_proto*]
# Driver for messaging service. # Protocol driver for the oslo messaging rpc service
# Defaults to hiera('messaging_service_name', 'rabbit') # Defaults to hiera('messaging_rpc_service_name', rabbit)
# #
# [*messaging_hosts*] # [*oslomsg_rpc_hosts*]
# list of the messaging host fqdns # list of the oslo messaging rpc host fqdns
# Defaults to hiera('rabbitmq_node_names') # Defaults to hiera('rabbitmq_node_names')
# #
# [*messaging_password*] # [*oslomsg_rpc_port*]
# Password for messaging nova queue # IP port for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_password') # Defaults to hiera('tacker::rabbit_port', 5672)
# #
# [*messaging_port*] # [*oslomsg_rpc_username*]
# IP port for messaging service # Username for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_port', 5672) # Defaults to hiera('tacker::rabbit_userid', 'guest')
# #
# [*messaging_username*] # [*oslomsg_rpc_password*]
# Username for messaging nova queue # Password for oslo messaging rpc service
# Defaults to hiera('nova::rabbit_userid', 'guest') # Defaults to hiera('tacker::rabbit_password')
# #
# [*messaging_use_ssl*] # [*oslomsg_use_ssl*]
# Flag indicating ssl usage. # Enable ssl oslo messaging services
# Defaults to hiera('nova::rabbit_use_ssl', '0') # Defaults to hiera('tacker::rabbit_use_ssl', '0')
# #
# [*step*] # [*step*]
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
@ -52,12 +52,12 @@
class tripleo::profile::base::tacker ( class tripleo::profile::base::tacker (
$bootstrap_node = hiera('bootstrap_nodeid', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$messaging_driver = hiera('messaging_service_name', 'rabbit'), $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)), $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
$messaging_password = hiera('tacker::rabbit_password'), $oslomsg_rpc_password = hiera('tacker::rabbit_password'),
$messaging_port = hiera('tacker::rabbit_port', '5672'), $oslomsg_rpc_port = hiera('tacker::rabbit_port', '5672'),
$messaging_username = hiera('tacker::rabbit_userid', 'guest'), $oslomsg_rpc_username = hiera('tacker::rabbit_userid', 'guest'),
$messaging_use_ssl = hiera('tacker::rabbit_use_ssl', '0'), $oslomsg_use_ssl = hiera('tacker::rabbit_use_ssl', '0'),
$step = hiera('step'), $step = hiera('step'),
) { ) {
if $::hostname == downcase($bootstrap_node) { if $::hostname == downcase($bootstrap_node) {
@ -67,16 +67,16 @@ class tripleo::profile::base::tacker (
} }
if $step >= 4 or ($step >= 3 and $sync_db){ if $step >= 4 or ($step >= 3 and $sync_db){
$messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($messaging_use_ssl))) $oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
class { '::tacker': class { '::tacker':
sync_db => $sync_db, sync_db => $sync_db,
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
'transport' => $messaging_driver, 'transport' => $oslomsg_rpc_proto,
'hosts' => $messaging_hosts, 'hosts' => $oslomsg_rpc_hosts,
'port' => sprintf('%s', $messaging_port), 'port' => sprintf('%s', $oslomsg_rpc_port),
'username' => $messaging_username, 'username' => $oslomsg_rpc_username,
'password' => $messaging_password, 'password' => $oslomsg_rpc_password,
'ssl' => $messaging_use_ssl_real, 'ssl' => $oslomsg_use_ssl_real,
}), }),
} }

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::aodh::api' do describe 'tripleo::profile::base::aodh::api' do
shared_examples_for 'tripleo::profile::base::aodh::api' do shared_examples_for 'tripleo::profile::base::aodh::api' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::aodh': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::aodh': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::aodh::evaluator' do describe 'tripleo::profile::base::aodh::evaluator' do
shared_examples_for 'tripleo::profile::base::aodh::evaluator' do shared_examples_for 'tripleo::profile::base::aodh::evaluator' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::aodh': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::aodh': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::aodh::listener' do describe 'tripleo::profile::base::aodh::listener' do
shared_examples_for 'tripleo::profile::base::aodh::listener' do shared_examples_for 'tripleo::profile::base::aodh::listener' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::aodh': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::aodh': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::aodh::notifier' do describe 'tripleo::profile::base::aodh::notifier' do
shared_examples_for 'tripleo::profile::base::aodh::notifier' do shared_examples_for 'tripleo::profile::base::aodh::notifier' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::aodh': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::aodh': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -34,12 +34,14 @@ describe 'tripleo::profile::base::aodh' do
let(:params) { { let(:params) { {
:step => 3, :step => 3,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:rabbit_hosts => ['localhost1.localdomain', 'localhost2.localdomain'] :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:oslomsg_rpc_username => 'aodh',
:oslomsg_rpc_password => 'foo',
} } } }
it 'should trigger complete configuration' do it 'should trigger complete configuration' do
is_expected.to contain_class('aodh').with( is_expected.to contain_class('aodh').with(
:rabbit_hosts => params[:rabbit_hosts].map { |h| h + ":5672" } :default_transport_url => 'rabbit://aodh:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('aodh::auth') is_expected.to contain_class('aodh::auth')
is_expected.to contain_class('aodh::config') is_expected.to contain_class('aodh::config')
@ -67,12 +69,14 @@ describe 'tripleo::profile::base::aodh' do
let(:params) { { let(:params) { {
:step => 4, :step => 4,
:bootstrap_node => 'somethingelse.example.com', :bootstrap_node => 'somethingelse.example.com',
:rabbit_hosts => ['localhost1.localdomain', 'localhost2.localdomain'] :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:oslomsg_rpc_username => 'aodh',
:oslomsg_rpc_password => 'foo',
} } } }
it 'should trigger aodh configuration without mysql grant' do it 'should trigger aodh configuration without mysql grant' do
is_expected.to contain_class('aodh').with( is_expected.to contain_class('aodh').with(
:rabbit_hosts => params[:rabbit_hosts].map { |h| h + ":5672" } :default_transport_url => 'rabbit://aodh:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('aodh::auth') is_expected.to contain_class('aodh::auth')
is_expected.to contain_class('aodh::config') is_expected.to contain_class('aodh::config')

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::ceilometer::api' do describe 'tripleo::profile::base::ceilometer::api' do
shared_examples_for 'tripleo::profile::base::ceilometer::api' do shared_examples_for 'tripleo::profile::base::ceilometer::api' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::ceilometer::collector' do describe 'tripleo::profile::base::ceilometer::collector' do
shared_examples_for 'tripleo::profile::base::ceilometer::collector' do shared_examples_for 'tripleo::profile::base::ceilometer::collector' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step 3 on bootstrap node with mongodb' do context 'with step 3 on bootstrap node with mongodb' do

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::ceilometer::expirer' do describe 'tripleo::profile::base::ceilometer::expirer' do
shared_examples_for 'tripleo::profile::base::ceilometer::expirer' do shared_examples_for 'tripleo::profile::base::ceilometer::expirer' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }" "class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -30,12 +30,14 @@ describe 'tripleo::profile::base::ceilometer' do
context 'with step 3' do context 'with step 3' do
let(:params) { { let(:params) { {
:step => 3, :step => 3,
:rabbit_hosts => ['localhost1.localdomain', 'localhost2.localdomain'] :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:oslomsg_rpc_username => 'ceilometer',
:oslomsg_rpc_password => 'foo',
} } } }
it 'should trigger complete configuration' do it 'should trigger complete configuration' do
is_expected.to contain_class('ceilometer').with( is_expected.to contain_class('ceilometer').with(
:rabbit_hosts => params[:rabbit_hosts].map{ |h| h + ':5672' } :default_transport_url => 'rabbit://ceilometer:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('ceilometer::config') is_expected.to contain_class('ceilometer::config')
end end

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::cinder::api' do describe 'tripleo::profile::base::cinder::api' do
shared_examples_for 'tripleo::profile::base::cinder::api' do shared_examples_for 'tripleo::profile::base::cinder::api' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }" "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }"
end end
context 'with step less than 3' do context 'with step less than 3' do

View File

@ -20,7 +20,7 @@ describe 'tripleo::profile::base::cinder::backup::ceph' do
shared_examples_for 'tripleo::profile::base::cinder::backup::ceph' do shared_examples_for 'tripleo::profile::base::cinder::backup::ceph' do
let(:pre_condition) do let(:pre_condition) do
<<-EOF <<-EOF
class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] } class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }
class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} } class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} }
EOF EOF
end end

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::cinder::backup' do describe 'tripleo::profile::base::cinder::backup' do
shared_examples_for 'tripleo::profile::base::cinder::backup' do shared_examples_for 'tripleo::profile::base::cinder::backup' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }" "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -20,7 +20,7 @@ describe 'tripleo::profile::base::cinder::backup::swift' do
shared_examples_for 'tripleo::profile::base::cinder::backup::swift' do shared_examples_for 'tripleo::profile::base::cinder::backup::swift' do
let(:pre_condition) do let(:pre_condition) do
<<-EOF <<-EOF
class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] } class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }
class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} } class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} }
EOF EOF
end end

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::cinder::scheduler' do describe 'tripleo::profile::base::cinder::scheduler' do
shared_examples_for 'tripleo::profile::base::cinder::scheduler' do shared_examples_for 'tripleo::profile::base::cinder::scheduler' do
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }" "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -31,15 +31,17 @@ describe 'tripleo::profile::base::cinder' do
context 'with step 3 on bootstrap node' do context 'with step 3 on bootstrap node' do
let(:params) { { let(:params) { {
:step => 3, :step => 3,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'], :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:rabbit_port => '1234' :oslomsg_rpc_username => 'cinder',
:oslomsg_rpc_password => 'foo',
:oslomsg_rpc_port => '1234'
} } } }
it 'should trigger complete configuration' do it 'should trigger complete configuration' do
is_expected.to contain_class('cinder').with( is_expected.to contain_class('cinder').with(
:rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:#{params[:rabbit_port]}" } :default_transport_url => 'rabbit://cinder:foo@127.0.0.1:1234/?ssl=0'
) )
is_expected.to contain_class('cinder::config') is_expected.to contain_class('cinder::config')
is_expected.to contain_class('cinder::glance') is_expected.to contain_class('cinder::glance')
@ -63,15 +65,17 @@ describe 'tripleo::profile::base::cinder' do
context 'with step 4 on other node' do context 'with step 4 on other node' do
let(:params) { { let(:params) { {
:step => 4, :step => 4,
:bootstrap_node => 'somethingelse.example.com', :bootstrap_node => 'somethingelse.example.com',
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'], :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:rabbit_port => '5672' :oslomsg_rpc_username => 'cinder',
:oslomsg_rpc_password => 'foo',
:oslomsg_rpc_port => '5672',
} } } }
it 'should trigger cinder configuration without mysql grant' do it 'should trigger cinder configuration without mysql grant' do
is_expected.to contain_class('cinder').with( is_expected.to contain_class('cinder').with(
:rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:#{params[:rabbit_port]}" } :default_transport_url => 'rabbit://cinder:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('cinder::config') is_expected.to contain_class('cinder::config')
is_expected.to contain_class('cinder::glance') is_expected.to contain_class('cinder::glance')
@ -81,14 +85,16 @@ describe 'tripleo::profile::base::cinder' do
context 'with step 5' do context 'with step 5' do
let(:params) { { let(:params) { {
:step => 5, :step => 5,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'] :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:oslomsg_rpc_username => 'cinder',
:oslomsg_rpc_password => 'foo',
} } } }
it 'should trigger complete configuration' do it 'should trigger complete configuration' do
is_expected.to contain_class('cinder').with( is_expected.to contain_class('cinder').with(
:rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:5672" } :default_transport_url => 'rabbit://cinder:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('cinder::config') is_expected.to contain_class('cinder::config')
is_expected.to contain_class('cinder::glance') is_expected.to contain_class('cinder::glance')
@ -98,15 +104,17 @@ describe 'tripleo::profile::base::cinder' do
context 'with step 5 without db_purge' do context 'with step 5 without db_purge' do
let(:params) { { let(:params) { {
:step => 5, :step => 5,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'], :oslomsg_rpc_hosts => [ '127.0.0.1' ],
:oslomsg_rpc_username => 'cinder',
:oslomsg_rpc_password => 'foo',
:cinder_enable_db_purge => false :cinder_enable_db_purge => false
} } } }
it 'should trigger complete configuration' do it 'should trigger complete configuration' do
is_expected.to contain_class('cinder').with( is_expected.to contain_class('cinder').with(
:rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:5672" } :default_transport_url => 'rabbit://cinder:foo@127.0.0.1:5672/?ssl=0'
) )
is_expected.to contain_class('cinder::config') is_expected.to contain_class('cinder::config')
is_expected.to contain_class('cinder::glance') is_expected.to contain_class('cinder::glance')

View File

@ -1,3 +1,4 @@
# coding: utf-8
# #
# Copyright (C) 2016 Red Hat, Inc. # Copyright (C) 2016 Red Hat, Inc.
# #
@ -27,7 +28,7 @@ describe 'tripleo::profile::base::cinder::volume' do
end end
let(:pre_condition) do let(:pre_condition) do
"class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }" "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, oslomsg_rpc_hosts => ['127.0.0.1'] }"
end end
context 'with step less than 4' do context 'with step less than 4' do

View File

@ -22,9 +22,9 @@ describe 'tripleo::profile::base::nova::api' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ 'localhost' ], oslomsg_rpc_hosts => [ 'localhost' ],
messaging_username => 'nova', oslomsg_rpc_username => 'nova',
messaging_password => 'foo' oslomsg_rpc_password => 'foo'
} }
eos eos
end end

View File

@ -35,7 +35,7 @@ describe 'tripleo::profile::base::nova::compute::ironic' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
class { '::tripleo::profile::base::nova::compute': class { '::tripleo::profile::base::nova::compute':
step => #{params[:step]}, step => #{params[:step]},

View File

@ -36,7 +36,7 @@ describe 'tripleo::profile::base::nova::compute::libvirt' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
class { '::tripleo::profile::base::nova::compute': class { '::tripleo::profile::base::nova::compute':
step => #{params[:step]}, step => #{params[:step]},

View File

@ -37,7 +37,7 @@ describe 'tripleo::profile::base::nova::compute' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -22,7 +22,7 @@ describe 'tripleo::profile::base::nova::conductor' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -34,7 +34,7 @@ describe 'tripleo::profile::base::nova::consoleauth' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -37,7 +37,7 @@ describe 'tripleo::profile::base::nova::libvirt' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -35,7 +35,7 @@ describe 'tripleo::profile::base::nova::scheduler' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -22,8 +22,8 @@ describe 'tripleo::profile::base::nova' do
context 'with step less than 3' do context 'with step less than 3' do
let(:params) { { let(:params) { {
:step => 1, :step => 1,
:messaging_hosts => [ 'localhost' ], :oslomsg_rpc_hosts => [ 'localhost' ],
:messaging_password => 'foo' :oslomsg_rpc_password => 'foo'
} } } }
it { it {
@ -38,9 +38,9 @@ describe 'tripleo::profile::base::nova' do
let(:params) { { let(:params) { {
:step => 3, :step => 3,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:messaging_hosts => [ 'localhost' ], :oslomsg_rpc_hosts => [ 'localhost' ],
:messaging_username => 'nova', :oslomsg_rpc_username => 'nova',
:messaging_password => 'foo', :oslomsg_rpc_password => 'foo',
} } } }
it { it {
@ -62,8 +62,8 @@ describe 'tripleo::profile::base::nova' do
let(:params) { { let(:params) { {
:step => 3, :step => 3,
:bootstrap_node => 'other.example.com', :bootstrap_node => 'other.example.com',
:messaging_hosts => [ 'localhost' ], :oslomsg_rpc_hosts => [ 'localhost' ],
:messaging_password => 'foo' :oslomsg_rpc_password => 'foo'
} } } }
it { it {
@ -79,8 +79,8 @@ describe 'tripleo::profile::base::nova' do
let(:params) { { let(:params) { {
:step => 4, :step => 4,
:bootstrap_node => 'other.example.com', :bootstrap_node => 'other.example.com',
:messaging_hosts => [ 'localhost' ], :oslomsg_rpc_hosts => [ 'localhost' ],
:messaging_password => 'foo', :oslomsg_rpc_password => 'foo',
} } } }
it { it {
@ -103,8 +103,8 @@ describe 'tripleo::profile::base::nova' do
:manage_migration => true, :manage_migration => true,
:nova_compute_enabled => true, :nova_compute_enabled => true,
:bootstrap_node => 'node.example.com', :bootstrap_node => 'node.example.com',
:messaging_hosts => [ 'localhost' ], :oslomsg_rpc_hosts => [ 'localhost' ],
:messaging_password => 'foo', :oslomsg_rpc_password => 'foo',
} } } }
it { it {

View File

@ -34,7 +34,7 @@ describe 'tripleo::profile::base::nova::vncproxy' do
<<-eos <<-eos
class { '::tripleo::profile::base::nova': class { '::tripleo::profile::base::nova':
step => #{params[:step]}, step => #{params[:step]},
messaging_hosts => [ '127.0.0.1' ], oslomsg_rpc_hosts => [ '127.0.0.1' ],
} }
eos eos
end end

View File

@ -33,9 +33,9 @@ describe 'tripleo::profile::base::octavia::api' do
<<-eos <<-eos
class { 'tripleo::profile::base::octavia' : class { 'tripleo::profile::base::octavia' :
step => #{params[:step]}, step => #{params[:step]},
rabbit_user => 'bugs', oslomsg_rpc_username => 'bugs',
rabbit_password => 'rabbits_R_c00l', oslomsg_rpc_password => 'rabbits_R_c00l',
rabbit_hosts => ['hole.field.com'] oslomsg_rpc_hosts => ['hole.field.com']
} }
class { 'octavia::db::mysql': class { 'octavia::db::mysql':
password => 'some_password' password => 'some_password'

View File

@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::octavia' do describe 'tripleo::profile::base::octavia' do
let :params do let :params do
{ :rabbit_hosts => ['some.server.com'], { :oslomsg_rpc_hosts => ['some.server.com'],
:step => 5 :step => 5
} }
end end
@ -44,7 +44,7 @@ describe 'tripleo::profile::base::octavia' do
it 'should provide basic initialization' do it 'should provide basic initialization' do
is_expected.to contain_class('octavia').with( is_expected.to contain_class('octavia').with(
:default_transport_url => 'rabbit://some.server.com:5672/' :default_transport_url => 'rabbit://guest:password@some.server.com:5672/?ssl=0'
) )
is_expected.to contain_class('octavia::config') is_expected.to contain_class('octavia::config')
end end
@ -52,24 +52,24 @@ describe 'tripleo::profile::base::octavia' do
context 'with multiple hosts' do context 'with multiple hosts' do
before do before do
params.merge!({ :rabbit_hosts => ['some.server.com', 'someother.server.com'] }) params.merge!({ :oslomsg_rpc_hosts => ['some.server.com', 'someother.server.com'] })
end end
it 'should construct a multihost URL' do it 'should construct a multihost URL' do
is_expected.to contain_class('octavia').with( is_expected.to contain_class('octavia').with(
:default_transport_url => 'rabbit://some.server.com:5672,someother.server.com:5672/' :default_transport_url => 'rabbit://guest:password@some.server.com:5672,guest:password@someother.server.com:5672/?ssl=0'
) )
end end
end end
context 'with username provided' do context 'with username provided' do
before do before do
params.merge!({ :rabbit_user => 'bunny' }) params.merge!({ :oslomsg_rpc_username => 'bunny' })
end end
it 'should construct URL with username' do it 'should construct URL with username' do
is_expected.to contain_class('octavia').with( is_expected.to contain_class('octavia').with(
:default_transport_url => 'rabbit://bunny@some.server.com:5672/' :default_transport_url => 'rabbit://bunny:password@some.server.com:5672/?ssl=0'
) )
end end
end end
@ -77,15 +77,15 @@ describe 'tripleo::profile::base::octavia' do
context 'with username and password provided' do context 'with username and password provided' do
before do before do
params.merge!( params.merge!(
{ :rabbit_user => 'bunny', { :oslomsg_rpc_username => 'bunny',
:rabbit_password => 'carrot' :oslomsg_rpc_password => 'carrot'
} }
) )
end end
it 'should construct URL with username and password' do it 'should construct URL with username and password' do
is_expected.to contain_class('octavia').with( is_expected.to contain_class('octavia').with(
:default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672/' :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672/?ssl=0'
) )
end end
end end
@ -93,16 +93,16 @@ describe 'tripleo::profile::base::octavia' do
context 'with multiple hosts and user info provided' do context 'with multiple hosts and user info provided' do
before do before do
params.merge!( params.merge!(
{ :rabbit_hosts => ['some.server.com', 'someother.server.com'], { :oslomsg_rpc_hosts => ['some.server.com', 'someother.server.com'],
:rabbit_user => 'bunny', :oslomsg_rpc_username => 'bunny',
:rabbit_password => 'carrot' :oslomsg_rpc_password => 'carrot'
} }
) )
end end
it 'should distributed user info across hosts URL' do it 'should distributed user info across hosts URL' do
is_expected.to contain_class('octavia').with( is_expected.to contain_class('octavia').with(
:default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672,bunny:carrot@someother.server.com:5672/' :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672,bunny:carrot@someother.server.com:5672/?ssl=0'
) )
end end
end end

View File

@ -3,14 +3,18 @@ my_hash:
network: '127.0.0.1' network: '127.0.0.1'
not_hash: string not_hash: string
# aodh profile required hieradata # aodh profile required hieradata
aodh::rabbit_password: 'password'
aodh_redis_password: 'password' aodh_redis_password: 'password'
redis_vip: '127.0.0.1' redis_vip: '127.0.0.1'
aodh::auth::auth_password: 'password' aodh::auth::auth_password: 'password'
aodh::db::mysql::password: 'password' aodh::db::mysql::password: 'password'
aodh::keystone::authtoken::password: 'password' aodh::keystone::authtoken::password: 'password'
# babican profile required hieradata # babican profile required hieradata
barbican::api::rabbit_password: 'password'
barbican::db::mysql::password: 'password' barbican::db::mysql::password: 'password'
barbican::keystone::authtoken::password: 'password' barbican::keystone::authtoken::password: 'password'
# ceilometer related items
ceilometer::rabbit_password: 'password'
ceilometer::keystone::authtoken::password: 'password' ceilometer::keystone::authtoken::password: 'password'
# ceph related items # ceph related items
ceph::profile::params::mon_key: 'password' ceph::profile::params::mon_key: 'password'
@ -33,3 +37,5 @@ memcached_node_ips_v6:
- '::1' - '::1'
memcached_node_ips: memcached_node_ips:
- '127.0.0.1' - '127.0.0.1'
# octavia related items
octavia::rabbit_password: 'password'