Merge "Add support for node groups in NetConfigDataLookup"
[apex-tripleo-heat-templates.git] / docker / services / zaqar.yaml
1 heat_template_version: ocata
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   ZaqarBase:
33     type: ../../puppet/services/zaqar.yaml
34     properties:
35       EndpointMap: {get_param: EndpointMap}
36       ServiceNetMap: {get_param: ServiceNetMap}
37       DefaultPasswords: {get_param: DefaultPasswords}
38
39 outputs:
40   role_data:
41     description: Role data for the Zaqar API role.
42     value:
43       service_name: {get_attr: [ZaqarBase, role_data, service_name]}
44       config_settings: {get_attr: [ZaqarBase, role_data, config_settings]}
45       step_config: {get_attr: [ZaqarBase, role_data, step_config]}
46       service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
47       # BEGIN DOCKER SETTINGS
48       docker_image: &zaqar_image
49         list_join:
50           - '/'
51           - [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
52       puppet_tags: zaqar_config
53       config_volume: zaqar
54       config_image: *zaqar_image
55       kolla_config:
56         /var/lib/kolla/config_files/zaqar.json:
57           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
58           config_files:
59           - dest: /etc/zaqar/zaqar.conf
60             owner: zaqar
61             perm: '0640'
62             source: /var/lib/kolla/config_files/src/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           config_files:
66           - dest: /etc/zaqar/zaqar.conf
67             owner: zaqar
68             perm: '0640'
69             source: /var/lib/kolla/config_files/src/etc/zaqar/zaqar.conf
70           - dest: /etc/zaqar/1.conf
71             owner: zaqar
72             perm: '0640'
73             source: /var/lib/kolla/config_files/src/etc/zaqar/1.conf
74       docker_config:
75         step_4:
76           zaqar:
77             image: *zaqar_image
78             net: host
79             privileged: false
80             restart: always
81             volumes:
82               - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
83               - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
84               - /etc/hosts:/etc/hosts:ro
85               - /etc/localtime:/etc/localtime:ro
86             environment:
87               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
88           zaqar_websocket:
89             image: *zaqar_image
90             net: host
91             privileged: false
92             restart: always
93             volumes:
94               - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
95               - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
96               - /etc/hosts:/etc/hosts:ro
97               - /etc/localtime:/etc/localtime:ro
98             environment:
99               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS