aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/haproxy.pp
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-06-28 14:52:36 -0400
committerTim Rozet <trozet@redhat.com>2016-08-13 15:34:22 -0400
commitd688064d238712b0511b31865824b8868e98e0c8 (patch)
tree4b7bf88bc02d26b9fb4e6fa57a9328c5da72ed86 /manifests/haproxy.pp
parent6e9c1f50a3b0c17854663a81d19a788e241257d6 (diff)
Adds OpenDaylight
Partially-Implements: blueprint opendaylight-integration Note this patch only adds support for a single ODL instance. - neutron/opendaylight.pp handles installing ODL to control nodes - ml2/opendaylight.pp handles configuring ML2 to work with ODL - ovs/opendaylight.pp handles configuring OVS to connect to ODL Change-Id: I666dc0874f1d11a72a62d796f4f6d41f7aa87a3f Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'manifests/haproxy.pp')
-rw-r--r--manifests/haproxy.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index e2b2cc9..075433b 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -228,6 +228,10 @@
#
# [*zaqar_api*]
# (optional) Enable or not Zaqar Api binding
+# Defaults to false
+#
+# [*opendaylight*]
+# (optional) Enable or not OpenDaylight binding
# Defaults to false
#
# [*service_ports*]
@@ -329,6 +333,7 @@ class tripleo::haproxy (
$redis_password = undef,
$midonet_api = false,
$zaqar_api = false,
+ $opendaylight = false,
$service_ports = {}
) {
$default_service_ports = {
@@ -924,4 +929,27 @@ class tripleo::haproxy (
public_ssl_port => $ports[zaqar_api_ssl_port],
}
}
+
+ $opendaylight_api_vip = hiera('opendaylight_api_vip', $controller_virtual_ip)
+ $opendaylight_bind_opts = {
+ "${opendaylight_api_vip}:8081" => [],
+ "${public_virtual_ip}:8081" => [],
+ }
+
+ if $opendaylight {
+ haproxy::listen { 'opendaylight':
+ bind => $opendaylight_bind_opts,
+ options => {
+ 'balance' => 'source',
+ },
+ collect_exported => false,
+ }
+ haproxy::balancermember { 'opendaylight':
+ listening_service => 'opendaylight',
+ ports => '8081',
+ ipaddresses => hiera('opendaylight_api_node_ips', $controller_hosts_real),
+ server_names => $controller_hosts_names_real,
+ options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ }
+ }
}