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: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
45 type: ./containers-common.yaml
48 type: ../../puppet/services/mistral-api.yaml
50 EndpointMap: {get_param: EndpointMap}
51 ServiceNetMap: {get_param: ServiceNetMap}
52 DefaultPasswords: {get_param: DefaultPasswords}
53 RoleName: {get_param: RoleName}
54 RoleParameters: {get_param: RoleParameters}
58 description: Role data for the Mistral API role.
60 service_name: {get_attr: [MistralApiBase, role_data, service_name]}
63 - get_attr: [MistralApiBase, role_data, config_settings]
64 step_config: &step_config
65 get_attr: [MistralApiBase, role_data, step_config]
66 service_config_settings: {get_attr: [MistralApiBase, role_data, service_config_settings]}
67 # BEGIN DOCKER SETTINGS
69 config_volume: mistral
70 puppet_tags: mistral_config
71 step_config: *step_config
75 - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
77 /var/lib/kolla/config_files/mistral_api.json:
78 command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api
80 - path: /var/log/mistral
81 owner: mistral:mistral
84 # db sync runs before permissions set by kolla_config
87 image: &mistral_api_image
90 - [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ]
94 - /var/log/containers/mistral:/var/log/mistral
95 command: ['/bin/bash', '-c', 'chown -R mistral:mistral /var/log/mistral']
99 image: *mistral_api_image
106 - {get_attr: [ContainersCommon, volumes]}
108 - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
109 - /var/log/containers/mistral:/var/log/mistral
110 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'"
113 image: *mistral_api_image
120 - {get_attr: [ContainersCommon, volumes]}
122 - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
123 - /var/log/containers/mistral:/var/log/mistral
124 # NOTE: dprince this requires that we install openstack-tripleo-common into
125 # the Mistral API image so that we get tripleo* actions
126 command: "/usr/bin/bootstrap_host_exec mistral_api su mistral -s /bin/bash -c 'mistral-db-manage --config-file /etc/mistral/mistral.conf populate'"
130 image: *mistral_api_image
136 - {get_attr: [ContainersCommon, volumes]}
138 - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
139 - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
140 - /var/log/containers/mistral:/var/log/mistral
142 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
144 - name: create persistent logs directory
146 path: /var/log/containers/mistral
149 - name: Stop and disable mistral_api service
151 service: name=openstack-mistral-api state=stopped enabled=no