diff options
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/barbican.pp | 36 | ||||
-rw-r--r-- | manifests/profile/base/barbican/api.pp | 56 | ||||
-rw-r--r-- | manifests/profile/base/cinder/api.pp | 1 | ||||
-rw-r--r-- | manifests/profile/base/glance/api.pp | 17 | ||||
-rw-r--r-- | manifests/profile/base/haproxy.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/heat.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/keystone.pp | 58 | ||||
-rw-r--r-- | manifests/profile/base/logging/fluentd.pp | 160 | ||||
-rw-r--r-- | manifests/profile/base/monitoring/sensu.pp | 8 | ||||
-rw-r--r-- | manifests/profile/base/neutron/opendaylight.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ml2/opendaylight.pp | 27 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ovs/opendaylight.pp | 10 | ||||
-rw-r--r-- | manifests/profile/base/rabbitmq.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/swift/proxy.pp | 19 | ||||
-rw-r--r-- | manifests/profile/base/zaqar.pp | 63 |
15 files changed, 332 insertions, 131 deletions
diff --git a/manifests/profile/base/barbican.pp b/manifests/profile/base/barbican.pp new file mode 100644 index 0000000..f4d6230 --- /dev/null +++ b/manifests/profile/base/barbican.pp @@ -0,0 +1,36 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::barbican +# +# Barbican profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# + +class tripleo::profile::base::barbican ( + $step = hiera('step'), +) { + + if $step >= 3 { + include ::barbican + include ::barbican::config + include ::barbican::client + } +} diff --git a/manifests/profile/base/barbican/api.pp b/manifests/profile/base/barbican/api.pp new file mode 100644 index 0000000..470e649 --- /dev/null +++ b/manifests/profile/base/barbican/api.pp @@ -0,0 +1,56 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::barbican::api +# +# Barbican profile for tripleo api +# +# === Parameters +# +# [*bootstrap_node*] +# (Optional) The hostname of the node responsible for bootstrapping tasks +# Defaults to hiera('bootstrap_nodeid') +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::barbican::api ( + $bootstrap_node = hiera('bootstrap_nodeid', undef), + $step = hiera('step'), +) { + if $::hostname == downcase($bootstrap_node) { + $sync_db = true + } else { + $sync_db = false + } + + include ::tripleo::profile::base::barbican + + if $step >= 3 and $sync_db { + include ::barbican::db::mysql + } + + if $step >= 4 or ( $step >= 3 and $sync_db ) { + class { '::barbican::api': + sync_db => $sync_db + } + include ::barbican::keystone::authtoken + include ::barbican::api::logging + include ::barbican::keystone::notification + include ::barbican::quota + include ::barbican::wsgi::apache + } +} diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp index 31635eb..8fcc7d6 100644 --- a/manifests/profile/base/cinder/api.pp +++ b/manifests/profile/base/cinder/api.pp @@ -41,6 +41,7 @@ class tripleo::profile::base::cinder::api ( if $step >= 4 or ($step >= 3 and $sync_db) { include ::cinder::api + include ::cinder::wsgi::apache include ::cinder::ceilometer include ::cinder::glance } diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp index f3db396..a7d4487 100644 --- a/manifests/profile/base/glance/api.pp +++ b/manifests/profile/base/glance/api.pp @@ -22,6 +22,10 @@ # (Optional) Glance backend(s) to use. # Defaults to downcase(hiera('glance_backend', 'swift')) # +# [*glance_nfs_enabled*] +# (Optional) Whether to use NFS mount as 'file' backend storage location. +# Defaults to false +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -36,12 +40,17 @@ # Defaults to hiera('glance::notify::rabbitmq::rabbit_port', 5672) class tripleo::profile::base::glance::api ( - $glance_backend = downcase(hiera('glance_backend', 'swift')), - $step = hiera('step'), - $rabbit_hosts = hiera('rabbitmq_node_ips', undef), - $rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672), + $glance_backend = downcase(hiera('glance_backend', 'swift')), + $glance_nfs_enabled = false, + $step = hiera('step'), + $rabbit_hosts = hiera('rabbitmq_node_ips', undef), + $rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672), ) { + if $step >= 1 and $glance_nfs_enabled { + include ::tripleo::glance::nfs_mount + } + if $step >= 4 { case $glance_backend { 'swift': { $backend_store = 'glance.store.swift.Store' } diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp index afeb8c0..f16ec1b 100644 --- a/manifests/profile/base/haproxy.pp +++ b/manifests/profile/base/haproxy.pp @@ -95,7 +95,7 @@ class tripleo::profile::base::haproxy ( command => 'systemctl reload haproxy', path => ['/usr/bin', '/usr/sbin'], refreshonly => true, - onlyif => 'pcs property | grep -q "maintenance-mode.*true"', + onlyif => 'systemctl is-active haproxy | grep -q active', subscribe => Class['::haproxy'] } Haproxy::Listen<||> ~> Exec['haproxy-reload'] diff --git a/manifests/profile/base/heat.pp b/manifests/profile/base/heat.pp index abb9f76..2babf4c 100644 --- a/manifests/profile/base/heat.pp +++ b/manifests/profile/base/heat.pp @@ -53,7 +53,7 @@ class tripleo::profile::base::heat ( ) { # 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. - if $step == 3 or $step == 4 { + if $step >= 3 { class { '::heat::keystone::domain': manage_domain => false, manage_user => false, diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp index a0e5538..e30f712 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -74,6 +74,23 @@ # for more details. # Defaults to hiera('step') # +# [*heat_admin_domain*] +# domain name for heat admin +# Defaults to hiera('heat::keystone::domain::domain_name', 'heat') +# +# [*heat_admin_user*] +# heat admin user name +# Defaults to hiera('heat::keystone::domain::domain_admin', 'heat_admin') +# +# [*heat_admin_email*] +# heat admin email address +# Defaults to hiera('heat::keystone::domain::domain_admin_email', +# 'heat_admin@localhost') +# +# [*heat_admin_password*] +# heat admin password +# Defaults to hiera('heat::keystone::domain::domain_password') +# class tripleo::profile::base::keystone ( $admin_endpoint_network = hiera('keystone_admin_api_network', undef), $bootstrap_node = hiera('bootstrap_nodeid', undef), @@ -85,6 +102,10 @@ class tripleo::profile::base::keystone ( $rabbit_hosts = hiera('rabbitmq_node_ips', undef), $rabbit_port = hiera('keystone::rabbit_port', 5672), $step = hiera('step'), + $heat_admin_domain = hiera('heat::keystone::domain::domain_name', 'heat'), + $heat_admin_user = hiera('heat::keystone::domain::domain_admin', 'heat_admin'), + $heat_admin_email = hiera('heat::keystone::domain::domain_admin_email', 'heat_admin@localhost'), + $heat_admin_password = hiera('heat::keystone::domain::domain_password'), ) { if $::hostname == downcase($bootstrap_node) { $sync_db = true @@ -153,22 +174,22 @@ class tripleo::profile::base::keystone ( if $step >= 5 and $manage_domain { if hiera('heat_engine_enabled', false) { - # if Heat and Keystone are collocated, so we want to - # both configure heat.conf and create Keystone resources. - # note: domain_password is given via Hiera. - if defined(Class['::tripleo::profile::base::heat']) { - include ::heat::keystone::domain - } else { - # if Heat and Keystone are not collocated, we want Puppet - # to only create Keystone resources on the Keystone node - # but not try to configure Heat, to avoid leaking the password. - class { '::heat::keystone::domain': - domain_name => $::os_service_default, - domain_admin => $::os_service_default, - domain_password => $::os_service_default, - } + # create these seperate and don't use ::heat::keystone::domain since + # that class writes out the configs + keystone_domain { $heat_admin_domain: + ensure => 'present', + enabled => true + } + keystone_user { "${heat_admin_user}::${heat_admin_domain}": + ensure => 'present', + enabled => true, + email => $heat_admin_email, + password => $heat_admin_password + } + keystone_user_role { "${heat_admin_user}::${heat_admin_domain}@::${heat_admin_domain}": + roles => ['admin'], + require => Class['::keystone::roles::admin'] } - Class['::keystone::roles::admin'] -> Class['::heat::keystone::domain'] } } @@ -176,6 +197,9 @@ class tripleo::profile::base::keystone ( if hiera('aodh_api_enabled', false) { include ::aodh::keystone::auth } + if hiera('barbican_api_enabled', false) { + include ::barbican::keystone::auth + } if hiera('ceilometer_api_enabled', false) { include ::ceilometer::keystone::auth } @@ -221,6 +245,10 @@ class tripleo::profile::base::keystone ( if hiera('trove_api_enabled', false) { include ::trove::keystone::auth } + if hiera('zaqar_enabled', false) { + include ::zaqar::keystone::auth + include ::zaqar::keystone::auth_websocket + } } } diff --git a/manifests/profile/base/logging/fluentd.pp b/manifests/profile/base/logging/fluentd.pp index 3ed7d88..9e1aa8d 100644 --- a/manifests/profile/base/logging/fluentd.pp +++ b/manifests/profile/base/logging/fluentd.pp @@ -52,7 +52,7 @@ # secure-foward plugin. # # [*fluentd_listen_syslog*] -# (Optional, default true) When true, fluentd will listen for syslog +# (Optional, default true) When true, fluentd will listen for syslog # messages on a local UDP port. # # [*fluentd_syslog_port*] @@ -71,107 +71,105 @@ class tripleo::profile::base::logging::fluentd ( $fluentd_listen_syslog = true, $fluentd_syslog_port = 42185 ) { - if $step == undef or $step >= 3 { - include ::fluentd + include ::fluentd - if $fluentd_groups { - user { $::fluentd::config_owner: - ensure => present, - groups => $fluentd_groups, - membership => 'minimum', - } + if $fluentd_groups { + user { $::fluentd::config_owner: + ensure => present, + groups => $fluentd_groups, + membership => 'minimum', } + } - if $fluentd_pos_file_path { - file { $fluentd_pos_file_path: - ensure => 'directory', - owner => $::fluentd::config_owner, - group => $::fluentd::config_group, - mode => '0750', - } + if $fluentd_pos_file_path { + file { $fluentd_pos_file_path: + ensure => 'directory', + owner => $::fluentd::config_owner, + group => $::fluentd::config_group, + mode => '0750', } + } - ::fluentd::plugin { 'rubygem-fluent-plugin-add': - plugin_provider => 'yum', - } + ::fluentd::plugin { 'rubygem-fluent-plugin-add': + plugin_provider => 'yum', + } - if $fluentd_sources { - ::fluentd::config { '100-openstack-sources.conf': - config => { - 'source' => $fluentd_sources, - } + if $fluentd_sources { + ::fluentd::config { '100-openstack-sources.conf': + config => { + 'source' => $fluentd_sources, } } + } - if $fluentd_listen_syslog { - # fluentd will receive syslog messages by listening on a local udp - # socket. - ::fluentd::config { '110-system-sources.conf': - config => { - 'source' => { - 'type' => 'syslog', - 'tag' => 'system.messages', - 'port' => $fluentd_syslog_port, - } + if $fluentd_listen_syslog { + # fluentd will receive syslog messages by listening on a local udp + # socket. + ::fluentd::config { '110-system-sources.conf': + config => { + 'source' => { + 'type' => 'syslog', + 'tag' => 'system.messages', + 'port' => $fluentd_syslog_port, } } + } - file { '/etc/rsyslog.d/fluentd.conf': - content => "*.* @127.0.0.1:${fluentd_syslog_port}", - owner => 'root', - group => 'root', - mode => '0644', - } ~> exec { 'reload rsyslog': - command => '/bin/systemctl restart rsyslog', - } + file { '/etc/rsyslog.d/fluentd.conf': + content => "*.* @127.0.0.1:${fluentd_syslog_port}", + owner => 'root', + group => 'root', + mode => '0644', + } ~> exec { 'reload rsyslog': + command => '/bin/systemctl restart rsyslog', } + } - if $fluentd_filters { - ::fluentd::config { '200-openstack-filters.conf': - config => { - 'filter' => $fluentd_filters, - } + if $fluentd_filters { + ::fluentd::config { '200-openstack-filters.conf': + config => { + 'filter' => $fluentd_filters, } } + } - if $fluentd_servers and !empty($fluentd_servers) { - if $fluentd_use_ssl { - ::fluentd::plugin { 'rubygem-fluent-plugin-secure-forward': - plugin_provider => 'yum', - } + if $fluentd_servers and !empty($fluentd_servers) { + if $fluentd_use_ssl { + ::fluentd::plugin { 'rubygem-fluent-plugin-secure-forward': + plugin_provider => 'yum', + } - file {'/etc/fluentd/ca_cert.pem': - content => $fluentd_ssl_certificate, - owner => $::fluentd::config_owner, - group => $::fluentd::config_group, - mode => '0444', - } + file {'/etc/fluentd/ca_cert.pem': + content => $fluentd_ssl_certificate, + owner => $::fluentd::config_owner, + group => $::fluentd::config_group, + mode => '0444', + } - ::fluentd::config { '300-openstack-matches.conf': - config => { - 'match' => { - # lint:ignore:single_quote_string_with_variables - # lint:ignore:quoted_booleans - 'type' => 'secure_forward', - 'tag_pattern' => '**', - 'self_hostname' => '${hostname}', - 'secure' => 'true', - 'ca_cert_path' => '/etc/fluentd/ca_cert.pem', - 'shared_key' => $fluentd_shared_key, - 'server' => $fluentd_servers, - # lint:endignore - # lint:endignore - } + ::fluentd::config { '300-openstack-matches.conf': + config => { + 'match' => { + # lint:ignore:single_quote_string_with_variables + # lint:ignore:quoted_booleans + 'type' => 'secure_forward', + 'tag_pattern' => '**', + 'self_hostname' => '${hostname}', + 'secure' => 'true', + 'ca_cert_path' => '/etc/fluentd/ca_cert.pem', + 'shared_key' => $fluentd_shared_key, + 'server' => $fluentd_servers, + # lint:endignore + # lint:endignore } } - } else { - ::fluentd::config { '300-openstack-matches.conf': - config => { - 'match' => { - 'type' => 'forward', - 'tag_pattern' => '**', - 'server' => $fluentd_servers, - } + } + } else { + ::fluentd::config { '300-openstack-matches.conf': + config => { + 'match' => { + 'type' => 'forward', + 'tag_pattern' => '**', + 'server' => $fluentd_servers, } } } diff --git a/manifests/profile/base/monitoring/sensu.pp b/manifests/profile/base/monitoring/sensu.pp index a6872b3..91b7ac7 100644 --- a/manifests/profile/base/monitoring/sensu.pp +++ b/manifests/profile/base/monitoring/sensu.pp @@ -25,10 +25,8 @@ class tripleo::profile::base::monitoring::sensu ( $step = hiera('step', undef), ) { - if $step == undef or $step >= 3 { - include ::sensu - package { 'osops-tools-monitoring-oschecks': - ensure => 'present' - } + include ::sensu + package { 'osops-tools-monitoring-oschecks': + ensure => 'present' } } diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp index ffe28ce..a3f46ec 100644 --- a/manifests/profile/base/neutron/opendaylight.pp +++ b/manifests/profile/base/neutron/opendaylight.pp @@ -39,7 +39,7 @@ class tripleo::profile::base::neutron::opendaylight ( if $step >= 1 { # Configure ODL only on first controller - if hiera('odl_on_controller') and $primary_controller == downcase($::hostname) { + if $primary_controller == downcase($::hostname) { include ::opendaylight } } diff --git a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp index f25aea6..2eb09ae 100644 --- a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp +++ b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp @@ -22,6 +22,14 @@ # (Optional) Port to use for OpenDaylight # Defaults to hiera('opendaylight::odl_rest_port') # +# [*odl_username*] +# (Optional) Username to configure for OpenDaylight +# Defaults to 'admin' +# +# [*odl_password*] +# (Optional) Password to configure for OpenDaylight +# Defaults to 'admin' +# # [*conn_proto*] # (Optional) Protocol to use to for ODL REST access # Defaults to hiera('opendaylight::nb_connection_protocol') @@ -32,23 +40,22 @@ # Defaults to hiera('step') # class tripleo::profile::base::neutron::plugins::ml2::opendaylight ( - $odl_port = hiera('opendaylight::odl_rest_port'), - $conn_proto = hiera('opendaylight::nb_connection_protocol'), - $step = hiera('step'), + $odl_port = hiera('opendaylight::odl_rest_port'), + $odl_username = hiera('opendaylight::username'), + $odl_password = hiera('opendaylight::password'), + $conn_proto = hiera('opendaylight::nb_connection_protocol'), + $step = hiera('step'), ) { if $step >= 4 { - # Figure out ODL IP - if hiera('odl_on_controller') { - $odl_url_ip = hiera('opendaylight_api_vip') - } else { - $odl_url_ip = hiera('opendaylight::odl_bind_ip') - } + $odl_url_ip = hiera('opendaylight_api_vip') if ! $odl_url_ip { fail('OpenDaylight Controller IP/VIP is Empty') } class { '::neutron::plugins::ml2::opendaylight': - odl_url => "${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron"; + odl_username => $odl_username, + odl_password => $odl_password, + odl_url => "${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron"; } } } diff --git a/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp index 7548046..91c5168 100644 --- a/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp +++ b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp @@ -48,14 +48,8 @@ class tripleo::profile::base::neutron::plugins::ovs::opendaylight ( ) { if $step >= 4 { - # Figure out ODL IP (and VIP if on controller) - if hiera('odl_on_controller') { - $opendaylight_controller_ip = $odl_api_ips[0] - $odl_url_ip = hiera('opendaylight_api_vip') - } else { - $opendaylight_controller_ip = hiera('opendaylight::odl_bind_ip') - $odl_url_ip = $opendaylight_controller_ip - } + $opendaylight_controller_ip = $odl_api_ips[0] + $odl_url_ip = hiera('opendaylight_api_vip') if ! $opendaylight_controller_ip { fail('OpenDaylight Controller IP is Empty') } diff --git a/manifests/profile/base/rabbitmq.pp b/manifests/profile/base/rabbitmq.pp index b521999..d90805a 100644 --- a/manifests/profile/base/rabbitmq.pp +++ b/manifests/profile/base/rabbitmq.pp @@ -68,7 +68,6 @@ class tripleo::profile::base::rabbitmq ( class { '::rabbitmq': config_cluster => $manage_service, cluster_nodes => $nodes, - tcp_keepalive => false, config_kernel_variables => $kernel_variables, config_variables => $config_variables, environment_variables => $rabbit_env, @@ -85,7 +84,6 @@ class tripleo::profile::base::rabbitmq ( } else { # Standard configuration class { '::rabbitmq': - tcp_keepalive => false, config_kernel_variables => $kernel_variables, config_variables => $config_variables, environment_variables => $rabbit_env, diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp index feabf86..15b4686 100644 --- a/manifests/profile/base/swift/proxy.pp +++ b/manifests/profile/base/swift/proxy.pp @@ -31,10 +31,20 @@ # (Optional) memcache port # Defaults to 11211 # +# [*rabbit_hosts*] +# list of the rabbbit host IPs +# Defaults to hiera('rabbitmq_node_ips') +# +# [*rabbit_port*] +# IP port for rabbitmq service +# Defaults to hiera('swift::proxy::ceilometer::rabbit_port', 5672) +# class tripleo::profile::base::swift::proxy ( - $step = hiera('step'), + $step = hiera('step'), $memcache_servers = hiera('memcached_node_ips'), - $memcache_port = 11211, + $memcache_port = 11211, + $rabbit_hosts = hiera('rabbitmq_node_ips', undef), + $rabbit_port = hiera('swift::proxy::ceilometer::rabbit_port', 5672), ) { if $step >= 4 { $swift_memcache_servers = suffix(any2array(normalize_ip_for_uri($memcache_servers)), ":${memcache_port}") @@ -53,7 +63,10 @@ class tripleo::profile::base::swift::proxy ( include ::swift::proxy::tempurl include ::swift::proxy::formpost include ::swift::proxy::bulk - include ::swift::proxy::ceilometer + $swift_rabbit_hosts = suffix(any2array(normalize_ip_for_uri($rabbit_hosts)), ":${rabbit_port}") + class { '::swift::proxy::ceilometer': + rabbit_hosts => $swift_rabbit_hosts, + } include ::swift::proxy::versioned_writes } } diff --git a/manifests/profile/base/zaqar.pp b/manifests/profile/base/zaqar.pp new file mode 100644 index 0000000..89a03ad --- /dev/null +++ b/manifests/profile/base/zaqar.pp @@ -0,0 +1,63 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::zaqar +# +# Zaqar profile for tripleo +# +# === Parameters +# +# [*sync_db*] +# (Optional) Whether to run db sync +# Defaults to true +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::zaqar ( + $step = hiera('step'), +) { + if $step >= 4 { + include ::zaqar + + if str2bool(hiera('mongodb::server::ipv6', false)) { + $mongo_node_ips_with_port_prefixed = prefix(hiera('mongodb_node_ips'), '[') + $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017') + } else { + $mongo_node_ips_with_port = suffix(hiera('mongodb_node_ips'), ':27017') + } + $mongodb_replset = hiera('mongodb::server::replset') + $mongo_node_string = join($mongo_node_ips_with_port, ',') + $database_connection = "mongodb://${mongo_node_string}/zaqar?replicaSet=${mongodb_replset}" + + class { '::zaqar::management::mongodb': + uri => $database_connection, + } + class {'::zaqar::messaging::mongodb': + uri => $database_connection, + } + include ::zaqar::transport::websocket + include ::zaqar::transport::wsgi + + # TODO (bcrochet): At some point, the transports should be split out to + # seperate services. + include ::zaqar::server + zaqar::server_instance{ '1': + transport => 'websocket' + } + } +} + |