1 heat_template_version: pike
4 OpenStack containerized Redis services
10 DockerRedisConfigImage:
11 description: The container image to use for the redis config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
43 type: ../../../../puppet/services/database/redis.yaml
45 EndpointMap: {get_param: EndpointMap}
46 ServiceData: {get_param: ServiceData}
47 ServiceNetMap: {get_param: ServiceNetMap}
48 DefaultPasswords: {get_param: DefaultPasswords}
49 RoleName: {get_param: RoleName}
50 RoleParameters: {get_param: RoleParameters}
54 description: Role data for the Redis API role.
56 service_name: {get_attr: [RedisBase, role_data, service_name]}
59 - {get_attr: [RedisBase, role_data, config_settings]}
60 - redis::service_manage: false
61 redis::notify_service: false
62 redis::managed_by_cluster_manager: true
63 tripleo::profile::pacemaker::database::redis_bundle::redis_docker_image: &redis_image {get_param: DockerRedisImage}
64 tripleo::profile::pacemaker::database::redis_bundle::control_port: 3124
65 tripleo.redis.firewall_rules:
72 service_config_settings: {get_attr: [RedisBase, role_data, service_config_settings]}
73 # BEGIN DOCKER SETTINGS
75 config_volume: 'redis'
76 # NOTE: we need the exec tag to copy /etc/redis.conf.puppet to
78 # https://github.com/arioch/puppet-redis/commit/1c004143223e660cbd433422ff8194508aab9763
81 get_attr: [RedisBase, role_data, step_config]
82 config_image: &redis_config_image {get_param: DockerRedisConfigImage}
84 /var/lib/kolla/config_files/redis.json:
85 command: /usr/sbin/pacemaker_remoted
87 - dest: /etc/libqb/force-filesystem-sockets
91 - source: "/var/lib/kolla/config_files/src/*"
94 preserve_properties: true
97 - path: /var/run/redis
100 - path: /var/lib/redis
103 - path: /var/log/redis
113 config_volume: 'redis_init_bundle'
121 - - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
122 - "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
124 TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
125 CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::database::redis_bundle'
126 image: *redis_config_image
128 - /etc/hosts:/etc/hosts:ro
129 - /etc/localtime:/etc/localtime:ro
130 - /etc/puppet:/tmp/puppet-etc:ro
131 - /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
132 - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
133 - /dev/shm:/dev/shm:rw
135 - name: create /var/run/redis
139 - name: create /var/log/redis
143 - name: create /var/lib/redis
148 - name: Stop and disable redis service
150 service: name=redis state=stopped enabled=no