aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/haproxy.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/haproxy.pp')
-rw-r--r--manifests/haproxy.pp61
1 files changed, 61 insertions, 0 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 1e76733..2fa02c9 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -167,6 +167,10 @@
# (optional) Enable or not Nova API binding
# Defaults to hiera('nova_api_enabled', false)
#
+# [*nova_placement*]
+# (optional) Enable or not Nova Placement API binding
+# Defaults to hiera('nova_placement_enabled', false)
+#
# [*nova_metadata*]
# (optional) Enable or not Nova metadata binding
# Defaults to hiera('nova_api_enabled', false)
@@ -247,6 +251,10 @@
# (optional) Enable or not RabbitMQ binding
# Defaults to false
#
+# [*etcd*]
+# (optional) Enable or not Etcd binding
+# Defaults to hiera('etcd_enabled', false)
+#
# [*docker_registry*]
# (optional) Enable or not the Docker Registry API binding
# Defaults to hiera('enable_docker_registry', false)
@@ -376,6 +384,10 @@
# (optional) Specify the network nova_osapi is running on.
# Defaults to hiera('nova_api_network', undef)
#
+# [*nova_placement_network*]
+# (optional) Specify the network nova_placement is running on.
+# Defaults to hiera('nova_placement_network', undef)
+#
# [*opendaylight_network*]
# (optional) Specify the network opendaylight is running on.
# Defaults to hiera('opendaylight_api_network', undef)
@@ -444,6 +456,8 @@
# 'neutron_api_ssl_port' (Defaults to 13696)
# 'nova_api_port' (Defaults to 8774)
# 'nova_api_ssl_port' (Defaults to 13774)
+# 'nova_placement_port' (Defaults to 8778)
+# 'nova_placement_ssl_port' (Defaults to 13778)
# 'nova_metadata_port' (Defaults to 8775)
# 'nova_novnc_port' (Defaults to 6080)
# 'nova_novnc_ssl_port' (Defaults to 13080)
@@ -500,6 +514,7 @@ class tripleo::haproxy (
$glance_api = hiera('glance_api_enabled', false),
$glance_registry = hiera('glance_registry_enabled', false),
$nova_osapi = hiera('nova_api_enabled', false),
+ $nova_placement = hiera('nova_placement_enabled', false),
$nova_metadata = hiera('nova_api_enabled', false),
$nova_novncproxy = hiera('nova_vnc_proxy_enabled', false),
$ceilometer = hiera('ceilometer_api_enabled', false),
@@ -519,6 +534,7 @@ class tripleo::haproxy (
$mysql_clustercheck = false,
$mysql_member_options = undef,
$rabbitmq = false,
+ $etcd = hiera('etcd_enabled', false),
$docker_registry = hiera('enable_docker_registry', false),
$redis = hiera('redis_enabled', false),
$redis_password = undef,
@@ -551,6 +567,7 @@ class tripleo::haproxy (
$nova_metadata_network = hiera('nova_api_network', undef),
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef),
$nova_osapi_network = hiera('nova_api_network', undef),
+ $nova_placement_network = hiera('nova_placement_network', undef),
$panko_network = hiera('panko_api_network', undef),
$ovn_dbs_network = hiera('ovn_dbs_network', undef),
$sahara_network = hiera('sahara_api_network', undef),
@@ -598,6 +615,8 @@ class tripleo::haproxy (
neutron_api_ssl_port => 13696,
nova_api_port => 8774,
nova_api_ssl_port => 13774,
+ nova_placement_port => 8778,
+ nova_placement_ssl_port => 13778,
nova_metadata_port => 8775,
nova_novnc_port => 6080,
nova_novnc_ssl_port => 13080,
@@ -704,6 +723,11 @@ class tripleo::haproxy (
"${redis_vip}:6379" => $haproxy_listen_bind_param,
}
+ $etcd_vip = hiera('etcd_vip', $controller_virtual_ip)
+ $etcd_bind_opts = {
+ "${etcd_vip}:2379" => $haproxy_listen_bind_param,
+ }
+
class { '::haproxy':
service_manage => $haproxy_service_manage,
global_options => {
@@ -928,6 +952,26 @@ class tripleo::haproxy (
}
}
+ $nova_placement_vip = hiera('nova_placement_vip', $controller_virtual_ip)
+ if $nova_placement {
+ ::tripleo::haproxy::endpoint { 'nova_placement':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => $nova_placement_vip,
+ service_port => $ports[nova_placement_port],
+ ip_addresses => hiera('nova_placement_node_ips', $controller_hosts_real),
+ server_names => hiera('nova_placement_node_names', $controller_hosts_names_real),
+ mode => 'http',
+ listen_options => {
+ 'http-request' => [
+ 'set-header X-Forwarded-Proto https if { ssl_fc }',
+ 'set-header X-Forwarded-Proto http if !{ ssl_fc }'],
+ },
+ public_ssl_port => $ports[nova_placement_ssl_port],
+ service_network => $nova_placement_network,
+ member_options => union($haproxy_member_options, $internal_tls_member_options),
+ }
+ }
+
if $nova_metadata {
::tripleo::haproxy::endpoint { 'nova_metadata':
internal_ip => hiera('nova_metadata_vip', $controller_virtual_ip),
@@ -1226,6 +1270,23 @@ class tripleo::haproxy (
}
}
+ if $etcd {
+ haproxy::listen { 'etcd':
+ bind => $etcd_bind_opts,
+ options => {
+ 'balance' => 'source',
+ },
+ collect_exported => false,
+ }
+ haproxy::balancermember { 'etcd':
+ listening_service => 'etcd',
+ ports => '2379',
+ ipaddresses => hiera('etcd_node_ips', $controller_hosts_real),
+ server_names => hiera('etcd_node_names', $controller_hosts_names_real),
+ options => $haproxy_member_options,
+ }
+ }
+
if $docker_registry {
::tripleo::haproxy::endpoint { 'docker-registry':
public_virtual_ip => $public_virtual_ip,