aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/haproxy.pp
diff options
context:
space:
mode:
authorSven Anderson <sven@redhat.com>2016-07-01 15:14:21 +0200
committerSven Anderson <sven@redhat.com>2017-01-20 14:08:30 +0100
commit0b32f609ad1c85c919b6bcc8497b1c4672660925 (patch)
tree6323724d371647eca995dc56a956ea60f3fabb9f /manifests/haproxy.pp
parentbca4febaf683a56e95ae27a3e6ad1d5995d455c8 (diff)
Implement Nova ec2api profile
Change-Id: If4b091e1ca02f43aa9c65392baf8ceea007b7cfb
Diffstat (limited to 'manifests/haproxy.pp')
-rw-r--r--manifests/haproxy.pp51
1 files changed, 51 insertions, 0 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 2fa02c9..81ef0a6 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -179,6 +179,14 @@
# (optional) Enable or not Nova novncproxy binding
# Defaults to hiera('nova_vnc_proxy_enabled', false)
#
+# [*ec2_api*]
+# (optional) Enable or not EC2 API binding
+# Defaults to hiera('ec2_api_enabled', false)
+#
+# [*ec2_api_metadata*]
+# (optional) Enable or not EC2 API metadata binding
+# Defaults to hiera('ec2_api_enabled', false)
+#
# [*ceilometer*]
# (optional) Enable or not Ceilometer API binding
# Defaults to hiera('ceilometer_api_enabled', false)
@@ -388,6 +396,14 @@
# (optional) Specify the network nova_placement is running on.
# Defaults to hiera('nova_placement_network', undef)
#
+# [*ec2_api_network*]
+# (optional) Specify the network ec2_api is running on.
+# Defaults to hiera('ec2_api_network', undef)
+#
+# [*ec2_api_metadata_network*]
+# (optional) Specify the network ec2_api_metadata is running on.
+# Defaults to hiera('ec2_api_network', undef)
+#
# [*opendaylight_network*]
# (optional) Specify the network opendaylight is running on.
# Defaults to hiera('opendaylight_api_network', undef)
@@ -517,6 +533,8 @@ class tripleo::haproxy (
$nova_placement = hiera('nova_placement_enabled', false),
$nova_metadata = hiera('nova_api_enabled', false),
$nova_novncproxy = hiera('nova_vnc_proxy_enabled', false),
+ $ec2_api = hiera('ec2_api_enabled', false),
+ $ec2_api_metadata = hiera('ec2_api_enabled', false),
$ceilometer = hiera('ceilometer_api_enabled', false),
$aodh = hiera('aodh_api_enabled', false),
$panko = hiera('panko_api_enabled', false),
@@ -570,6 +588,8 @@ class tripleo::haproxy (
$nova_placement_network = hiera('nova_placement_network', undef),
$panko_network = hiera('panko_api_network', undef),
$ovn_dbs_network = hiera('ovn_dbs_network', undef),
+ $ec2_api_network = hiera('ec2_api_network', undef),
+ $ec2_api_metadata_network = hiera('ec2_api_network', undef),
$sahara_network = hiera('sahara_api_network', undef),
$swift_proxy_server_network = hiera('swift_proxy_network', undef),
$trove_network = hiera('trove_api_network', undef),
@@ -625,6 +645,9 @@ class tripleo::haproxy (
panko_api_ssl_port => 13779,
ovn_nbdb_port => 6641,
ovn_sbdb_port => 6642,
+ ec2_api_port => 8788,
+ ec2_api_ssl_port => 13788,
+ ec2_api_metadata_port => 8789,
sahara_api_port => 8386,
sahara_api_ssl_port => 13386,
swift_proxy_port => 8080,
@@ -998,6 +1021,34 @@ class tripleo::haproxy (
}
}
+ if $ec2_api {
+ ::tripleo::haproxy::endpoint { 'ec2_api':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ec2_api_vip', $controller_virtual_ip),
+ service_port => $ports[ec2_api_port],
+ ip_addresses => hiera('ec2_api_node_ips', $controller_hosts_real),
+ server_names => hiera('ec2_api_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[ec2_api_ssl_port],
+ service_network => $ec2_api_network,
+ }
+ }
+
+ if $ec2_api_metadata {
+ ::tripleo::haproxy::endpoint { 'ec2_api_metadata':
+ internal_ip => hiera('ec2_api_vip', $controller_virtual_ip),
+ service_port => $ports[ec2_api_metadata_port],
+ ip_addresses => hiera('ec2_api_node_ips', $controller_hosts_real),
+ server_names => hiera('ec2_api_node_names', $controller_hosts_names_real),
+ service_network => $ec2_api_metadata_network,
+ }
+ }
+
if $ceilometer {
::tripleo::haproxy::endpoint { 'ceilometer':
public_virtual_ip => $public_virtual_ip,