summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaume Devesa <devvesa@gmail.com>2015-11-26 18:25:22 +0100
committerJaume Devesa <devvesa@gmail.com>2015-12-11 11:47:13 +0000
commit7d5decbfb667cd97bda0a7f363dda73dbf40988f (patch)
tree40d9728cd40c02cb4f6205fa0e3558cce377fb10
parent572c786fda11e16f3cceace273c64a2c945ca143 (diff)
Adding MidoNet LoadBalancing options
MidoNet API needs to be loadbalanced if the midonet environment is activated. Change-Id: I6f1ac659297b8cf6671e11ad23284f8f543568b0
-rw-r--r--manifests/loadbalancer.pp24
1 files changed, 24 insertions, 0 deletions
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
index 786f4df..6306f61 100644
--- a/manifests/loadbalancer.pp
+++ b/manifests/loadbalancer.pp
@@ -247,6 +247,10 @@
# (optional) Enable or not Redis binding
# Defaults to false
#
+# [*midonet_api*]
+# (optional) Enable or not MidoNet API binding
+# Defaults to false
+#
class tripleo::loadbalancer (
$controller_virtual_ip,
$control_virtual_interface,
@@ -299,6 +303,7 @@ class tripleo::loadbalancer (
$mysql_clustercheck = false,
$rabbitmq = false,
$redis = false,
+ $midonet_api = false,
) {
if !$controller_host and !$controller_hosts {
@@ -1045,4 +1050,23 @@ class tripleo::loadbalancer (
}
}
+ $midonet_api_vip = hiera('midonet_api_vip', $controller_virtual_ip)
+ $midonet_bind_opts = {
+ "${midonet_api_vip}:8081" => [],
+ "${public_virtual_ip}:8081" => [],
+ }
+
+ if $midonet_api {
+ haproxy::listen { 'midonet_api':
+ bind => $midonet_bind_opts,
+ collect_exported => false,
+ }
+ haproxy::balancermember { 'midonet_api':
+ listening_service => 'midonet_api',
+ ports => '8081',
+ ipaddresses => hiera('midonet_api_node_ips', $controller_hosts_real),
+ server_names => $controller_hosts_names_real,
+ options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ }
+ }
}