diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-06-04 03:34:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-06-04 03:34:51 +0000 |
commit | dc507862061360e0d777cdcb96cfb46d8bac75fe (patch) | |
tree | 2e3abca03a1b92a84c52f94224709690cc3aa7a8 /puppet | |
parent | 27e457e0dd21f767efedbc4d0430b4cbd974db0d (diff) | |
parent | 31c4167d86436632ff2b097eaf0bbb5682fb23c9 (diff) |
Merge "Composable roles within services - Redis"
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/controller.yaml | 8 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 19 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 15 | ||||
-rw-r--r-- | puppet/services/database/redis-base.yaml | 21 | ||||
-rw-r--r-- | puppet/services/database/redis.yaml | 25 | ||||
-rw-r--r-- | puppet/services/pacemaker/database/redis.yaml | 28 |
6 files changed, 77 insertions, 39 deletions
diff --git a/puppet/controller.yaml b/puppet/controller.yaml index 98a7e4c0..80e6b458 100644 --- a/puppet/controller.yaml +++ b/puppet/controller.yaml @@ -15,6 +15,8 @@ parameters: description: The password for the aodh services. type: string hidden: true + #TODO(composable Redis): Remove the Redis password param + #As is used by ceilometer CeilometerApiVirtualIP: type: string default: '' @@ -466,8 +468,8 @@ parameters: description: Set rabbit subscriber port, change this if using SSL type: number RedisPassword: + description: The password for Redis type: string - description: The password to access the Redis service hidden: true RedisVirtualIP: type: string @@ -1008,7 +1010,6 @@ resources: SUBNET: {get_attr: [NetIpMap, net_ip_subnet_map, {get_param: [ServiceNetMap, HorizonNetwork]}]} rabbitmq_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]} redis_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RedisNetwork]}]} - redis_password: {get_param: RedisPassword} redis_vip: {get_param: RedisVirtualIP} sahara_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SaharaApiNetwork]}]} memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]} @@ -1318,9 +1319,6 @@ resources: rabbitmq::erlang_cookie: {get_input: rabbit_cookie} # Redis redis::bind: {get_input: redis_network} - redis::requirepass: {get_input: redis_password} - redis::masterauth: {get_input: redis_password} - redis::sentinel_auth_pass: {get_input: redis_password} redis_vip: {get_input: redis_vip} # Firewall tripleo::firewall::manage_firewall: {get_input: manage_firewall} diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index d2859dd2..9b4e76cc 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -61,25 +61,6 @@ if hiera('step') >= 2 { } } - # Redis - $redis_node_ips = 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 - include ::tripleo::redis_notification - } - if str2bool(hiera('enable_galera', true)) { $mysql_config_file = '/etc/my.cnf.d/galera.cnf' } else { diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 5070f32b..dc53d6d4 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -107,12 +107,6 @@ if hiera('step') >= 1 { } } - # Redis - class { '::redis' : - service_manage => false, - notify_service => false, - } - # Galera if str2bool(hiera('enable_galera', true)) { $mysql_config_file = '/etc/my.cnf.d/galera.cnf' @@ -225,15 +219,6 @@ if hiera('step') >= 2 { require => Class['::mysql::server'], before => Exec['galera-ready'], } - - pacemaker::resource::ocf { 'redis': - ocf_agent_name => 'heartbeat:redis', - master_params => '', - meta_params => 'notify=true ordered=true interleave=true', - resource_params => 'wait_last_known_master=true', - require => Class['::redis'], - } - } $mysql_root_password = hiera('mysql::server::root_password') $mysql_clustercheck_password = hiera('mysql_clustercheck_password') diff --git a/puppet/services/database/redis-base.yaml b/puppet/services/database/redis-base.yaml new file mode 100644 index 00000000..77b3c9f0 --- /dev/null +++ b/puppet/services/database/redis-base.yaml @@ -0,0 +1,21 @@ +heat_template_version: 2016-04-08 + +description: > + OpenStack Redis service configured with Puppet + +parameters: + RedisPassword: + description: The password for Redis + type: string + hidden: true + +outputs: + role_data: + description: Role data for the redis role. + value: + config_settings: + redis::requirepass: {get_param: RedisPassword} + redis::masterauth: {get_param: RedisPassword} + redis::sentinel_auth_pass: {get_param: RedisPassword} + tripleo::loadbalancer::redis_password: {get_param: RedisPassword} + diff --git a/puppet/services/database/redis.yaml b/puppet/services/database/redis.yaml new file mode 100644 index 00000000..2669592a --- /dev/null +++ b/puppet/services/database/redis.yaml @@ -0,0 +1,25 @@ +heat_template_version: 2016-04-08 + +description: > + OpenStack Redis service configured with Puppet + +parameters: + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + +resources: + RedisBase: + type: ./redis-base.yaml + +outputs: + role_data: + description: Role data for the redis role. + value: + config_settings: + map_merge: + - get_attr: [RedisBase, role_data, config_settings] + step_config: | + include ::tripleo::profile::base::database::redis diff --git a/puppet/services/pacemaker/database/redis.yaml b/puppet/services/pacemaker/database/redis.yaml new file mode 100644 index 00000000..0e46f8a3 --- /dev/null +++ b/puppet/services/pacemaker/database/redis.yaml @@ -0,0 +1,28 @@ +heat_template_version: 2016-04-08 + +description: > + OpenStack Redis service configured with Puppet + +parameters: + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + +resources: + RedisBase: + type: ../../database/redis-base.yaml + +outputs: + role_data: + description: Role data for the Redis pacemaker role. + value: + config_settings: + map_merge: + - get_attr: [RedisBase, role_data, config_settings] + - tripleo::profile::pacemaker::database::redis::redis_vip: {get_input: redis_vip} + redis::service_manage: false + redis::notify_service: false + step_config: | + include ::tripleo::profile::pacemaker::database::redis |