diff options
Diffstat (limited to 'manifests/profile')
-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 | 1 | ||||
-rw-r--r-- | manifests/profile/base/haproxy.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/keystone.pp | 4 | ||||
-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/rabbitmq.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/zaqar.pp | 63 | ||||
-rw-r--r-- | manifests/profile/pacemaker/database/redis.pp | 17 | ||||
-rw-r--r-- | manifests/profile/pacemaker/haproxy.pp | 2 |
11 files changed, 277 insertions, 95 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 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/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/keystone.pp b/manifests/profile/base/keystone.pp index a0e5538..8a70110 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -221,6 +221,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/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/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' + } + } +} + diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp index 261df30..37c36aa 100644 --- a/manifests/profile/pacemaker/database/redis.pp +++ b/manifests/profile/pacemaker/database/redis.pp @@ -31,10 +31,16 @@ # for more details. # Defaults to hiera('step') # +# [*redis_file_limit*] +# (Optional) The file limit to put in /etc/security/limits.d/redis.conf +# for when redis is managed by pacemaker. Defaults to hiera('redis_file_limit') +# or 10240 (default in redis systemd limits) +# class tripleo::profile::pacemaker::database::redis ( $bootstrap_node = hiera('bootstrap_nodeid'), $enable_load_balancer = hiera('enable_load_balancer', true), $step = hiera('step'), + $redis_file_limit = hiera('redis_file_limit', 10240), ) { if $::hostname == downcase($bootstrap_node) { $pacemaker_master = true @@ -44,6 +50,17 @@ class tripleo::profile::pacemaker::database::redis ( if $step >= 1 { include ::redis + # Until puppet-redis grows support for /etc/security/limits.conf/redis.conf + # https://github.com/arioch/puppet-redis/issues/130 + # we best explicitely set the file limit only in the pacemaker profile + # (the base profile does not need it as it is using systemd which has + # the limits set there) + file { '/etc/security/limits.d/redis.conf': + content => inline_template("redis soft nofile <%= @redis_file_limit %>\nredis hard nofile <%= @redis_file_limit %>\n"), + owner => '0', + group => '0', + mode => '0644', + } if $pacemaker_master and hiera('stack_action') == 'UPDATE' { tripleo::pacemaker::resource_restart_flag { 'redis-master': diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp index 21d8ab1..605bb15 100644 --- a/manifests/profile/pacemaker/haproxy.pp +++ b/manifests/profile/pacemaker/haproxy.pp @@ -44,7 +44,7 @@ class tripleo::profile::pacemaker::haproxy ( $pacemaker_master = false } - if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' { + if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' and $enable_load_balancer { tripleo::pacemaker::resource_restart_flag { 'haproxy-clone': subscribe => Concat['/etc/haproxy/haproxy.cfg'], } |