Merge "Add environment to preselect only VIP IP addresses"
[apex-tripleo-heat-templates.git] / docker / services / heat-engine.yaml
1 heat_template_version: ocata
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               yaql:
76                 expression: $.data.common.concat($.data.service)
77                 data:
78                   common: {get_attr: [ContainersCommon, volumes]}
79                   service:
80                     - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
81             command: ['heat-manage', 'db_sync']
82         step_4:
83           heat_engine:
84             image: *heat_engine_image
85             net: host
86             privileged: false
87             restart: always
88             volumes:
89               yaql:
90                 expression: $.data.common.concat($.data.service)
91                 data:
92                   common: {get_attr: [ContainersCommon, volumes]}
93                   service:
94                     - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
95                     - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
96                     - /run:/run
97             environment:
98               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
99       upgrade_tasks:
100         - name: Stop and disable heat_engine service
101           tags: step2
102           service: name=openstack-heat-engine state=stopped enabled=no