Merge "Add network_data.yaml to encapsulate list of networks for j2"
[apex-tripleo-heat-templates.git] / docker / services / heat-api.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized Heat API service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerHeatApiImage:
12     description: image
13     default: 'centos-binary-heat-api: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.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 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.json:
71           command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
72       docker_config:
73         step_4:
74           heat_api:
75             image:
76               list_join:
77                 - '/'
78                 - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiImage} ]
79             net: host
80             privileged: false
81             restart: always
82             volumes:
83               yaql:
84                 expression: $.data.common.concat($.data.service)
85                 data:
86                   common: {get_attr: [ContainersCommon, volumes]}
87                   service:
88                     - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
89                     - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
90                     - /dev:/dev
91                     - /run:/run
92             environment:
93               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
94       upgrade_tasks:
95         - name: Stop and disable heat_api service
96           tags: step2
97           service: name=openstack-heat-api state=stopped enabled=no