Merge "Move containers common volumes from yaql to list_concat"
[apex-tripleo-heat-templates.git] / docker / services / heat-engine.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Heat Engine service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerHeatEngineImage:
12     description: image
13     default: 'centos-binary-heat-engine:latest'
14     type: string
15   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceNetMap:
21     default: {}
22     description: Mapping of service_name -> network name. Typically set
23                  via parameter_defaults in the resource registry.  This
24                  mapping overrides those in ServiceNetMapDefaults.
25     type: json
26   DefaultPasswords:
27     default: {}
28     type: json
29
30
31 resources:
32
33   ContainersCommon:
34     type: ./containers-common.yaml
35
36   HeatBase:
37     type: ../../puppet/services/heat-engine.yaml
38     properties:
39       EndpointMap: {get_param: EndpointMap}
40       ServiceNetMap: {get_param: ServiceNetMap}
41       DefaultPasswords: {get_param: DefaultPasswords}
42
43 outputs:
44   role_data:
45     description: Role data for the Heat Engine role.
46     value:
47       service_name: {get_attr: [HeatBase, role_data, service_name]}
48       config_settings:
49         map_merge:
50           - get_attr: [HeatBase, role_data, config_settings]
51           - apache::default_vhost: false
52       step_config: &step_config
53         get_attr: [HeatBase, role_data, step_config]
54       service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
55       # BEGIN DOCKER SETTINGS
56       puppet_config:
57         config_volume: heat
58         puppet_tags: heat_config,file,concat,file_line
59         step_config: *step_config
60         config_image: &heat_engine_image
61           list_join:
62             - '/'
63             - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
64       kolla_config:
65         /var/lib/kolla/config_files/heat_engine.json:
66           command: /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
67       docker_config:
68         step_3:
69           heat_engine_db_sync:
70             image: *heat_engine_image
71             net: host
72             privileged: false
73             detach: false
74             volumes:
75               list_concat:
76                 - {get_attr: [ContainersCommon, volumes]}
77                 -
78                   - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
79             command: ['heat-manage', 'db_sync']
80         step_4:
81           heat_engine:
82             image: *heat_engine_image
83             net: host
84             privileged: false
85             restart: always
86             volumes:
87               list_concat:
88                 - {get_attr: [ContainersCommon, volumes]}
89                 -
90                   - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
91                   - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
92                   - /run:/run
93             environment:
94               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
95       upgrade_tasks:
96         - name: Stop and disable heat_engine service
97           tags: step2
98           service: name=openstack-heat-engine state=stopped enabled=no