Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / docker / services / database / redis.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Redis services
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerRedisImage:
12     description: image
13     default: 'centos-binary-redis:latest'
14     type: string
15   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceNetMap:
21     default: {}
22     description: Mapping of service_name -> network name. Typically set
23                  via parameter_defaults in the resource registry.  This
24                  mapping overrides those in ServiceNetMapDefaults.
25     type: json
26   DefaultPasswords:
27     default: {}
28     type: json
29   RoleName:
30     default: ''
31     description: Role name on which the service is applied
32     type: string
33   RoleParameters:
34     default: {}
35     description: Parameters specific to the role
36     type: json
37
38 resources:
39
40   RedisBase:
41     type: ../../../puppet/services/database/redis.yaml
42     properties:
43       EndpointMap: {get_param: EndpointMap}
44       ServiceNetMap: {get_param: ServiceNetMap}
45       DefaultPasswords: {get_param: DefaultPasswords}
46
47 outputs:
48   role_data:
49     description: Role data for the Redis API role.
50     value:
51       service_name: {get_attr: [RedisBase, role_data, service_name]}
52       config_settings:
53         map_merge:
54           - {get_attr: [RedisBase, role_data, config_settings]}
55           - redis::daemonize: false
56       step_config: &step_config
57         get_attr: [RedisBase, role_data, step_config]
58       service_config_settings: {get_attr: [RedisBase, role_data, service_config_settings]}
59       # BEGIN DOCKER SETTINGS
60       puppet_config:
61         config_volume: 'redis'
62         # NOTE: we need the exec tag to copy /etc/redis.conf.puppet to
63         # /etc/redis.conf
64         # https://github.com/arioch/puppet-redis/commit/1c004143223e660cbd433422ff8194508aab9763
65         puppet_tags: 'exec'
66         step_config: *step_config
67         config_image: &redis_image
68           list_join:
69             - '/'
70             - [ {get_param: DockerNamespace}, {get_param: DockerRedisImage} ]
71       kolla_config:
72         /var/lib/kolla/config_files/redis.json:
73           command: /usr/bin/redis-server /etc/redis.conf
74           permissions:
75             - path: /var/run/redis
76               owner: redis:redis
77               recurse: true
78       docker_config:
79         step_1:
80           redis:
81             image: *redis_image
82             net: host
83             privileged: false
84             restart: always
85             volumes:
86               - /run:/run
87               - /var/lib/kolla/config_files/redis.json:/var/lib/kolla/config_files/config.json:ro
88               - /var/lib/config-data/redis/etc/:/etc/:ro
89               - /etc/localtime:/etc/localtime:ro
90               - logs:/var/log/kolla
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       host_prep_tasks:
94         - name: create /var/run/redis
95           file:
96             path: /var/run/redis
97             state: directory
98       upgrade_tasks:
99         - name: Stop and disable redis service
100           tags: step2
101           service: name=redis state=stopped enabled=no