75 lines
2.1 KiB
Puppet
75 lines
2.1 KiB
Puppet
# == Class: openstack::ha::sahara
|
|
#
|
|
# HA configuration for OpenStack sahara
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*internal_virtual_ip*]
|
|
# (required) String. This is the ipaddress to be used for the internal facing
|
|
# vip
|
|
#
|
|
# [*ipaddresses*]
|
|
# (required) Array. This is an array of ipaddresses for the backend services
|
|
# to be loadbalanced
|
|
#
|
|
# [*public_ssl*]
|
|
# (optional) Boolean. If true, enables SSL for $public_virtual_ip
|
|
# Defaults to false.
|
|
#
|
|
# [*public_ssl_path*]
|
|
# (optional) String. Filesystem path to the file with public certificate
|
|
# content
|
|
# Defaults to undef
|
|
#
|
|
# [*internal_ssl*]
|
|
# (optional) Boolean. If true, enables SSL for $internal_virtual_ip
|
|
# Defaults to false.
|
|
#
|
|
# [*internal_ssl_path*]
|
|
# (optional) String. Filesystem path to the file with internal certificate
|
|
# content
|
|
# Defaults to undef
|
|
#
|
|
# [*public_virtual_ip*]
|
|
# (required) String. This is the ipaddress to be used for the external facing
|
|
# vip
|
|
#
|
|
# [*server_names*]
|
|
# (required) Array. This is an array of server names for the haproxy service
|
|
#
|
|
class openstack::ha::sahara (
|
|
$internal_virtual_ip,
|
|
$ipaddresses,
|
|
$public_virtual_ip,
|
|
$server_names,
|
|
$public_ssl = false,
|
|
$public_ssl_path = undef,
|
|
$internal_ssl = false,
|
|
$internal_ssl_path = undef,
|
|
) {
|
|
|
|
# defaults for any haproxy_service within this class
|
|
Openstack::Ha::Haproxy_service {
|
|
internal_virtual_ip => $internal_virtual_ip,
|
|
ipaddresses => $ipaddresses,
|
|
public_virtual_ip => $public_virtual_ip,
|
|
server_names => $server_names,
|
|
}
|
|
|
|
openstack::ha::haproxy_service { 'sahara':
|
|
order => '150',
|
|
listen_port => 8386,
|
|
public => true,
|
|
public_ssl => $public_ssl,
|
|
public_ssl_path => $public_ssl_path,
|
|
internal_ssl => $internal_ssl,
|
|
internal_ssl_path => $internal_ssl_path,
|
|
require_service => 'sahara-api',
|
|
haproxy_config_options => {
|
|
'option' => 'http-buffer-request',
|
|
'timeout' => 'http-request 10s',
|
|
'http-request' => 'set-header X-Forwarded-Proto https if { ssl_fc }',
|
|
},
|
|
}
|
|
}
|