Add httpd and tls support to manila-api
Allow specifying TLS options, including the manila_api_network and include the generic apache profile to allow setting options when manila-api is deployed under apache/mod_wsgi. Change-Id: I47b8820667f7c524a15aa28659626382586d160f
This commit is contained in:
parent
e43c67e26c
commit
8253d883be
@ -995,6 +995,7 @@ class tripleo::haproxy (
|
||||
mode => 'http',
|
||||
public_ssl_port => $ports[manila_api_ssl_port],
|
||||
service_network => $manila_network,
|
||||
member_options => union($haproxy_member_options, $internal_tls_member_options),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,27 @@
|
||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
||||
# Defaults to hiera('manila_api_short_bootstrap_node_name')
|
||||
#
|
||||
# [*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', {}).
|
||||
#
|
||||
# [*manila_api_network*]
|
||||
# (Optional) The network name where the manila API endpoint is listening on.
|
||||
# This is set by t-h-t.
|
||||
# Defaults to hiera('manila_api_network', undef)
|
||||
#
|
||||
# [*enable_internal_tls*]
|
||||
# (Optional) Whether TLS in the internal network is enabled or not.
|
||||
# Defaults to hiera('enable_internal_tls', false)
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
@ -64,6 +85,9 @@ class tripleo::profile::base::manila::api (
|
||||
$backend_vnx_enabled = hiera('manila_backend_vnx_enabled', false),
|
||||
$backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false),
|
||||
$bootstrap_node = hiera('manila_api_short_bootstrap_node_name', undef),
|
||||
$certificates_specs = hiera('apache_certificates_specs', {}),
|
||||
$manila_api_network = hiera('manila_api_network', undef),
|
||||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
||||
$step = Integer(hiera('step')),
|
||||
) {
|
||||
if $::hostname == downcase($bootstrap_node) {
|
||||
@ -74,7 +98,19 @@ class tripleo::profile::base::manila::api (
|
||||
|
||||
include ::tripleo::profile::base::manila
|
||||
|
||||
if $enable_internal_tls {
|
||||
if !$manila_api_network {
|
||||
fail('manila_api_network is not set in the hieradata.')
|
||||
}
|
||||
$tls_certfile = $certificates_specs["httpd-${manila_api_network}"]['service_certificate']
|
||||
$tls_keyfile = $certificates_specs["httpd-${manila_api_network}"]['service_key']
|
||||
} else {
|
||||
$tls_certfile = undef
|
||||
$tls_keyfile = undef
|
||||
}
|
||||
|
||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
||||
include ::tripleo::profile::base::apache
|
||||
if $backend_generic_enabled or $backend_netapp_enabled or $backend_vmax_enabled or
|
||||
$backend_isilon_enabled or $backend_unity_enabled or $backend_vnx_enabled {
|
||||
$nfs_protocol = 'NFS'
|
||||
@ -91,5 +127,9 @@ class tripleo::profile::base::manila::api (
|
||||
class { '::manila::api' :
|
||||
enabled_share_protocols => join(delete_undef_values([$nfs_protocol,$cifs_protocol,$cephfs_protocol]), ',')
|
||||
}
|
||||
class { '::manila::wsgi::apache':
|
||||
ssl_cert => $tls_certfile,
|
||||
ssl_key => $tls_keyfile,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user