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:
parent
3cea0982f9
commit
e1a1a5cbed
@ -27,19 +27,64 @@
|
||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
||||
# Defaults to hiera('bootstrap_nodeid')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$step = hiera('step'),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('aodh::rabbit_port', 5672),
|
||||
$step = hiera('step'),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
|
||||
$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) {
|
||||
@ -49,9 +94,24 @@ class tripleo::profile::base::aodh (
|
||||
}
|
||||
|
||||
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' :
|
||||
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::config
|
||||
|
@ -56,6 +56,50 @@
|
||||
# for more details.
|
||||
# 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 (
|
||||
$barbican_network = hiera('barbican_api_network', 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),
|
||||
$generate_service_certificates = hiera('generate_service_certificates', false),
|
||||
$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) {
|
||||
$sync_db = true
|
||||
@ -92,8 +147,25 @@ class tripleo::profile::base::barbican::api (
|
||||
}
|
||||
|
||||
if $step >= 4 or ( $step >= 3 and $sync_db ) {
|
||||
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
|
||||
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::api::logging
|
||||
|
@ -23,24 +23,84 @@
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('ceilometer::rabbit_port', 5672),
|
||||
$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('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 {
|
||||
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
|
||||
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
|
||||
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
|
||||
}
|
||||
|
@ -30,20 +30,65 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$cinder_enable_db_purge = true,
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('cinder::rabbit_port', 5672),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$cinder_enable_db_purge = true,
|
||||
$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('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) {
|
||||
$sync_db = true
|
||||
@ -52,9 +97,26 @@ class tripleo::profile::base::cinder (
|
||||
}
|
||||
|
||||
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' :
|
||||
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::glance
|
||||
|
@ -22,43 +22,43 @@
|
||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
||||
# 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*]
|
||||
# (Optional) The current step of the deployment
|
||||
# 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 (
|
||||
$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'),
|
||||
$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) {
|
||||
$sync_db = true
|
||||
@ -67,16 +67,16 @@ class tripleo::profile::base::congress (
|
||||
}
|
||||
|
||||
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':
|
||||
sync_db => $sync_db,
|
||||
default_transport_url => os_transport_url({
|
||||
'transport' => $messaging_driver,
|
||||
'hosts' => $messaging_hosts,
|
||||
'port' => sprintf('%s', $messaging_port),
|
||||
'username' => $messaging_username,
|
||||
'password' => $messaging_password,
|
||||
'ssl' => $messaging_use_ssl_real,
|
||||
'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,
|
||||
}),
|
||||
}
|
||||
|
||||
|
@ -26,30 +26,6 @@
|
||||
# (Optional) Whether keystone token flushing should be enabled
|
||||
# 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*]
|
||||
# (Optional) Heat notification driver to use.
|
||||
# Defaults to 'messaging'
|
||||
@ -59,18 +35,66 @@
|
||||
# for more details.
|
||||
# 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 (
|
||||
$bootstrap_node = downcase(hiera('bootstrap_nodeid')),
|
||||
$manage_db_purge = hiera('heat_enable_db_purge', true),
|
||||
$messaging_driver = hiera('messaging_service_name', 'rabbit'),
|
||||
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
|
||||
$messaging_password = hiera('heat::rabbit_password'),
|
||||
$messaging_port = hiera('heat::rabbit_port', '5672'),
|
||||
$messaging_username = hiera('heat::rabbit_userid', 'guest'),
|
||||
$messaging_use_ssl = hiera('heat::rabbit_use_ssl', '0'),
|
||||
$notification_driver = 'messaging',
|
||||
$step = hiera('step'),
|
||||
$bootstrap_node = downcase(hiera('bootstrap_nodeid')),
|
||||
$manage_db_purge = hiera('heat_enable_db_purge', true),
|
||||
$notification_driver = 'messaging',
|
||||
$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('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 = 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
|
||||
# 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,
|
||||
}
|
||||
|
||||
$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
|
||||
# to be a string for the os_transport_url function.
|
||||
class { '::heat' :
|
||||
notification_driver => $notification_driver,
|
||||
default_transport_url => os_transport_url({
|
||||
'transport' => $messaging_driver,
|
||||
'hosts' => $messaging_hosts,
|
||||
'password' => $messaging_password,
|
||||
'port' => sprintf('%s', $messaging_port),
|
||||
'username' => $messaging_username,
|
||||
'ssl' => $messaging_use_ssl_real,
|
||||
notification_driver => $notification_driver,
|
||||
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 ::heat::config
|
||||
|
@ -26,19 +26,39 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('ironic::rabbit_port', 5672),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$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('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.
|
||||
if $::hostname == downcase($bootstrap_node) {
|
||||
@ -48,10 +68,17 @@ class tripleo::profile::base::ironic (
|
||||
}
|
||||
|
||||
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':
|
||||
sync_db => $sync_db,
|
||||
rabbit_hosts => $rabbit_endpoints,
|
||||
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,
|
||||
}),
|
||||
}
|
||||
|
||||
include ::ironic::config
|
||||
|
@ -76,15 +76,50 @@
|
||||
# This is set by t-h-t.
|
||||
# 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*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*oslomsg_rpc_hosts*]
|
||||
# list of the oslo messaging rpc host fqdns
|
||||
# Defaults to hiera('rabbitmq_node_names')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
@ -102,8 +137,17 @@ class tripleo::profile::base::keystone (
|
||||
$heat_admin_user = undef,
|
||||
$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),
|
||||
$rabbit_port = hiera('keystone::rabbit_port', 5672),
|
||||
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
|
||||
$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'),
|
||||
) {
|
||||
if $::hostname == downcase($bootstrap_node) {
|
||||
@ -142,11 +186,26 @@ class tripleo::profile::base::keystone (
|
||||
}
|
||||
|
||||
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':
|
||||
sync_db => $sync_db,
|
||||
enable_bootstrap => $sync_db,
|
||||
rabbit_hosts => $rabbit_endpoints,
|
||||
sync_db => $sync_db,
|
||||
enable_bootstrap => $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 ::keystone::config
|
||||
|
@ -26,19 +26,64 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('manila::rabbit_port', 5672),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$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('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) {
|
||||
$sync_db = true
|
||||
@ -47,9 +92,24 @@ class tripleo::profile::base::manila (
|
||||
}
|
||||
|
||||
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' :
|
||||
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
|
||||
}
|
||||
|
@ -27,19 +27,64 @@
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('mistral::rabbit_port', 5672),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$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('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) {
|
||||
$sync_db = true
|
||||
@ -48,9 +93,24 @@ class tripleo::profile::base::mistral (
|
||||
}
|
||||
|
||||
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':
|
||||
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::client
|
||||
|
@ -22,23 +22,83 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# Defaults to hiera('neutron::rabbit_port', 5672
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('neutron::rabbit_port', 5672),
|
||||
$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('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 {
|
||||
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
|
||||
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
|
||||
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
|
||||
}
|
||||
|
@ -30,28 +30,48 @@
|
||||
# (Optional) Whether or not manage Nova Live migration
|
||||
# Defaults to false
|
||||
#
|
||||
# [*messaging_driver*]
|
||||
# Driver for messaging service.
|
||||
# Defaults to hiera('messaging_service_name', 'rabbit')
|
||||
# [*oslomsg_rpc_proto*]
|
||||
# Protocol driver for the oslo messaging rpc service
|
||||
# Defaults to hiera('messaging_rpc_service_name', rabbit)
|
||||
#
|
||||
# [*messaging_hosts*]
|
||||
# list of the messaging host fqdns
|
||||
# [*oslomsg_rpc_hosts*]
|
||||
# list of the oslo messaging rpc host fqdns
|
||||
# Defaults to hiera('rabbitmq_node_names')
|
||||
#
|
||||
# [*messaging_password*]
|
||||
# Password for messaging nova queue
|
||||
# Defaults to hiera('nova::rabbit_password')
|
||||
#
|
||||
# [*messaging_port*]
|
||||
# IP port for messaging service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# Defaults to hiera('nova::rabbit_port', 5672)
|
||||
#
|
||||
# [*messaging_username*]
|
||||
# Username for messaging nova queue
|
||||
# [*oslomsg_rpc_username*]
|
||||
# Username for oslo messaging rpc service
|
||||
# Defaults to hiera('nova::rabbit_userid', 'guest')
|
||||
#
|
||||
# [*messaging_use_ssl*]
|
||||
# Flag indicating ssl usage.
|
||||
# [*oslomsg_rpc_password*]
|
||||
# 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')
|
||||
#
|
||||
# [*nova_compute_enabled*]
|
||||
@ -63,17 +83,22 @@
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
class tripleo::profile::base::nova (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$libvirt_enabled = false,
|
||||
$manage_migration = false,
|
||||
$messaging_driver = hiera('messaging_service_name', 'rabbit'),
|
||||
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
|
||||
$messaging_password = hiera('nova::rabbit_password'),
|
||||
$messaging_port = hiera('nova::rabbit_port', '5672'),
|
||||
$messaging_username = hiera('nova::rabbit_userid', 'guest'),
|
||||
$messaging_use_ssl = hiera('nova::rabbit_use_ssl', '0'),
|
||||
$nova_compute_enabled = false,
|
||||
$step = hiera('step'),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$libvirt_enabled = false,
|
||||
$manage_migration = false,
|
||||
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
|
||||
$oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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 = any2array(hiera('rabbitmq_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'),
|
||||
$nova_compute_enabled = false,
|
||||
$step = hiera('step'),
|
||||
) {
|
||||
if $::hostname == downcase($bootstrap_node) {
|
||||
$sync_db = true
|
||||
@ -88,17 +113,25 @@ class tripleo::profile::base::nova (
|
||||
}
|
||||
|
||||
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
|
||||
# to be a string for the os_transport_url function.
|
||||
class { '::nova' :
|
||||
default_transport_url => os_transport_url({
|
||||
'transport' => $messaging_driver,
|
||||
'hosts' => $messaging_hosts,
|
||||
'port' => sprintf('%s', $messaging_port),
|
||||
'username' => $messaging_username,
|
||||
'password' => $messaging_password,
|
||||
'ssl' => $messaging_use_ssl_real,
|
||||
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 ::nova::config
|
||||
|
@ -22,35 +22,50 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_user*]
|
||||
# [*rabbit_password*]
|
||||
# (Optional) RabbitMQ user details
|
||||
# Defaults to undef
|
||||
# [*oslomsg_rpc_proto*]
|
||||
# Protocol driver for the oslo messaging rpc service
|
||||
# Defaults to hiera('messaging_rpc_service_name', rabbit)
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*oslomsg_rpc_hosts*]
|
||||
# list of the oslo messaging rpc host fqdns
|
||||
# Defaults to hiera('rabbitmq_node_names')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# Defaults to 5672.
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$step = hiera('step'),
|
||||
$rabbit_user = undef,
|
||||
$rabbit_password = undef,
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = '5672'
|
||||
$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('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'),
|
||||
) {
|
||||
if $step >= 3 {
|
||||
$oslomsg_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_use_ssl)))
|
||||
class { '::octavia' :
|
||||
default_transport_url => os_transport_url({
|
||||
'transport' => 'rabbit',
|
||||
'hosts' => $rabbit_hosts,
|
||||
'port' => sprintf('%s', $rabbit_port),
|
||||
'username' => $rabbit_user,
|
||||
'password' => $rabbit_password
|
||||
})
|
||||
'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 ::octavia::config
|
||||
}
|
||||
|
@ -26,19 +26,64 @@
|
||||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# list of the rabbbit host fqdns
|
||||
# [*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')
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# IP port for rabbitmq service
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# 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 (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$step = hiera('step'),
|
||||
$rabbit_hosts = hiera('rabbitmq_node_names', undef),
|
||||
$rabbit_port = hiera('sahara::rabbit_port', 5672),
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$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('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) {
|
||||
$sync_db = true
|
||||
@ -47,10 +92,27 @@ class tripleo::profile::base::sahara (
|
||||
}
|
||||
|
||||
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':
|
||||
sync_db => $sync_db,
|
||||
rabbit_hosts => $rabbit_endpoints,
|
||||
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,
|
||||
}),
|
||||
}
|
||||
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,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#
|
||||
# [*ceilometer_messaging_driver*]
|
||||
# Driver for messaging service.
|
||||
# Defaults to hiera('messaging_service_name', 'rabbit')
|
||||
# Defaults to hiera('messaging_notify_service_name', 'rabbit')
|
||||
#
|
||||
# [*ceilometer_messaging_hosts*]
|
||||
# list of the messaging host fqdns
|
||||
@ -61,7 +61,7 @@
|
||||
#
|
||||
class tripleo::profile::base::swift::proxy (
|
||||
$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_password = hiera('swift::proxy::ceilometer::rabbit_password', undef),
|
||||
$ceilometer_messaging_port = hiera('tripleo::profile::base::swift::proxy::rabbit_port', '5672'),
|
||||
|
@ -22,29 +22,29 @@
|
||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
||||
# Defaults to hiera('bootstrap_nodeid')
|
||||
#
|
||||
# [*messaging_driver*]
|
||||
# Driver for messaging service.
|
||||
# Defaults to hiera('messaging_service_name', 'rabbit')
|
||||
# [*oslomsg_rpc_proto*]
|
||||
# Protocol driver for the oslo messaging rpc service
|
||||
# Defaults to hiera('messaging_rpc_service_name', rabbit)
|
||||
#
|
||||
# [*messaging_hosts*]
|
||||
# list of the messaging host fqdns
|
||||
# [*oslomsg_rpc_hosts*]
|
||||
# list of the oslo messaging rpc host fqdns
|
||||
# Defaults to hiera('rabbitmq_node_names')
|
||||
#
|
||||
# [*messaging_password*]
|
||||
# Password for messaging nova queue
|
||||
# Defaults to hiera('nova::rabbit_password')
|
||||
# [*oslomsg_rpc_port*]
|
||||
# IP port for oslo messaging rpc service
|
||||
# Defaults to hiera('tacker::rabbit_port', 5672)
|
||||
#
|
||||
# [*messaging_port*]
|
||||
# IP port for messaging service
|
||||
# Defaults to hiera('nova::rabbit_port', 5672)
|
||||
# [*oslomsg_rpc_username*]
|
||||
# Username for oslo messaging rpc service
|
||||
# Defaults to hiera('tacker::rabbit_userid', 'guest')
|
||||
#
|
||||
# [*messaging_username*]
|
||||
# Username for messaging nova queue
|
||||
# Defaults to hiera('nova::rabbit_userid', 'guest')
|
||||
# [*oslomsg_rpc_password*]
|
||||
# Password for oslo messaging rpc service
|
||||
# Defaults to hiera('tacker::rabbit_password')
|
||||
#
|
||||
# [*messaging_use_ssl*]
|
||||
# Flag indicating ssl usage.
|
||||
# Defaults to hiera('nova::rabbit_use_ssl', '0')
|
||||
# [*oslomsg_use_ssl*]
|
||||
# Enable ssl oslo messaging services
|
||||
# Defaults to hiera('tacker::rabbit_use_ssl', '0')
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step of the deployment
|
||||
@ -52,12 +52,12 @@
|
||||
|
||||
class tripleo::profile::base::tacker (
|
||||
$bootstrap_node = hiera('bootstrap_nodeid', undef),
|
||||
$messaging_driver = hiera('messaging_service_name', 'rabbit'),
|
||||
$messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
|
||||
$messaging_password = hiera('tacker::rabbit_password'),
|
||||
$messaging_port = hiera('tacker::rabbit_port', '5672'),
|
||||
$messaging_username = hiera('tacker::rabbit_userid', 'guest'),
|
||||
$messaging_use_ssl = hiera('tacker::rabbit_use_ssl', '0'),
|
||||
$oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
|
||||
$oslomsg_rpc_hosts = any2array(hiera('rabbitmq_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'),
|
||||
$step = hiera('step'),
|
||||
) {
|
||||
if $::hostname == downcase($bootstrap_node) {
|
||||
@ -67,16 +67,16 @@ class tripleo::profile::base::tacker (
|
||||
}
|
||||
|
||||
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':
|
||||
sync_db => $sync_db,
|
||||
default_transport_url => os_transport_url({
|
||||
'transport' => $messaging_driver,
|
||||
'hosts' => $messaging_hosts,
|
||||
'port' => sprintf('%s', $messaging_port),
|
||||
'username' => $messaging_username,
|
||||
'password' => $messaging_password,
|
||||
'ssl' => $messaging_use_ssl_real,
|
||||
'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,
|
||||
}),
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::aodh::api' do
|
||||
shared_examples_for 'tripleo::profile::base::aodh::api' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::aodh::evaluator' do
|
||||
shared_examples_for 'tripleo::profile::base::aodh::evaluator' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::aodh::listener' do
|
||||
shared_examples_for 'tripleo::profile::base::aodh::listener' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::aodh::notifier' do
|
||||
shared_examples_for 'tripleo::profile::base::aodh::notifier' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -34,12 +34,14 @@ describe 'tripleo::profile::base::aodh' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
: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
|
||||
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::config')
|
||||
@ -67,12 +69,14 @@ describe 'tripleo::profile::base::aodh' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
: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
|
||||
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::config')
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::ceilometer::api' do
|
||||
shared_examples_for 'tripleo::profile::base::ceilometer::api' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::ceilometer::collector' do
|
||||
shared_examples_for 'tripleo::profile::base::ceilometer::collector' 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
|
||||
|
||||
context 'with step 3 on bootstrap node with mongodb' do
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::ceilometer::expirer' do
|
||||
shared_examples_for 'tripleo::profile::base::ceilometer::expirer' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -30,12 +30,14 @@ describe 'tripleo::profile::base::ceilometer' do
|
||||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
: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
|
||||
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')
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::cinder::api' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::api' 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
|
||||
|
||||
context 'with step less than 3' do
|
||||
|
@ -20,7 +20,7 @@ describe 'tripleo::profile::base::cinder::backup::ceph' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::backup::ceph' do
|
||||
let(:pre_condition) do
|
||||
<<-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]} }
|
||||
EOF
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::cinder::backup' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::backup' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -20,7 +20,7 @@ describe 'tripleo::profile::base::cinder::backup::swift' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::backup::swift' do
|
||||
let(:pre_condition) do
|
||||
<<-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]} }
|
||||
EOF
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::cinder::scheduler' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::scheduler' 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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -31,15 +31,17 @@ describe 'tripleo::profile::base::cinder' do
|
||||
|
||||
context 'with step 3 on bootstrap node' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
|
||||
:rabbit_port => '1234'
|
||||
:step => 3,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
:oslomsg_rpc_username => 'cinder',
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
:oslomsg_rpc_port => '1234'
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
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::glance')
|
||||
@ -63,15 +65,17 @@ describe 'tripleo::profile::base::cinder' do
|
||||
|
||||
context 'with step 4 on other node' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
:bootstrap_node => 'somethingelse.example.com',
|
||||
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
|
||||
:rabbit_port => '5672'
|
||||
:step => 4,
|
||||
:bootstrap_node => 'somethingelse.example.com',
|
||||
:oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
:oslomsg_rpc_username => 'cinder',
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
:oslomsg_rpc_port => '5672',
|
||||
} }
|
||||
|
||||
it 'should trigger cinder configuration without mysql grant' do
|
||||
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::glance')
|
||||
@ -81,14 +85,16 @@ describe 'tripleo::profile::base::cinder' do
|
||||
|
||||
context 'with step 5' do
|
||||
let(:params) { {
|
||||
:step => 5,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:rabbit_hosts => ['127.0.0.1', '127.0.0.2']
|
||||
:step => 5,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
:oslomsg_rpc_username => 'cinder',
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
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::glance')
|
||||
@ -98,15 +104,17 @@ describe 'tripleo::profile::base::cinder' do
|
||||
|
||||
context 'with step 5 without db_purge' do
|
||||
let(:params) { {
|
||||
:step => 5,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
|
||||
:step => 5,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
:oslomsg_rpc_username => 'cinder',
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
:cinder_enable_db_purge => false
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
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::glance')
|
||||
|
@ -1,3 +1,4 @@
|
||||
# coding: utf-8
|
||||
#
|
||||
# Copyright (C) 2016 Red Hat, Inc.
|
||||
#
|
||||
@ -27,7 +28,7 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
context 'with step less than 4' do
|
||||
|
@ -22,9 +22,9 @@ describe 'tripleo::profile::base::nova::api' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ 'localhost' ],
|
||||
messaging_username => 'nova',
|
||||
messaging_password => 'foo'
|
||||
oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
oslomsg_rpc_username => 'nova',
|
||||
oslomsg_rpc_password => 'foo'
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -35,7 +35,7 @@ describe 'tripleo::profile::base::nova::compute::ironic' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
class { '::tripleo::profile::base::nova::compute':
|
||||
step => #{params[:step]},
|
||||
|
@ -36,7 +36,7 @@ describe 'tripleo::profile::base::nova::compute::libvirt' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
class { '::tripleo::profile::base::nova::compute':
|
||||
step => #{params[:step]},
|
||||
|
@ -37,7 +37,7 @@ describe 'tripleo::profile::base::nova::compute' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -22,7 +22,7 @@ describe 'tripleo::profile::base::nova::conductor' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ describe 'tripleo::profile::base::nova::consoleauth' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -37,7 +37,7 @@ describe 'tripleo::profile::base::nova::libvirt' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -35,7 +35,7 @@ describe 'tripleo::profile::base::nova::scheduler' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -22,8 +22,8 @@ describe 'tripleo::profile::base::nova' do
|
||||
context 'with step less than 3' do
|
||||
let(:params) { {
|
||||
:step => 1,
|
||||
:messaging_hosts => [ 'localhost' ],
|
||||
:messaging_password => 'foo'
|
||||
:oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
:oslomsg_rpc_password => 'foo'
|
||||
} }
|
||||
|
||||
it {
|
||||
@ -38,9 +38,9 @@ describe 'tripleo::profile::base::nova' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:messaging_hosts => [ 'localhost' ],
|
||||
:messaging_username => 'nova',
|
||||
:messaging_password => 'foo',
|
||||
:oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
:oslomsg_rpc_username => 'nova',
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
} }
|
||||
|
||||
it {
|
||||
@ -62,8 +62,8 @@ describe 'tripleo::profile::base::nova' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:bootstrap_node => 'other.example.com',
|
||||
:messaging_hosts => [ 'localhost' ],
|
||||
:messaging_password => 'foo'
|
||||
:oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
:oslomsg_rpc_password => 'foo'
|
||||
} }
|
||||
|
||||
it {
|
||||
@ -79,8 +79,8 @@ describe 'tripleo::profile::base::nova' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
:bootstrap_node => 'other.example.com',
|
||||
:messaging_hosts => [ 'localhost' ],
|
||||
:messaging_password => 'foo',
|
||||
:oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
} }
|
||||
|
||||
it {
|
||||
@ -103,8 +103,8 @@ describe 'tripleo::profile::base::nova' do
|
||||
:manage_migration => true,
|
||||
:nova_compute_enabled => true,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:messaging_hosts => [ 'localhost' ],
|
||||
:messaging_password => 'foo',
|
||||
:oslomsg_rpc_hosts => [ 'localhost' ],
|
||||
:oslomsg_rpc_password => 'foo',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -34,7 +34,7 @@ describe 'tripleo::profile::base::nova::vncproxy' do
|
||||
<<-eos
|
||||
class { '::tripleo::profile::base::nova':
|
||||
step => #{params[:step]},
|
||||
messaging_hosts => [ '127.0.0.1' ],
|
||||
oslomsg_rpc_hosts => [ '127.0.0.1' ],
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
@ -33,9 +33,9 @@ describe 'tripleo::profile::base::octavia::api' do
|
||||
<<-eos
|
||||
class { 'tripleo::profile::base::octavia' :
|
||||
step => #{params[:step]},
|
||||
rabbit_user => 'bugs',
|
||||
rabbit_password => 'rabbits_R_c00l',
|
||||
rabbit_hosts => ['hole.field.com']
|
||||
oslomsg_rpc_username => 'bugs',
|
||||
oslomsg_rpc_password => 'rabbits_R_c00l',
|
||||
oslomsg_rpc_hosts => ['hole.field.com']
|
||||
}
|
||||
class { 'octavia::db::mysql':
|
||||
password => 'some_password'
|
||||
|
@ -19,7 +19,7 @@ require 'spec_helper'
|
||||
describe 'tripleo::profile::base::octavia' do
|
||||
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['some.server.com'],
|
||||
{ :oslomsg_rpc_hosts => ['some.server.com'],
|
||||
:step => 5
|
||||
}
|
||||
end
|
||||
@ -44,7 +44,7 @@ describe 'tripleo::profile::base::octavia' do
|
||||
|
||||
it 'should provide basic initialization' do
|
||||
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')
|
||||
end
|
||||
@ -52,24 +52,24 @@ describe 'tripleo::profile::base::octavia' do
|
||||
|
||||
context 'with multiple hosts' 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
|
||||
|
||||
it 'should construct a multihost URL' do
|
||||
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
|
||||
|
||||
context 'with username provided' do
|
||||
before do
|
||||
params.merge!({ :rabbit_user => 'bunny' })
|
||||
params.merge!({ :oslomsg_rpc_username => 'bunny' })
|
||||
end
|
||||
|
||||
it 'should construct URL with username' do
|
||||
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
|
||||
@ -77,15 +77,15 @@ describe 'tripleo::profile::base::octavia' do
|
||||
context 'with username and password provided' do
|
||||
before do
|
||||
params.merge!(
|
||||
{ :rabbit_user => 'bunny',
|
||||
:rabbit_password => 'carrot'
|
||||
{ :oslomsg_rpc_username => 'bunny',
|
||||
:oslomsg_rpc_password => 'carrot'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it 'should construct URL with username and password' do
|
||||
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
|
||||
@ -93,16 +93,16 @@ describe 'tripleo::profile::base::octavia' do
|
||||
context 'with multiple hosts and user info provided' do
|
||||
before do
|
||||
params.merge!(
|
||||
{ :rabbit_hosts => ['some.server.com', 'someother.server.com'],
|
||||
:rabbit_user => 'bunny',
|
||||
:rabbit_password => 'carrot'
|
||||
{ :oslomsg_rpc_hosts => ['some.server.com', 'someother.server.com'],
|
||||
:oslomsg_rpc_username => 'bunny',
|
||||
:oslomsg_rpc_password => 'carrot'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it 'should distributed user info across hosts URL' do
|
||||
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
|
||||
|
6
spec/fixtures/hieradata/default.yaml
vendored
6
spec/fixtures/hieradata/default.yaml
vendored
@ -3,14 +3,18 @@ my_hash:
|
||||
network: '127.0.0.1'
|
||||
not_hash: string
|
||||
# aodh profile required hieradata
|
||||
aodh::rabbit_password: 'password'
|
||||
aodh_redis_password: 'password'
|
||||
redis_vip: '127.0.0.1'
|
||||
aodh::auth::auth_password: 'password'
|
||||
aodh::db::mysql::password: 'password'
|
||||
aodh::keystone::authtoken::password: 'password'
|
||||
# babican profile required hieradata
|
||||
barbican::api::rabbit_password: 'password'
|
||||
barbican::db::mysql::password: 'password'
|
||||
barbican::keystone::authtoken::password: 'password'
|
||||
# ceilometer related items
|
||||
ceilometer::rabbit_password: 'password'
|
||||
ceilometer::keystone::authtoken::password: 'password'
|
||||
# ceph related items
|
||||
ceph::profile::params::mon_key: 'password'
|
||||
@ -33,3 +37,5 @@ memcached_node_ips_v6:
|
||||
- '::1'
|
||||
memcached_node_ips:
|
||||
- '127.0.0.1'
|
||||
# octavia related items
|
||||
octavia::rabbit_password: 'password'
|
||||
|
Loading…
x
Reference in New Issue
Block a user