Composable roles within services - Redis
Co-Authored-By: Carlos Camacho <ccamacho@redhat.com> Change-Id: I0d9332f7f4f9116c5435d338a9c35d4fb3f512c6 Implements: blueprint composable-services-within-roles Depends-On: I60493a3aa64e5136b763e8e2084d728f5f812f8a
This commit is contained in:
parent
bcd726f124
commit
31c4167d86
|
@ -22,3 +22,4 @@ resource_registry:
|
|||
OS::TripleO::Services::RabbitMQ: ../puppet/services/pacemaker/rabbitmq.yaml
|
||||
OS::TripleO::Services::Loadbalancer: ../puppet/services/pacemaker/loadbalancer.yaml
|
||||
OS::TripleO::Services::Memcached: ../puppet/services/pacemaker/memcached.yaml
|
||||
OS::TripleO::Services::Redis: ../puppet/services/pacemaker/database/redis.yaml
|
||||
|
|
|
@ -138,6 +138,7 @@ resource_registry:
|
|||
OS::TripleO::Services::SwiftProxy: puppet/services/swift-proxy.yaml
|
||||
OS::TripleO::Services::SaharaApi: puppet/services/sahara-api.yaml
|
||||
OS::TripleO::Services::SaharaEngine: puppet/services/sahara-engine.yaml
|
||||
OS::TripleO::Services::Redis: puppet/services/database/redis.yaml
|
||||
|
||||
parameter_defaults:
|
||||
EnablePackageInstall: false
|
||||
|
|
|
@ -649,6 +649,7 @@ parameters:
|
|||
- OS::TripleO::Services::Loadbalancer
|
||||
- OS::TripleO::Services::Memcached
|
||||
- OS::TripleO::Services::SwiftProxy
|
||||
- OS::TripleO::Services::Redis
|
||||
description: A list of service resources (configured in the Heat
|
||||
resource_registry) which represent nested stacks
|
||||
for each service that should get installed on the Controllers.
|
||||
|
|
|
@ -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: ''
|
||||
|
@ -516,8 +518,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
|
||||
|
@ -1082,7 +1084,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]}]}
|
||||
|
@ -1412,9 +1413,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}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -108,12 +108,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'
|
||||
|
@ -226,15 +220,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')
|
||||
|
|
|
@ -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}
|
||||
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue