Move containers common volumes from yaql to list_concat
[apex-tripleo-heat-templates.git] / docker / services / zaqar.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Zaqar services
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerZaqarImage:
12     description: image
13     default: 'centos-binary-zaqar: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
30 resources:
31
32   ContainersCommon:
33     type: ./containers-common.yaml
34
35   ZaqarBase:
36     type: ../../puppet/services/zaqar.yaml
37     properties:
38       EndpointMap: {get_param: EndpointMap}
39       ServiceNetMap: {get_param: ServiceNetMap}
40       DefaultPasswords: {get_param: DefaultPasswords}
41
42 outputs:
43   role_data:
44     description: Role data for the Zaqar API role.
45     value:
46       service_name: {get_attr: [ZaqarBase, role_data, service_name]}
47       config_settings: {get_attr: [ZaqarBase, role_data, config_settings]}
48       step_config: &step_config
49        get_attr: [ZaqarBase, role_data, step_config]
50       service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
51       # BEGIN DOCKER SETTINGS
52       puppet_config:
53         config_volume: zaqar
54         puppet_tags: zaqar_config
55         step_config: *step_config
56         config_image: &zaqar_image
57           list_join:
58             - '/'
59             - [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
60       kolla_config:
61         /var/lib/kolla/config_files/zaqar.json:
62           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
63         /var/lib/kolla/config_files/zaqar_websocket.json:
64           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
65       docker_config:
66         step_4:
67           zaqar:
68             image: *zaqar_image
69             net: host
70             privileged: false
71             restart: always
72             volumes:
73               list_concat:
74                 - {get_attr: [ContainersCommon, volumes]}
75                 -
76                   - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
77                   - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
78             environment:
79               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
80           zaqar_websocket:
81             image: *zaqar_image
82             net: host
83             privileged: false
84             restart: always
85             volumes:
86               list_concat:
87                 - {get_attr: [ContainersCommon, volumes]}
88                 -
89                   - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
90                   - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       upgrade_tasks:
94         - name: Stop and disable zaqar service
95           tags: step2
96           service: name=openstack-zaqar.service state=stopped enabled=no
97