Merge "Move containers common volumes from yaql to list_concat"
[apex-tripleo-heat-templates.git] / docker / services / mistral-executor.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Mistral Executor service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerMistralExecutorImage:
12     description: image
13     default: 'centos-binary-mistral-executor:latest'
14     type: string
15   DockerMistralConfigImage:
16     description: image
17     default: 'centos-binary-mistral-api:latest'
18     type: string
19   EndpointMap:
20     default: {}
21     description: Mapping of service endpoint -> protocol. Typically set
22                  via parameter_defaults in the resource registry.
23     type: json
24   ServiceNetMap:
25     default: {}
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.
29     type: json
30   DefaultPasswords:
31     default: {}
32     type: json
33
34
35 resources:
36
37   ContainersCommon:
38     type: ./containers-common.yaml
39
40   MistralBase:
41     type: ../../puppet/services/mistral-executor.yaml
42     properties:
43       EndpointMap: {get_param: EndpointMap}
44       ServiceNetMap: {get_param: ServiceNetMap}
45       DefaultPasswords: {get_param: DefaultPasswords}
46
47 outputs:
48   role_data:
49     description: Role data for the Mistral Executor role.
50     value:
51       service_name: {get_attr: [MistralBase, role_data, service_name]}
52       config_settings:
53         map_merge:
54           - get_attr: [MistralBase, role_data, config_settings]
55       step_config: &step_config
56         get_attr: [MistralBase, role_data, step_config]
57       service_config_settings: {get_attr: [MistralBase, role_data, service_config_settings]}
58       # BEGIN DOCKER SETTINGS
59       puppet_config:
60         config_volume: mistral
61         puppet_tags: mistral_config
62         step_config: *step_config
63         config_image:
64           list_join:
65             - '/'
66             - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
67       kolla_config:
68         /var/lib/kolla/config_files/mistral_executor.json:
69           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor
70       docker_config:
71         step_4:
72           mistral_executor:
73             image:
74               list_join:
75                 - '/'
76                 - [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ]
77             net: host
78             privileged: false
79             restart: always
80             volumes:
81               list_concat:
82                 - {get_attr: [ContainersCommon, volumes]}
83                 -
84                   - /var/lib/kolla/config_files/mistral_executor.json:/var/lib/kolla/config_files/config.json:ro
85                   - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
86                   - /run:/run
87                   # FIXME: this is required in order for Nova cells
88                   # initialization workflows on the Undercloud. Need to
89                   # exclude this on the overcloud for security reasons.
90                   - /var/lib/config-data/nova/etc/nova:/etc/nova:ro
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       upgrade_tasks:
94         - name: Stop and disable mistral_executor service
95           tags: step2
96           service: name=openstack-mistral-executor state=stopped enabled=no