1 heat_template_version: pike
4 OpenStack containerized Zaqar services
10 DockerZaqarConfigImage:
11 description: The container image to use for the zaqar config_volume
15 description: The management store for Zaqar
19 description: Mapping of service endpoint -> protocol. Typically set
20 via parameter_defaults in the resource registry.
24 description: Dictionary packing service data
28 description: Mapping of service_name -> network name. Typically set
29 via parameter_defaults in the resource registry. This
30 mapping overrides those in ServiceNetMapDefaults.
37 description: Role name on which the service is applied
41 description: Parameters specific to the role
45 zaqar_management_store_sqlalchemy: {equals : [{get_param: ZaqarManagementStore}, 'sqlalchemy']}
50 type: ./containers-common.yaml
53 type: ../../puppet/services/zaqar.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceData: {get_param: ServiceData}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
59 RoleName: {get_param: RoleName}
60 RoleParameters: {get_param: RoleParameters}
64 description: Role data for the Zaqar API role.
66 service_name: {get_attr: [ZaqarBase, role_data, service_name]}
67 config_settings: {get_attr: [ZaqarBase, role_data, config_settings]}
68 step_config: &step_config
69 get_attr: [ZaqarBase, role_data, step_config]
70 service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
71 # BEGIN DOCKER SETTINGS
74 puppet_tags: zaqar_config
75 step_config: *step_config
76 config_image: {get_param: DockerZaqarConfigImage}
78 /var/lib/kolla/config_files/zaqar.json:
79 command: /usr/sbin/httpd -DFOREGROUND
81 - source: "/var/lib/kolla/config_files/src/*"
84 preserve_properties: true
85 /var/lib/kolla/config_files/zaqar_websocket.json:
86 command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
88 - source: "/var/lib/kolla/config_files/src/*"
91 preserve_properties: true
93 - path: /var/log/zaqar
100 - zaqar_management_store_sqlalchemy
104 image: &zaqar_image {get_param: DockerZaqarImage}
107 - /var/log/containers/zaqar:/var/log/zaqar
108 command: ['/bin/bash', '-c', 'chown -R zaqar:zaqar /var/log/zaqar']
118 - {get_attr: [ContainersCommon, volumes]}
120 - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
121 - /var/log/containers/zaqar:/var/log/zaqar
122 command: "/usr/bin/bootstrap_host_exec zaqar su zaqar -s /bin/bash -c 'zaqar-sql-db-manage upgrade head'"
130 # NOTE(mandre) kolla image changes the user to 'zaqar', we need it
131 # to be root to run httpd
135 - {get_attr: [ContainersCommon, volumes]}
137 - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
138 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
139 - /var/log/containers/zaqar:/var/log/zaqar
141 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
149 - {get_attr: [ContainersCommon, volumes]}
151 - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
152 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
153 - /var/log/containers/zaqar:/var/log/zaqar
155 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
157 - name: create persistent logs directory
159 path: /var/log/containers/zaqar
162 - name: Stop and disable zaqar service
164 service: name=httpd state=stopped enabled=no