From 98aad52ee24b1baead62e1f59c9b578ee915816d Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Thu, 4 Aug 2016 11:08:42 +0300 Subject: Add zaqar API endpoint in HAProxy This will enable us to terminate SSL connections for Zaqar's API. Change-Id: If75e2947a2dca95b3e53e1b1ffd93f36fc7fb1cc --- manifests/haproxy.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'manifests/haproxy.pp') diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index 407fbb7..724c037 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -226,6 +226,10 @@ # (optional) Enable or not MidoNet API binding # Defaults to false # +# [*zaqar_api*] +# (optional) Enable or not Zaqar Api binding +# Defaults to false +# # [*service_ports*] # (optional) Hash that contains the values to override from the service ports # The available keys to modify the services' ports are: @@ -271,6 +275,8 @@ # 'swift_proxy_ssl_port' (Defaults to 13808) # 'trove_api_port' (Defaults to 8779) # 'trove_api_ssl_port' (Defaults to 13779) +# 'zaqar_api_port' (Defaults to 8888) +# 'zaqar_api_ssl_port' (Defaults to 13888) # Defaults to {} # class tripleo::haproxy ( @@ -322,6 +328,7 @@ class tripleo::haproxy ( $redis = false, $redis_password = undef, $midonet_api = false, + $zaqar_api = false, $service_ports = {} ) { $default_service_ports = { @@ -367,6 +374,8 @@ class tripleo::haproxy ( swift_proxy_ssl_port => 13808, trove_api_port => 8779, trove_api_ssl_port => 13779, + zaqar_api_port => 8888, + zaqar_api_ssl_port => 13888, } $ports = merge($default_service_ports, $service_ports) @@ -887,4 +896,15 @@ class tripleo::haproxy ( options => $haproxy_member_options, } } + if $zaqar_api { + ::tripleo::haproxy::endpoint { 'zaqar_api': + public_virtual_ip => $public_virtual_ip, + internal_ip => hiera('zaqar_api_vip', $controller_virtual_ip), + service_port => $ports[zaqar_api_port], + ip_addresses => hiera('zaqar_api_node_ips', $controller_hosts_real), + server_names => $controller_hosts_names_real, + mode => 'http', + public_ssl_port => $ports[zaqar_api_ssl_port], + } + } } -- cgit 1.2.3-korg