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 command: ['/bin/bash', '-c', 'chown -R zaqar:zaqar /var/log/zaqar']
129 - {get_attr: [ContainersCommon, volumes]}
131 - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
132 - /var/log/containers/zaqar:/var/log/zaqar
133 - /var/log/containers/httpd/zaqar:/var/log/httpd
134 command: "/usr/bin/bootstrap_host_exec zaqar_api su zaqar -s /bin/bash -c 'zaqar-sql-db-manage upgrade head'"
142 # NOTE(mandre) kolla image changes the user to 'zaqar', we need it
143 # to be root to run httpd
147 - {get_attr: [ContainersCommon, volumes]}
149 - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
150 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
151 - /var/log/containers/zaqar:/var/log/zaqar
154 - internal_tls_enabled
155 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
159 - internal_tls_enabled
160 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
163 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
171 - {get_attr: [ContainersCommon, volumes]}
173 - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
174 - /var/lib/config-data/puppet-generated/zaqar/:/var/lib/kolla/config_files/src:ro
175 - /var/log/containers/zaqar:/var/log/zaqar
177 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
179 - name: create persistent logs directory
181 path: /var/log/containers/zaqar
184 - name: Stop and disable zaqar service
186 service: name=httpd state=stopped enabled=no
188 get_attr: [ZaqarBase, role_data, metadata_settings]