diff options
author | Yanis Guenane <yanis.guenane@enovance.com> | 2015-03-25 10:55:46 +0100 |
---|---|---|
committer | Yanis Guenane <yanis.guenane@enovance.com> | 2015-04-16 16:15:22 +0200 |
commit | 3579b32fa2318a1fd0f1c9e0e2b5c1d1fbc1f184 (patch) | |
tree | 7f81237cf9ca4ac5911fae8a1ea27671b98a037a | |
parent | f0b6501ae45491a7492e8590df3427fc32596222 (diff) |
Add support for Redis configuration
Add support for Redis configuration on the overcloud controller role.
Change-Id: I917ff1e7c0abf9d76b9939a97978e858268deac2
Depends-On: I80a6c284af9eceb6b669a03c5d93256261523331
-rw-r--r-- | puppet/all-nodes-config.yaml | 4 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 3 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 6 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 22 |
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 a6518c00..d37abad6 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, |