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
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
50 type: ../containers-common.yaml
53 type: ../../../puppet/services/database/redis.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceData: {get_param: ServiceData}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
62 description: Role data for the Redis API role.
64 service_name: {get_attr: [RedisBase, role_data, service_name]}
67 - {get_attr: [RedisBase, role_data, config_settings]}
68 - redis::daemonize: false
69 tripleo::stunnel::manage_service: false
70 tripleo::stunnel::foreground: 'yes'
71 step_config: &step_config
72 get_attr: [RedisBase, role_data, step_config]
73 service_config_settings: {get_attr: [RedisBase, role_data, service_config_settings]}
74 # BEGIN DOCKER SETTINGS
76 config_volume: 'redis'
77 # NOTE: we need the exec tag to copy /etc/redis.conf.puppet to
79 # https://github.com/arioch/puppet-redis/commit/1c004143223e660cbd433422ff8194508aab9763
81 step_config: *step_config
82 config_image: {get_param: DockerRedisConfigImage}
84 /var/lib/kolla/config_files/redis.json:
85 command: /usr/bin/redis-server /etc/redis.conf
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
92 - path: /var/run/redis
95 /var/lib/kolla/config_files/redis_tls_proxy.json:
96 command: stunnel /etc/stunnel/stunnel.conf
98 - source: "/var/lib/kolla/config_files/src/*"
101 preserve_properties: true
108 image: &redis_image {get_param: DockerRedisImage}
112 - /var/log/containers/redis:/var/log/redis
113 command: ['/bin/bash', '-c', 'chown -R redis:redis /var/log/redis']
122 - /var/lib/kolla/config_files/redis.json:/var/lib/kolla/config_files/config.json:ro
123 - /var/lib/config-data/puppet-generated/redis/:/var/lib/kolla/config_files/src:ro
124 - /etc/localtime:/etc/localtime:ro
125 - /var/log/containers/redis:/var/log/redis
127 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
129 - internal_tls_enabled
138 - {get_attr: [ContainersCommon, volumes]}
140 - /var/lib/kolla/config_files/redis_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
141 - /var/lib/config-data/puppet-generated/redis/:/var/lib/kolla/config_files/src:ro
142 - /etc/pki/tls/certs/redis.crt:/etc/pki/tls/certs/redis.crt:ro
143 - /etc/pki/tls/private/redis.key:/etc/pki/tls/private/redis.key:ro
145 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
148 get_attr: [RedisBase, role_data, metadata_settings]
150 - name: create persistent directories
155 - /var/log/containers/redis
158 - name: Stop and disable redis service
160 service: name=redis state=stopped enabled=no