aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/loadbalancer.pp
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-16 21:02:56 +0000
committerGerrit Code Review <review@openstack.org>2015-04-16 21:02:56 +0000
commite0921709d946d8db95f2a399a1b9da93d6b73d06 (patch)
tree0f161ffcc2e489eaad9c4c2b7bfaadbaf8dc5ac3 /manifests/loadbalancer.pp
parent72e8834efa188ecef879e5ae3141428b6a88f0a5 (diff)
parent3bef84147bd7df52e8303bcb5481ce5d3351f997 (diff)
Merge "Loadbalancer: Add support for Redis"
Diffstat (limited to 'manifests/loadbalancer.pp')
-rw-r--r--manifests/loadbalancer.pp27
1 files changed, 27 insertions, 0 deletions
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
index ccc9d25..6601cf9 100644
--- a/manifests/loadbalancer.pp
+++ b/manifests/loadbalancer.pp
@@ -134,6 +134,10 @@
# (optional) Enable or not RabbitMQ binding
# Defaults to false
#
+# [*redis*]
+# (optional) Enable or not Redis binding
+# Defaults to false
+#
class tripleo::loadbalancer (
$controller_virtual_ip,
$control_virtual_interface,
@@ -162,6 +166,7 @@ class tripleo::loadbalancer (
$horizon = false,
$mysql = false,
$rabbitmq = false,
+ $redis = false,
) {
if !$controller_host and !$controller_hosts {
@@ -583,4 +588,26 @@ class tripleo::loadbalancer (
}
}
+ if $redis {
+ haproxy::listen { 'redis':
+ ipaddress => [$controller_virtual_ip],
+ ports => 6379,
+ options => {
+ 'timeout' => [ 'client 0', 'server 0' ],
+ 'mode' => 'tcp',
+ 'balance' => 'first',
+ 'option' => ['tcp-check',],
+ 'tcp-check' => ['send info\ replication\r\n','expect string role:master'],
+ },
+ collect_exported => false,
+ }
+ haproxy::balancermember { 'redis':
+ listening_service => 'redis',
+ ports => '6379',
+ ipaddresses => $controller_hosts_real,
+ server_names => $controller_hosts_names_real,
+ options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ }
+ }
+
}