Merge "Remove glance-base service"
[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: &step_config
46        get_attr: [ZaqarBase, role_data, step_config]
47       service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
48       # BEGIN DOCKER SETTINGS
49       puppet_config:
50         config_volume: zaqar
51         puppet_tags: zaqar_config
52         step_config: *step_config
53         config_image: &zaqar_image
54           list_join:
55             - '/'
56             - [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
57       kolla_config:
58         /var/lib/kolla/config_files/zaqar.json:
59           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
60           config_files:
61           - dest: /etc/zaqar/zaqar.conf
62             owner: zaqar
63             perm: '0640'
64             source: /var/lib/kolla/config_files/src/etc/zaqar/zaqar.conf
65         /var/lib/kolla/config_files/zaqar_websocket.json:
66           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
67           config_files:
68           - dest: /etc/zaqar/zaqar.conf
69             owner: zaqar
70             perm: '0640'
71             source: /var/lib/kolla/config_files/src/etc/zaqar/zaqar.conf
72           - dest: /etc/zaqar/1.conf
73             owner: zaqar
74             perm: '0640'
75             source: /var/lib/kolla/config_files/src/etc/zaqar/1.conf
76       docker_config:
77         step_4:
78           zaqar:
79             image: *zaqar_image
80             net: host
81             privileged: false
82             restart: always
83             volumes:
84               - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
85               - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
86               - /etc/hosts:/etc/hosts:ro
87               - /etc/localtime:/etc/localtime:ro
88             environment:
89               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
90           zaqar_websocket:
91             image: *zaqar_image
92             net: host
93             privileged: false
94             restart: always
95             volumes:
96               - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
97               - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
98               - /etc/hosts:/etc/hosts:ro
99               - /etc/localtime:/etc/localtime:ro
100             environment:
101               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
102       upgrade_tasks:
103         - name: Stop and disable zaqar service
104           tags: step2
105           service: name=openstack-zaqar.service state=stopped enabled=no
106