1 heat_template_version: pike
4 OpenStack containerized Mistral API service
9 default: 'tripleoupstream'
11 DockerMistralApiImage:
13 default: 'centos-binary-mistral-api:latest'
15 DockerMistralConfigImage:
16 description: The container image to use for the mistral config_volume
17 default: 'centos-binary-mistral-api:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
30 description: Mapping of service_name -> network name. Typically set
31 via parameter_defaults in the resource registry. This
32 mapping overrides those in ServiceNetMapDefaults.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
49 type: ./containers-common.yaml
52 type: ../../puppet/services/mistral-api.yaml
54 EndpointMap: {get_param: EndpointMap}
55 ServiceData: {get_param: ServiceData}
56 ServiceNetMap: {get_param: ServiceNetMap}
57 DefaultPasswords: {get_param: DefaultPasswords}
58 RoleName: {get_param: RoleName}
59 RoleParameters: {get_param: RoleParameters}
63 description: Role data for the Mistral API role.
65 service_name: {get_attr: [MistralApiBase, role_data, service_name]}
68 - get_attr: [MistralApiBase, role_data, config_settings]
69 step_config: &step_config
70 get_attr: [MistralApiBase, role_data, step_config]
71 service_config_settings: {get_attr: [MistralApiBase, role_data, service_config_settings]}
72 # BEGIN DOCKER SETTINGS
74 config_volume: mistral
75 puppet_tags: mistral_config
76 step_config: *step_config
80 - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
82 /var/lib/kolla/config_files/mistral_api.json:
83 command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api
85 - source: "/var/lib/kolla/config_files/src/*"
88 preserve_properties: true
90 - path: /var/log/mistral
91 owner: mistral:mistral
94 # db sync runs before permissions set by kolla_config
97 image: &mistral_api_image
100 - [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ]
104 - /var/log/containers/mistral:/var/log/mistral
105 command: ['/bin/bash', '-c', 'chown -R mistral:mistral /var/log/mistral']
109 image: *mistral_api_image
116 - {get_attr: [ContainersCommon, volumes]}
118 - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
119 - /var/log/containers/mistral:/var/log/mistral
120 command: "/usr/bin/bootstrap_host_exec mistral_api su mistral -s /bin/bash -c 'mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head'"
123 image: *mistral_api_image
130 - {get_attr: [ContainersCommon, volumes]}
132 - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
133 - /var/log/containers/mistral:/var/log/mistral
134 # NOTE: dprince this requires that we install openstack-tripleo-common into
135 # the Mistral API image so that we get tripleo* actions
136 command: "/usr/bin/bootstrap_host_exec mistral_api su mistral -s /bin/bash -c 'mistral-db-manage --config-file /etc/mistral/mistral.conf populate'"
140 image: *mistral_api_image
146 - {get_attr: [ContainersCommon, volumes]}
148 - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
149 - /var/lib/config-data/puppet-generated/mistral/:/var/lib/kolla/config_files/src:ro
150 - /var/log/containers/mistral:/var/log/mistral
152 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
154 - name: create persistent logs directory
156 path: /var/log/containers/mistral
159 - name: Stop and disable mistral_api service
161 service: name=openstack-mistral-api state=stopped enabled=no