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