diff options
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/aodh/api.pp | 58 | ||||
-rw-r--r-- | manifests/profile/base/ceilometer/api.pp | 55 | ||||
-rw-r--r-- | manifests/profile/base/cinder/api.pp | 4 | ||||
-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/zaqar.pp | 19 |
6 files changed, 140 insertions, 15 deletions
diff --git a/manifests/profile/base/aodh/api.pp b/manifests/profile/base/aodh/api.pp index 2dcf802..06dcfe5 100644 --- a/manifests/profile/base/aodh/api.pp +++ b/manifests/profile/base/aodh/api.pp @@ -18,6 +18,35 @@ # # === Parameters # +# [*aodh_network*] +# (Optional) The network name where the aodh endpoint is listening on. +# This is set by t-h-t. +# Defaults to hiera('aodh_api_network', undef) +# +# [*certificates_specs*] +# (Optional) The specifications to give to certmonger for the certificate(s) +# it will create. +# Example with hiera: +# apache_certificates_specs: +# httpd-internal_api: +# hostname: <overcloud controller fqdn> +# service_certificate: <service certificate path> +# service_key: <service key path> +# principal: "haproxy/<overcloud controller fqdn>" +# Defaults to hiera('apache_certificate_specs', {}). +# +# [*enable_internal_tls*] +# (Optional) Whether TLS in the internal network is enabled or not. +# Defaults to hiera('enable_internal_tls', false) +# +# [*generate_service_certificates*] +# (Optional) Whether or not certmonger will generate certificates for +# HAProxy. This could be as many as specified by the $certificates_specs +# variable. +# Note that this doesn't configure the certificates in haproxy, it merely +# creates the certificates. +# Defaults to hiera('generate_service_certificate', false). +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -29,15 +58,38 @@ # class tripleo::profile::base::aodh::api ( - $step = hiera('step'), - $enable_combination_alarms = false, + $aodh_network = hiera('aodh_api_network', undef), + $certificates_specs = hiera('apache_certificates_specs', {}), + $enable_internal_tls = hiera('enable_internal_tls', false), + $generate_service_certificates = hiera('generate_service_certificates', false), + $step = hiera('step'), + $enable_combination_alarms = false, ) { include ::tripleo::profile::base::aodh + if $enable_internal_tls { + if $generate_service_certificates { + ensure_resources('tripleo::certmonger::httpd', $certificates_specs) + } + + if !$aodh_network { + fail('aodh_api_network is not set in the hieradata.') + } + $tls_certfile = $certificates_specs["httpd-${aodh_network}"]['service_certificate'] + $tls_keyfile = $certificates_specs["httpd-${aodh_network}"]['service_key'] + } else { + $tls_certfile = undef + $tls_keyfile = undef + } + + if $step >= 4 { include ::aodh::api - include ::aodh::wsgi::apache + class { '::aodh::wsgi::apache': + ssl_cert => $tls_certfile, + ssl_key => $tls_keyfile, + } #NOTE: Combination alarms are deprecated in newton and disabled by default. # we need a way to override this setting for users still using this type diff --git a/manifests/profile/base/ceilometer/api.pp b/manifests/profile/base/ceilometer/api.pp index da94da2..6ef4748 100644 --- a/manifests/profile/base/ceilometer/api.pp +++ b/manifests/profile/base/ceilometer/api.pp @@ -18,18 +18,69 @@ # # === Parameters # +# [*ceilometer_network*] +# (Optional) The network name where the ceilometer endpoint is listening on. +# This is set by t-h-t. +# Defaults to hiera('ceilometer_api_network', undef) +# +# [*certificates_specs*] +# (Optional) The specifications to give to certmonger for the certificate(s) +# it will create. +# Example with hiera: +# apache_certificates_specs: +# httpd-internal_api: +# hostname: <overcloud controller fqdn> +# service_certificate: <service certificate path> +# service_key: <service key path> +# principal: "haproxy/<overcloud controller fqdn>" +# Defaults to hiera('apache_certificate_specs', {}). +# +# [*enable_internal_tls*] +# (Optional) Whether TLS in the internal network is enabled or not. +# Defaults to hiera('enable_internal_tls', false) +# +# [*generate_service_certificates*] +# (Optional) Whether or not certmonger will generate certificates for +# HAProxy. This could be as many as specified by the $certificates_specs +# variable. +# Note that this doesn't configure the certificates in haproxy, it merely +# creates the certificates. +# Defaults to hiera('generate_service_certificate', false). +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. # Defaults to hiera('step') # class tripleo::profile::base::ceilometer::api ( - $step = hiera('step'), + $ceilometer_network = hiera('ceilometer_api_network', undef), + $certificates_specs = hiera('apache_certificates_specs', {}), + $enable_internal_tls = hiera('enable_internal_tls', false), + $generate_service_certificates = hiera('generate_service_certificates', false), + $step = hiera('step'), ) { include ::tripleo::profile::base::ceilometer + if $enable_internal_tls { + if $generate_service_certificates { + ensure_resources('tripleo::certmonger::httpd', $certificates_specs) + } + + if !$ceilometer_network { + fail('ceilometer_api_network is not set in the hieradata.') + } + $tls_certfile = $certificates_specs["httpd-${ceilometer_network}"]['service_certificate'] + $tls_keyfile = $certificates_specs["httpd-${ceilometer_network}"]['service_key'] + } else { + $tls_certfile = undef + $tls_keyfile = undef + } + if $step >= 4 { include ::ceilometer::api - include ::ceilometer::wsgi::apache + class { '::ceilometer::wsgi::apache': + ssl_cert => $tls_certfile, + ssl_key => $tls_keyfile, + } } } diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp index fa6574d..8fcc7d6 100644 --- a/manifests/profile/base/cinder/api.pp +++ b/manifests/profile/base/cinder/api.pp @@ -40,9 +40,7 @@ class tripleo::profile::base::cinder::api ( include ::tripleo::profile::base::cinder if $step >= 4 or ($step >= 3 and $sync_db) { - class { '::cinder::api': - service_name => 'httpd' - } + 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/zaqar.pp b/manifests/profile/base/zaqar.pp index 6794742..89a03ad 100644 --- a/manifests/profile/base/zaqar.pp +++ b/manifests/profile/base/zaqar.pp @@ -32,8 +32,23 @@ class tripleo::profile::base::zaqar ( ) { if $step >= 4 { include ::zaqar - include ::zaqar::management::mongodb - include ::zaqar::messaging::mongodb + + 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 |