aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/haproxy.pp1
-rw-r--r--manifests/network/os_net_config.pp11
-rw-r--r--manifests/profile/base/ceph/rgw.pp20
-rw-r--r--manifests/profile/base/cinder/api.pp57
4 files changed, 84 insertions, 5 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index e01f0a8..e0a8de8 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -809,6 +809,7 @@ class tripleo::haproxy (
},
public_ssl_port => $ports[cinder_api_ssl_port],
service_network => $cinder_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
diff --git a/manifests/network/os_net_config.pp b/manifests/network/os_net_config.pp
index 7e07f6c..3283b5f 100644
--- a/manifests/network/os_net_config.pp
+++ b/manifests/network/os_net_config.pp
@@ -30,6 +30,17 @@ class tripleo::network::os_net_config {
Package['openvswitch'],
Service['openvswitch'],
],
+ notify => Exec['trigger-keepalived-restart'],
}
+ # By modifying the keepalived.conf file we ensure that puppet will
+ # trigger a restart of keepalived during the main stage. Adding back
+ # any lost conf during the os-net-config step.
+ exec { 'trigger-keepalived-restart':
+ command => '/usr/bin/echo "# Restart keepalived" >> /etc/keepalived/keepalived.conf',
+ path => '/usr/bin:/bin',
+ refreshonly => true,
+ # Only if keepalived is installed
+ onlyif => 'test -e /etc/keepalived/keepalived.conf',
+ }
}
diff --git a/manifests/profile/base/ceph/rgw.pp b/manifests/profile/base/ceph/rgw.pp
index 7cd2b6a..2ecca52 100644
--- a/manifests/profile/base/ceph/rgw.pp
+++ b/manifests/profile/base/ceph/rgw.pp
@@ -18,6 +18,14 @@
#
# === Parameters
#
+# [*civetweb_bind_ip*]
+# IP address where to bind the RGW civetweb instance
+# (Optional) Defaults to 127.0.0.1
+#
+# [*civetweb_bind_port*]
+# PORT where to bind the RGW civetweb instance
+# (Optional) Defaults to 8080
+#
# [*keystone_admin_token*]
# The keystone admin token
#
@@ -36,14 +44,22 @@ class tripleo::profile::base::ceph::rgw (
$keystone_admin_token,
$keystone_url,
$rgw_key,
- $step = hiera('step'),
+ $civetweb_bind_ip = '127.0.0.1',
+ $civetweb_bind_port = '8080',
+ $step = hiera('step'),
) {
include ::tripleo::profile::base::ceph
if $step >= 3 {
- include ::ceph::profile::rgw
$rgw_name = hiera('ceph::profile::params::rgw_name', 'radosgw.gateway')
+ $civetweb_bind_ip_real = normalize_ip_for_uri($civetweb_bind_ip)
+ include ::ceph::params
+ include ::ceph::profile::base
+ ceph::rgw { $rgw_name:
+ frontend_type => 'civetweb',
+ rgw_frontends => "civetweb port=${civetweb_bind_ip_real}:${civetweb_bind_port}"
+ }
ceph::key { "client.${rgw_name}":
secret => $rgw_key,
cap_mon => 'allow *',
diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp
index 8fcc7d6..5ea2058 100644
--- a/manifests/profile/base/cinder/api.pp
+++ b/manifests/profile/base/cinder/api.pp
@@ -22,14 +22,47 @@
# (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', {}).
+#
+# [*cinder_api_network*]
+# (Optional) The network name where the cinder API endpoint is listening on.
+# This is set by t-h-t.
+# Defaults to hiera('cinder_api_network', undef)
+#
+# [*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::cinder::api (
- $bootstrap_node = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $certificates_specs = hiera('apache_certificates_specs', {}),
+ $cinder_api_network = hiera('cinder_api_network', undef),
+ $enable_internal_tls = hiera('enable_internal_tls', false),
+ $generate_service_certificates = hiera('generate_service_certificates', false),
+ $step = hiera('step'),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -39,9 +72,27 @@ class tripleo::profile::base::cinder::api (
include ::tripleo::profile::base::cinder
+ if $enable_internal_tls {
+ if $generate_service_certificates {
+ ensure_resources('tripleo::certmonger::httpd', $certificates_specs)
+ }
+
+ if !$cinder_api_network {
+ fail('cinder_api_network is not set in the hieradata.')
+ }
+ $tls_certfile = $certificates_specs["httpd-${cinder_api_network}"]['service_certificate']
+ $tls_keyfile = $certificates_specs["httpd-${cinder_api_network}"]['service_key']
+ } else {
+ $tls_certfile = undef
+ $tls_keyfile = undef
+ }
+
if $step >= 4 or ($step >= 3 and $sync_db) {
include ::cinder::api
- include ::cinder::wsgi::apache
+ class { '::cinder::wsgi::apache':
+ ssl_cert => $tls_certfile,
+ ssl_key => $tls_keyfile,
+ }
include ::cinder::ceilometer
include ::cinder::glance
}