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
48 zaqar_management_store_sqlalchemy: {equals : [{get_param: ZaqarManagementStore}, 'sqlalchemy']}
49 internal_tls_enabled: {get_param: EnableInternalTLS}
54 type: ./containers-common.yaml
57 type: ../../puppet/services/database/mysql-client.yaml
60 type: ../../puppet/services/zaqar-api.yaml
62 EndpointMap: {get_param: EndpointMap}
63 ServiceData: {get_param: ServiceData}
64 ServiceNetMap: {get_param: ServiceNetMap}
65 DefaultPasswords: {get_param: DefaultPasswords}
66 RoleName: {get_param: RoleName}
67 RoleParameters: {get_param: RoleParameters}
68 EnableInternalTLS: {get_param: EnableInternalTLS}
72 description: Role data for the Zaqar API role.
74 service_name: {get_attr: [ZaqarBase, role_data, service_name]}
75 config_settings: {get_attr: [ZaqarBase, role_data, config_settings]}
76 step_config: &step_config
79 - - {get_attr: [ZaqarBase, role_data, step_config]}
80 - {get_attr: [MySQLClient, role_data, step_config]}
81 service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
82 # BEGIN DOCKER SETTINGS
85 puppet_tags: zaqar_config
86 step_config: *step_config
87 config_image: {get_param: DockerZaqarConfigImage}
89 /var/lib/kolla/config_files/zaqar.json:
90 command: /usr/sbin/httpd -DFOREGROUND
92 - source: "/var/lib/kolla/config_files/src/*"
95 preserve_properties: true
96 /var/lib/kolla/config_files/zaqar_websocket.json:
97 command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
99 - source: "/var/lib/kolla/config_files/src/*"
102 preserve_properties: true
104 - path: /var/log/zaqar
111 - zaqar_management_store_sqlalchemy
115 image: &zaqar_image {get_param: DockerZaqarImage}
118 - /var/log/containers/zaqar:/var/log/zaqar
119 - /var/log/containers/httpd/zaqar:/var/log/httpd
120 command: ['/bin/bash', '-c', 'chown -R zaqar:zaqar /var/log/zaqar']
130 - {get_attr: [ContainersCommon, volumes]}
132 - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
133 - /var/log/containers/zaqar:/var/log/zaqar
134 - /var/log/containers/httpd/zaqar:/var/log/httpd
135 command: "/usr/bin/bootstrap_host_exec zaqar_api su zaqar -s /bin/bash -c 'zaqar-sql-db-manage upgrade head'"
143 # NOTE(mandre) kolla image changes the user to 'zaqar', we need it
144 # to be root to run httpd
148 - {get_attr: [ContainersCommon, volumes]}
150 - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
151 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
152 - /var/log/containers/zaqar:/var/log/zaqar
153 - /var/log/containers/httpd/zaqar:/var/log/httpd
156 - internal_tls_enabled
157 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
161 - internal_tls_enabled
162 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
165 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
173 - {get_attr: [ContainersCommon, volumes]}
175 - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
176 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
177 - /var/log/containers/zaqar:/var/log/zaqar
178 - /var/log/containers/httpd/zaqar:/var/log/httpd
180 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
182 - name: create persistent logs directory
187 - /var/log/containers/zaqar
188 - /var/log/containers/httpd/zaqar
190 - name: Stop and disable zaqar service
192 service: name=httpd state=stopped enabled=no
194 get_attr: [ZaqarBase, role_data, metadata_settings]