Merge "Swift auth url should use a suffix"
[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   HeatBase:
39     type: ../../puppet/services/heat-api.yaml
40     properties:
41       EndpointMap: {get_param: EndpointMap}
42       ServiceNetMap: {get_param: ServiceNetMap}
43       DefaultPasswords: {get_param: DefaultPasswords}
44
45 outputs:
46   role_data:
47     description: Role data for the Heat API role.
48     value:
49       service_name: {get_attr: [HeatBase, role_data, service_name]}
50       config_settings:
51         map_merge:
52           - get_attr: [HeatBase, role_data, config_settings]
53           - apache::default_vhost: false
54       step_config: &step_config
55         get_attr: [HeatBase, role_data, step_config]
56       service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
57       # BEGIN DOCKER SETTINGS
58       puppet_config:
59         config_volume: heat
60         puppet_tags: heat_config,file,concat,file_line
61         step_config: *step_config
62         config_image:
63           list_join:
64             - '/'
65             - [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
66       kolla_config:
67          /var/lib/kolla/config_files/heat_api.json:
68            command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
69            config_files:
70            - dest: /etc/heat/heat.conf
71              owner: heat
72              perm: '0640'
73              source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
74       docker_config:
75         step_4:
76           heat_api:
77             image:
78               list_join:
79                 - '/'
80                 - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiImage} ]
81             net: host
82             privileged: false
83             restart: always
84             volumes:
85               - /run:/run
86               - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
87               - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
88               - /etc/hosts:/etc/hosts:ro
89               - /etc/localtime:/etc/localtime:ro
90               - /dev:/dev
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       upgrade_tasks:
94         - name: Stop and disable heat_api service
95           tags: step2
96           service: name=openstack-heat-api state=stopped enabled=no