summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--puppet/all-nodes-config.yaml4
-rw-r--r--puppet/controller-puppet.yaml3
-rw-r--r--puppet/hieradata/controller.yaml6
-rw-r--r--puppet/manifests/overcloud_controller.pp22
4 files changed, 33 insertions, 2 deletions
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index 4d7af033..7a4df796 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -62,6 +62,10 @@ resources:
list_join:
- ','
- {get_param: controller_ips}
+ redis_node_ips:
+ list_join:
+ - ','
+ - {get_param: controller_ips}
outputs:
config_id:
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml
index c3efc82e..a893186d 100644
--- a/puppet/controller-puppet.yaml
+++ b/puppet/controller-puppet.yaml
@@ -801,7 +801,8 @@ resources:
# Rabbit
rabbitmq::node_ip_address: {get_input: controller_host}
rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
-
+ # Redis
+ redis::bind: {get_input: controller_host}
# Misc
memcached::listen_ip: {get_input: controller_host}
neutron_public_interface_ip: {get_input: neutron_public_interface_ip}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index 11ec5e27..0d15f4ea 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -13,6 +13,11 @@ rabbitmq::repos_ensure: false
mongodb::server::replset: tripleo
+redis::port: 6379
+redis::sentinel::master_name: "%{hiera('bootstrap_nodeid')}"
+redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}"
+redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
+
# service tenant
nova::api::admin_tenant_name: 'service'
glance::api::keystone_tenant: 'service'
@@ -90,6 +95,7 @@ tripleo::loadbalancer::nova_metadata: true
tripleo::loadbalancer::nova_novncproxy: true
tripleo::loadbalancer::mysql: true
tripleo::loadbalancer::rabbitmq: true
+tripleo::loadbalancer::redis: true
tripleo::loadbalancer::swift_proxy_server: true
tripleo::loadbalancer::ceilometer: true
tripleo::loadbalancer::heat_api: true
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,