summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-21 00:34:46 +0000
committerGerrit Code Review <review@openstack.org>2015-04-21 00:34:46 +0000
commit883d1dcb05e020526cfad9c22fa2a9d771332e38 (patch)
tree3c1473ae41755c1ff8414a387f6498cf4e1c4ea5 /puppet/manifests
parent40148f70d0bc1d41e65f16928fa47723e4541e15 (diff)
parent3579b32fa2318a1fd0f1c9e0e2b5c1d1fbc1f184 (diff)
Merge "Add support for Redis configuration"
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_controller.pp22
1 files changed, 21 insertions, 1 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 0d57dc6f..8b5571cf 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -71,12 +71,32 @@ if hiera('step') >= 2 {
}
}
+ # Redis
+ $redis_node_ips = split(hiera('redis_node_ips'), ',')
+ $redis_master_hostname = downcase(hiera('bootstrap_nodeid'))
+
+ if $redis_master_hostname == $::hostname {
+ $slaveof = undef
+ } else {
+ $slaveof = "${redis_master_hostname} 6379"
+ }
+ class {'::redis' :
+ slaveof => $slaveof,
+ }
+
+ if count($redis_node_ips) > 1 {
+ Class['::tripleo::redis_notification'] -> Service['redis-sentinel']
+ include ::redis::sentinel
+ class {'::tripleo::redis_notification' :
+ haproxy_monitor_ip => hiera('tripleo::loadbalancer::controller_virtual_ip'),
+ }
+ }
+
if str2bool(hiera('enable_galera', 'true')) {
$mysql_config_file = '/etc/my.cnf.d/galera.cnf'
} else {
$mysql_config_file = '/etc/my.cnf.d/server.cnf'
}
-
# TODO Galara
class { 'mysql::server':
config_file => $mysql_config_file,