aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/certmonger/httpd.pp62
-rw-r--r--manifests/glance/nfs_mount.pp80
-rw-r--r--manifests/haproxy.pp76
-rw-r--r--manifests/profile/base/aodh.pp6
-rw-r--r--manifests/profile/base/aodh/api.pp58
-rw-r--r--manifests/profile/base/ceilometer.pp11
-rw-r--r--manifests/profile/base/ceilometer/api.pp55
-rw-r--r--manifests/profile/base/cinder.pp7
-rw-r--r--manifests/profile/base/cinder/api.pp1
-rw-r--r--manifests/profile/base/glance/api.pp23
-rw-r--r--manifests/profile/base/haproxy.pp2
-rw-r--r--manifests/profile/base/heat.pp7
-rw-r--r--manifests/profile/base/ironic.pp7
-rw-r--r--manifests/profile/base/keystone.pp97
-rw-r--r--manifests/profile/base/logging/fluentd.pp160
-rw-r--r--manifests/profile/base/manila.pp7
-rw-r--r--manifests/profile/base/mistral.pp7
-rw-r--r--manifests/profile/base/monitoring/sensu.pp8
-rw-r--r--manifests/profile/base/neutron.pp7
-rw-r--r--manifests/profile/base/neutron/opendaylight.pp2
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/opendaylight.pp27
-rw-r--r--manifests/profile/base/neutron/plugins/ovs/opendaylight.pp10
-rw-r--r--manifests/profile/base/nova.pp7
-rw-r--r--manifests/profile/base/rabbitmq.pp2
-rw-r--r--manifests/profile/base/sahara.pp7
-rw-r--r--manifests/profile/base/swift/proxy.pp1
-rw-r--r--manifests/profile/base/swift/storage.pp1
-rw-r--r--manifests/profile/base/zaqar.pp63
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp12
-rw-r--r--manifests/profile/pacemaker/database/redis.pp17
-rw-r--r--manifests/profile/pacemaker/haproxy.pp2
-rw-r--r--manifests/ui.pp2
32 files changed, 690 insertions, 144 deletions
diff --git a/manifests/certmonger/httpd.pp b/manifests/certmonger/httpd.pp
new file mode 100644
index 0000000..94b48b7
--- /dev/null
+++ b/manifests/certmonger/httpd.pp
@@ -0,0 +1,62 @@
+# 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.
+#
+# == Resource: tripleo::certmonger::httpd
+#
+# Request a certificate for the httpd service and do the necessary setup.
+#
+# === Parameters
+#
+# [*hostname*]
+# The hostname of the node. this will be set in the CN of the certificate.
+#
+# [*service_certificate*]
+# The path to the certificate that will be used for TLS in this service.
+#
+# [*service_key*]
+# The path to the key that will be used for TLS in this service.
+#
+# [*certmonger_ca*]
+# (Optional) The CA that certmonger will use to generate the certificates.
+# Defaults to hiera('certmonger_ca', 'local').
+#
+# [*principal*]
+# The haproxy service principal that is set for HAProxy in kerberos.
+#
+define tripleo::certmonger::httpd (
+ $hostname,
+ $service_certificate,
+ $service_key,
+ $certmonger_ca = hiera('certmonger_ca', 'local'),
+ $principal = undef,
+) {
+ include ::certmonger
+ include ::apache::params
+
+ $postsave_cmd = "systemctl reload ${::apache::params::service_name}"
+ certmonger_certificate { $name :
+ ensure => 'present',
+ certfile => $service_certificate,
+ keyfile => $service_key,
+ hostname => $hostname,
+ dnsname => $hostname,
+ principal => $principal,
+ postsave_cmd => $postsave_cmd,
+ ca => $certmonger_ca,
+ wait => true,
+ require => Class['::certmonger'],
+ }
+
+ Certmonger_certificate[$name] ~> Service<| title == $::apache::params::service_name |>
+}
diff --git a/manifests/glance/nfs_mount.pp b/manifests/glance/nfs_mount.pp
new file mode 100644
index 0000000..035191d
--- /dev/null
+++ b/manifests/glance/nfs_mount.pp
@@ -0,0 +1,80 @@
+# 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::glance::nfs_mount
+#
+# NFS mount for Glance image storage file backend
+#
+# === Parameters
+#
+# [*share*]
+# NFS share to mount, in 'IP:PATH' format.
+#
+# [*options*]
+# (Optional) NFS mount options. Defaults to
+# 'intr,context=system_u:object_r:glance_var_lib_t:s0'
+#
+# [*edit_fstab*]
+# (Optional) Whether to persist the mount info to fstab.
+# Defaults to true.
+#
+# [*fstab_fstype*]
+# (Optional) File system type to use in fstab for the mount.
+# Defaults to 'nfs4'.
+#
+# [*fstab_prepend_options*]
+# (Optional) Extra mount options for fstab (prepended to $options).
+# Defaults to 'bg', so that a potentially failed mount doesn't
+# prevent the machine from booting.
+#
+class tripleo::glance::nfs_mount (
+ $share,
+ $options = 'intr,context=system_u:object_r:glance_var_lib_t:s0',
+ $edit_fstab = true,
+ $fstab_fstype = 'nfs4',
+ $fstab_prepend_options = 'bg'
+) {
+
+ $images_dir = '/var/lib/glance/images'
+
+ if $options and $options != '' {
+ $options_part = "-o ${options}"
+ } else {
+ $options_part = ''
+ }
+
+ if $fstab_prepend_options and $fstab_prepend_options != '' {
+ $fstab_prepend_part = "${fstab_prepend_options},"
+ } else {
+ $fstab_prepend_part = ''
+ }
+
+ file { $images_dir:
+ ensure => directory,
+ } ->
+ exec { 'NFS mount for glance file backend':
+ path => ['/usr/sbin', '/usr/bin'],
+ command => "mount -t nfs '${share}' '${images_dir}' ${options_part}",
+ unless => "mount | grep ' ${images_dir} '",
+ }
+
+ if $edit_fstab {
+ file_line { 'NFS for glance in fstab':
+ ensure => present,
+ line => "${share} ${images_dir} ${fstab_fstype} ${fstab_prepend_part}${options} 0 0",
+ match => " ${images_dir} ",
+ path => '/etc/fstab',
+ }
+ }
+}
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index e17dc90..d925da0 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -106,6 +106,11 @@
# flag is set.
# Defaults to {}
#
+# [*enable_internal_tls*]
+# A flag that indicates if the servers in the internal network are using TLS.
+# This enables the 'ssl' option for the server members that are proxied.
+# Defaults to hiera('enable_internal_tls', false)
+#
# [*ssl_cipher_suite*]
# The default string describing the list of cipher algorithms ("cipher suite")
# that are negotiated during the SSL/TLS handshake for all "bind" lines. This
@@ -229,6 +234,10 @@
# (optional) Enable or not RabbitMQ binding
# Defaults to false
#
+# [*docker_registry*]
+# (optional) Enable or not the Docker Registry API binding
+# Defaults to hiera('enable_docker_registry', false)
+#
# [*redis*]
# (optional) Enable or not Redis binding
# Defaults to hiera('redis_enabled', false)
@@ -258,6 +267,10 @@
# (optional) Enable or not Zaqar Websockets binding
# Defaults to false
#
+# [*ui*]
+# (optional) Enable or not TripleO UI
+# Defaults to false
+#
# [*aodh_network*]
# (optional) Specify the network aodh is running on.
# Defaults to hiera('aodh_api_network', undef)
@@ -278,6 +291,10 @@
# (optional) Specify the network cinder is running on.
# Defaults to hiera('cinder_api_network', undef)
#
+# [*docker_registry_network*]
+# (optional) Specify the network docker-registry is running on.
+# Defaults to hiera('docker_registry_network', undef)
+#
# [*glance_api_network*]
# (optional) Specify the network glance_api is running on.
# Defaults to hiera('glance_api_network', undef)
@@ -373,6 +390,8 @@
# 'ceilometer_api_ssl_port' (Defaults to 13777)
# 'cinder_api_port' (Defaults to 8776)
# 'cinder_api_ssl_port' (Defaults to 13776)
+# 'docker_registry_port' (Defaults to 8787)
+# 'docker_registry_ssl_port' (Defaults to 13787)
# 'glance_api_port' (Defaults to 9292)
# 'glance_api_ssl_port' (Defaults to 13292)
# 'glance_registry_port' (Defaults to 9191)
@@ -437,6 +456,7 @@ class tripleo::haproxy (
$service_certificate = undef,
$use_internal_certificates = false,
$internal_certificates_specs = {},
+ $enable_internal_tls = hiera('enable_internal_tls', false),
$ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
$ssl_options = 'no-sslv3',
$haproxy_stats_certificate = undef,
@@ -467,6 +487,7 @@ class tripleo::haproxy (
$mysql = hiera('mysql_enabled', false),
$mysql_clustercheck = false,
$rabbitmq = false,
+ $docker_registry = hiera('enable_docker_registry', false),
$redis = hiera('redis_enabled', false),
$redis_password = undef,
$midonet_api = false,
@@ -474,11 +495,13 @@ class tripleo::haproxy (
$ceph_rgw = hiera('ceph_rgw_enabled', false),
$opendaylight = hiera('opendaylight_api_enabled', false),
$zaqar_ws = hiera('zaqar_api_enabled', false),
+ $ui = hiera('enable_ui', false),
$aodh_network = hiera('aodh_api_network', undef),
$barbican_network = hiera('barbican_api_network', false),
$ceilometer_network = hiera('ceilometer_api_network', undef),
$ceph_rgw_network = hiera('ceph_rgw_network', undef),
$cinder_network = hiera('cinder_api_network', undef),
+ $docker_registry_network = hiera('docker_registry_network', undef),
$glance_api_network = hiera('glance_api_network', undef),
$glance_registry_network = hiera('glance_registry_network', undef),
$gnocchi_network = hiera('gnocchi_api_network', undef),
@@ -510,6 +533,8 @@ class tripleo::haproxy (
ceilometer_api_ssl_port => 13777,
cinder_api_port => 8776,
cinder_api_ssl_port => 13776,
+ docker_registry_port => 8787,
+ docker_registry_ssl_port => 13787,
glance_api_port => 9292,
glance_api_ssl_port => 13292,
glance_registry_port => 9191,
@@ -546,6 +571,8 @@ class tripleo::haproxy (
swift_proxy_ssl_port => 13808,
trove_api_port => 8779,
trove_api_ssl_port => 13779,
+ ui_port => 3000,
+ ui_ssl_port => 443,
zaqar_api_port => 8888,
zaqar_api_ssl_port => 13888,
ceph_rgw_port => 8080,
@@ -555,6 +582,13 @@ class tripleo::haproxy (
}
$ports = merge($default_service_ports, $service_ports)
+ if $enable_internal_tls {
+ # TODO(jaosorior): change verify none to verify required.
+ $internal_tls_member_options = ['ssl', 'verify none']
+ } else {
+ $internal_tls_member_options = []
+ }
+
$controller_hosts_real = any2array(split($controller_hosts, ','))
if ! $controller_hosts_names {
$controller_hosts_names_real = $controller_hosts_real
@@ -646,6 +680,10 @@ class tripleo::haproxy (
'maxconn' => $haproxy_global_maxconn,
'ssl-default-bind-ciphers' => $ssl_cipher_suite,
'ssl-default-bind-options' => $ssl_options,
+ 'stats' => [
+ 'socket /var/run/haproxy.sock mode 600 level user',
+ 'timeout 2m'
+ ],
},
defaults_options => {
'mode' => 'tcp',
@@ -694,6 +732,7 @@ class tripleo::haproxy (
},
public_ssl_port => $ports[keystone_admin_api_ssl_port],
service_network => $keystone_admin_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
@@ -723,6 +762,7 @@ class tripleo::haproxy (
listen_options => merge($keystone_listen_opts, $keystone_public_tls_listen_opts),
public_ssl_port => $ports[keystone_public_api_ssl_port],
service_network => $keystone_public_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
@@ -879,6 +919,7 @@ class tripleo::haproxy (
server_names => hiera('ceilometer_api_node_names', $controller_hosts_names_real),
public_ssl_port => $ports[ceilometer_api_ssl_port],
service_network => $ceilometer_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
@@ -891,6 +932,7 @@ class tripleo::haproxy (
server_names => hiera('aodh_api_node_names', $controller_hosts_names_real),
public_ssl_port => $ports[aodh_api_ssl_port],
service_network => $aodh_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
@@ -931,12 +973,17 @@ class tripleo::haproxy (
}
if $swift_proxy_server {
+ $swift_proxy_server_listen_options = {
+ 'timeout client' => '2m',
+ 'timeout server' => '2m',
+ }
::tripleo::haproxy::endpoint { 'swift_proxy_server':
public_virtual_ip => $public_virtual_ip,
internal_ip => hiera('swift_proxy_vip', $controller_virtual_ip),
service_port => $ports[swift_proxy_port],
ip_addresses => hiera('swift_proxy_node_ips', $controller_hosts_real),
server_names => hiera('swift_proxy_node_names', $controller_hosts_names_real),
+ listen_options => $swift_proxy_server_listen_options,
public_ssl_port => $ports[swift_proxy_ssl_port],
service_network => $swift_proxy_server_network,
}
@@ -1089,6 +1136,18 @@ class tripleo::haproxy (
}
}
+ if $docker_registry {
+ ::tripleo::haproxy::endpoint { 'docker-registry':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('docker_registry_vip', $controller_virtual_ip),
+ service_port => $ports[docker_registry_port],
+ ip_addresses => hiera('docker_registry_node_ips', $controller_hosts_real),
+ server_names => hiera('docker_registry_node_names', $controller_hosts_names_real),
+ public_ssl_port => $ports[docker_registry_ssl_port],
+ service_network => $docker_registry_network,
+ }
+ }
+
if $redis {
if $redis_password {
$redis_tcp_check_options = ["send AUTH\\ ${redis_password}\\r\\n"]
@@ -1164,8 +1223,8 @@ class tripleo::haproxy (
$opendaylight_api_vip = hiera('opendaylight_api_vip', $controller_virtual_ip)
$opendaylight_bind_opts = {
- "${opendaylight_api_vip}:8081" => [],
- "${public_virtual_ip}:8081" => [],
+ "${opendaylight_api_vip}:8081" => $haproxy_listen_bind_param,
+ "${public_virtual_ip}:8081" => $haproxy_listen_bind_param,
}
if $opendaylight {
@@ -1207,4 +1266,17 @@ class tripleo::haproxy (
service_network => $zaqar_api_network,
}
}
+
+ if $ui {
+ ::tripleo::haproxy::endpoint { 'ui':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ui_vip', $controller_virtual_ip),
+ service_port => $ports[ui_port],
+ ip_addresses => hiera('ui_ips', $controller_hosts_real),
+ server_names => $controller_hosts_names_real,
+ mode => 'http',
+ public_ssl_port => $ports[ui_ssl_port],
+ }
+ }
+
}
diff --git a/manifests/profile/base/aodh.pp b/manifests/profile/base/aodh.pp
index 49a543a..02c1d07 100644
--- a/manifests/profile/base/aodh.pp
+++ b/manifests/profile/base/aodh.pp
@@ -31,11 +31,15 @@
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('aodh::rabbit_port', 5672)
class tripleo::profile::base::aodh (
$step = hiera('step'),
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('aodh::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
@@ -46,7 +50,7 @@ class tripleo::profile::base::aodh (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::aodh' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::aodh::auth
include ::aodh::config
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.pp b/manifests/profile/base/ceilometer.pp
index aaf904f..959d86c 100644
--- a/manifests/profile/base/ceilometer.pp
+++ b/manifests/profile/base/ceilometer.pp
@@ -26,15 +26,20 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('ceilometer::rabbit_port', 5672)
class tripleo::profile::base::ceilometer (
- $step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('ceilometer::rabbit_port', 5672),
) {
if $step >= 3 {
class { '::ceilometer' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::ceilometer::config
}
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.pp b/manifests/profile/base/cinder.pp
index 510ea40..9f7c453 100644
--- a/manifests/profile/base/cinder.pp
+++ b/manifests/profile/base/cinder.pp
@@ -33,12 +33,17 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('cinder::rabbit_port', 5672)
class tripleo::profile::base::cinder (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$cinder_enable_db_purge = true,
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('cinder::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -48,7 +53,7 @@ class tripleo::profile::base::cinder (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::cinder' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::cinder::config
}
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 ecffd7f..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.
@@ -30,13 +34,23 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# 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),
+ $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' }
@@ -53,8 +67,9 @@ class tripleo::profile::base::glance::api (
class { '::glance::api':
stores => $glance_store,
}
+
class { '::glance::notify::rabbitmq' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include join(['::glance::backend::', $glance_backend])
}
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 2035a4f..abb9f76 100644
--- a/manifests/profile/base/heat.pp
+++ b/manifests/profile/base/heat.pp
@@ -38,6 +38,10 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('heat::rabbit_port', 5672)
class tripleo::profile::base::heat (
$bootstrap_node = downcase(hiera('bootstrap_nodeid')),
@@ -45,6 +49,7 @@ class tripleo::profile::base::heat (
$notification_driver = 'messaging',
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('heat::rabbit_port', 5672),
) {
# 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.
@@ -59,7 +64,7 @@ class tripleo::profile::base::heat (
if $step >= 4 {
class { '::heat' :
notification_driver => $notification_driver,
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::heat::config
include ::heat::cors
diff --git a/manifests/profile/base/ironic.pp b/manifests/profile/base/ironic.pp
index c4e525a..e63e4c6 100644
--- a/manifests/profile/base/ironic.pp
+++ b/manifests/profile/base/ironic.pp
@@ -29,11 +29,16 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('ironic::rabbit_port', 5672)
class tripleo::profile::base::ironic (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('ironic::rabbit_port', 5672),
) {
# Database is accessed by both API and conductor, hence it's here.
if $::hostname == downcase($bootstrap_node) {
@@ -45,7 +50,7 @@ class tripleo::profile::base::ironic (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::ironic':
sync_db => $sync_db,
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::ironic::cors
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index 29234d2..87fa3c1 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -18,28 +18,73 @@
#
# === Parameters
#
+# [*admin_endpoint_network*]
+# (Optional) The network name where the admin endpoint is listening on.
+# This is set by t-h-t.
+# Defaults to hiera('keystone_admin_api_network', undef)
+#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
+# [*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).
+#
# [*manage_db_purge*]
# (Optional) Whether keystone token flushing should be enabled
# Defaults to hiera('keystone_enable_db_purge', true)
#
+# [*public_endpoint_network*]
+# (Optional) The network name where the admin endpoint is listening on.
+# This is set by t-h-t.
+# Defaults to hiera('keystone_public_api_network', undef)
+#
+#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('keystone::rabbit_port', 5672)
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*rabbit_hosts*]
-# list of the rabbbit host IPs
-# Defaults to hiera('rabbitmq_node_ips')
-
class tripleo::profile::base::keystone (
- $bootstrap_node = hiera('bootstrap_nodeid', undef),
- $manage_db_purge = hiera('keystone_enable_db_purge', true),
- $step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $admin_endpoint_network = hiera('keystone_admin_api_network', undef),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $certificates_specs = hiera('apache_certificates_specs', {}),
+ $enable_internal_tls = hiera('enable_internal_tls', false),
+ $generate_service_certificates = hiera('generate_service_certificates', false),
+ $manage_db_purge = hiera('keystone_enable_db_purge', true),
+ $public_endpoint_network = hiera('keystone_public_api_network', undef),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('keystone::rabbit_port', 5672),
+ $step = hiera('step'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -53,15 +98,43 @@ class tripleo::profile::base::keystone (
$manage_domain = false
}
+ if $enable_internal_tls {
+ if $generate_service_certificates {
+ ensure_resources('tripleo::certmonger::httpd', $certificates_specs)
+ }
+
+ if !$public_endpoint_network {
+ fail('keystone_public_api_network is not set in the hieradata.')
+ }
+ $tls_certfile = $certificates_specs["httpd-${public_endpoint_network}"]['service_certificate']
+ $tls_keyfile = $certificates_specs["httpd-${public_endpoint_network}"]['service_key']
+
+ if !$admin_endpoint_network {
+ fail('keystone_admin_api_network is not set in the hieradata.')
+ }
+ $tls_certfile_admin = $certificates_specs["httpd-${admin_endpoint_network}"]['service_certificate']
+ $tls_keyfile_admin = $certificates_specs["httpd-${admin_endpoint_network}"]['service_key']
+ } else {
+ $tls_certfile = undef
+ $tls_keyfile = undef
+ $tls_certfile_admin = undef
+ $tls_keyfile_admin = undef
+ }
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
class { '::keystone':
sync_db => $sync_db,
enable_bootstrap => $sync_db,
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::keystone::config
- include ::keystone::wsgi::apache
+ class { '::keystone::wsgi::apache':
+ ssl_cert => $tls_certfile,
+ ssl_key => $tls_keyfile,
+ ssl_cert_admin => $tls_certfile_admin,
+ ssl_key_admin => $tls_keyfile_admin,
+ }
include ::keystone::cors
if $manage_roles {
@@ -151,6 +224,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/manila.pp b/manifests/profile/base/manila.pp
index 5210284..393dd52 100644
--- a/manifests/profile/base/manila.pp
+++ b/manifests/profile/base/manila.pp
@@ -29,11 +29,16 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('manila::rabbit_port', 5672)
class tripleo::profile::base::manila (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('manila::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -43,7 +48,7 @@ class tripleo::profile::base::manila (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::manila' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::manila::config
}
diff --git a/manifests/profile/base/mistral.pp b/manifests/profile/base/mistral.pp
index 9986d22..dcd9d0b 100644
--- a/manifests/profile/base/mistral.pp
+++ b/manifests/profile/base/mistral.pp
@@ -30,11 +30,16 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('mistral::rabbit_port', 5672)
class tripleo::profile::base::mistral (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('mistral::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -44,7 +49,7 @@ class tripleo::profile::base::mistral (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::mistral':
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::mistral::config
include ::mistral::client
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.pp b/manifests/profile/base/neutron.pp
index 90a5c23..53df3d9 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -25,14 +25,19 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('neutron::rabbit_port', 5672
class tripleo::profile::base::neutron (
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('neutron::rabbit_port', 5672),
) {
if $step >= 3 {
class { '::neutron' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::neutron::config
}
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/nova.pp b/manifests/profile/base/nova.pp
index 74f0460..b397802 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -41,6 +41,10 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('nova::rabbit_port', 5672)
class tripleo::profile::base::nova (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
@@ -49,6 +53,7 @@ class tripleo::profile::base::nova (
$nova_compute_enabled = false,
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('nova::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -64,7 +69,7 @@ class tripleo::profile::base::nova (
if hiera('step') >= 4 or (hiera('step') >= 3 and $sync_db) {
class { '::nova' :
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
include ::nova::config
class { '::nova::cache':
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/sahara.pp b/manifests/profile/base/sahara.pp
index cf0ee90..c034628 100644
--- a/manifests/profile/base/sahara.pp
+++ b/manifests/profile/base/sahara.pp
@@ -29,11 +29,16 @@
# [*rabbit_hosts*]
# list of the rabbbit host IPs
# Defaults to hiera('rabbitmq_node_ips')
+#
+# [*rabbit_port*]
+# IP port for rabbitmq service
+# Defaults to hiera('sahara::rabbit_port', 5672)
class tripleo::profile::base::sahara (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
$rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('sahara::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -44,7 +49,7 @@ class tripleo::profile::base::sahara (
if $step >= 4 or ($step >= 3 and $sync_db){
class { '::sahara':
sync_db => $sync_db,
- rabbit_hosts => $rabbit_hosts,
+ rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
}
}
}
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 8cb1132..feabf86 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -38,6 +38,7 @@ class tripleo::profile::base::swift::proxy (
) {
if $step >= 4 {
$swift_memcache_servers = suffix(any2array(normalize_ip_for_uri($memcache_servers)), ":${memcache_port}")
+ include ::swift::config
include ::swift::proxy
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
diff --git a/manifests/profile/base/swift/storage.pp b/manifests/profile/base/swift/storage.pp
index d1660de..568be66 100644
--- a/manifests/profile/base/swift/storage.pp
+++ b/manifests/profile/base/swift/storage.pp
@@ -34,6 +34,7 @@ class tripleo::profile::base::swift::storage (
) {
if $step >= 4 {
if $enable_swift_storage {
+ include ::swift::config
include ::swift::storage::disks
include ::swift::storage::all
if(!defined(File['/srv/node'])) {
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/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 7464854..a353e5f 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -89,9 +89,19 @@ class tripleo::profile::pacemaker::database::mysql (
}
}
+ # remove_default_accounts parameter will execute some mysql commands
+ # to remove the default accounts created by MySQL package.
+ # We need MySQL running to run the commands successfully, so better to
+ # wait step 2 before trying to run the commands.
+ if $step >= 2 and $pacemaker_master {
+ $remove_default_accounts = true
+ } else {
+ $remove_default_accounts = false
+ }
+
class { '::tripleo::profile::base::database::mysql':
manage_resources => false,
- remove_default_accounts => $pacemaker_master,
+ remove_default_accounts => $remove_default_accounts,
mysql_server_options => $mysqld_options,
}
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'],
}
diff --git a/manifests/ui.pp b/manifests/ui.pp
index dc51bfc..41ad8d6 100644
--- a/manifests/ui.pp
+++ b/manifests/ui.pp
@@ -70,7 +70,7 @@
#
class tripleo::ui (
$servername = $::fqdn,
- $bind_host = undef,
+ $bind_host = hiera('controller_host'),
$ui_port = 3000,
$keystone_url = hiera('keystone_auth_uri_v2'),
$heat_url = hiera('heat::keystone::auth::public_url', undef),