Put docker puppet config in puppet_config dict
[apex-tripleo-heat-templates.git] / docker / services / mistral-executor.yaml
1 heat_template_version: ocata
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   MistralBase:
38     type: ../../puppet/services/mistral-executor.yaml
39     properties:
40       EndpointMap: {get_param: EndpointMap}
41       ServiceNetMap: {get_param: ServiceNetMap}
42       DefaultPasswords: {get_param: DefaultPasswords}
43
44 outputs:
45   role_data:
46     description: Role data for the Mistral Executor role.
47     value:
48       service_name: {get_attr: [MistralBase, role_data, service_name]}
49       config_settings:
50         map_merge:
51           - get_attr: [MistralBase, role_data, config_settings]
52       step_config: &step_config
53         get_attr: [MistralBase, role_data, step_config]
54       service_config_settings: {get_attr: [MistralBase, role_data, service_config_settings]}
55       # BEGIN DOCKER SETTINGS
56       docker_image: &mistral_executor_image
57         list_join:
58           - '/'
59           - [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ]
60       puppet_config:
61         config_volume: mistral
62         puppet_tags: mistral_config
63         step_config: *step_config
64         config_image:
65           list_join:
66             - '/'
67             - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
68       kolla_config:
69          /var/lib/kolla/config_files/mistral_executor.json:
70            command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor
71            config_files:
72            - dest: /etc/mistral/mistral.conf
73              owner: mistral
74              perm: '0640'
75              source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
76       docker_config:
77         step_4:
78           mistral_executor:
79             image: *mistral_executor_image
80             net: host
81             privileged: false
82             restart: always
83             volumes:
84               - /run:/run
85               - /var/lib/kolla/config_files/mistral_executor.json:/var/lib/kolla/config_files/config.json:ro
86               - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
87               - /etc/hosts:/etc/hosts:ro
88               - /etc/localtime:/etc/localtime:ro
89               # FIXME: this is required in order for Nova cells
90               # initialization workflows on the Undercloud. Need to
91               # exclude this on the overcloud for security reasons.
92               - /var/lib/config-data/nova/etc/nova:/etc/nova:ro
93             environment:
94               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS