Merge "Nic config mappings for deployed-server"
[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   HeatBase:
34     type: ../../puppet/services/heat-engine.yaml
35     properties:
36       EndpointMap: {get_param: EndpointMap}
37       ServiceNetMap: {get_param: ServiceNetMap}
38       DefaultPasswords: {get_param: DefaultPasswords}
39
40 outputs:
41   role_data:
42     description: Role data for the Heat Engine role.
43     value:
44       service_name: {get_attr: [HeatBase, role_data, service_name]}
45       config_settings:
46         map_merge:
47           - get_attr: [HeatBase, role_data, config_settings]
48           - apache::default_vhost: false
49       step_config: &step_config
50         get_attr: [HeatBase, role_data, step_config]
51       service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
52       # BEGIN DOCKER SETTINGS
53       puppet_config:
54         config_volume: heat
55         puppet_tags: heat_config,file,concat,file_line
56         step_config: *step_config
57         config_image: &heat_engine_image
58           list_join:
59             - '/'
60             - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
61       kolla_config:
62          /var/lib/kolla/config_files/heat_engine.json:
63            command: /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
64            config_files:
65            - dest: /etc/heat/heat.conf
66              owner: heat
67              perm: '0640'
68              source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
69       docker_config:
70         step_3:
71           heat_engine_db_sync:
72             image: *heat_engine_image
73             net: host
74             privileged: false
75             detach: false
76             volumes:
77               - /var/lib/config-data/heat/etc/heat:/etc/heat:ro
78               - /etc/hosts:/etc/hosts:ro
79               - /etc/localtime:/etc/localtime:ro
80             command: ['heat-manage', 'db_sync']
81         step_4:
82           heat_engine:
83             image: *heat_engine_image
84             net: host
85             privileged: false
86             restart: always
87             volumes:
88               - /run:/run
89               - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
90               - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
91               - /etc/hosts:/etc/hosts:ro
92               - /etc/localtime:/etc/localtime:ro
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