1 heat_template_version: pike
4 OpenStack containerized Heat API service
10 # puppet needs the heat-wsgi-api binary from centos-binary-heat-api
11 DockerHeatApiConfigImage:
12 description: The container image to use for the heat_api config_volume
16 description: Mapping of service endpoint -> protocol. Typically set
17 via parameter_defaults in the resource registry.
21 description: Dictionary packing service data
25 description: Mapping of service_name -> network name. Typically set
26 via parameter_defaults in the resource registry. This
27 mapping overrides those in ServiceNetMapDefaults.
34 description: Role name on which the service is applied
38 description: Parameters specific to the role
46 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
51 type: ./containers-common.yaml
54 type: ../../puppet/services/heat-api.yaml
56 EndpointMap: {get_param: EndpointMap}
57 ServiceData: {get_param: ServiceData}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 RoleName: {get_param: RoleName}
61 RoleParameters: {get_param: RoleParameters}
65 description: Role data for the Heat API role.
67 service_name: {get_attr: [HeatBase, role_data, service_name]}
70 - get_attr: [HeatBase, role_data, config_settings]
71 - apache::default_vhost: false
72 step_config: &step_config
73 get_attr: [HeatBase, role_data, step_config]
74 logging_source: {get_attr: [HeatBase, role_data, logging_source]}
75 logging_groups: {get_attr: [HeatBase, role_data, logging_groups]}
76 service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
77 # BEGIN DOCKER SETTINGS
79 config_volume: heat_api
80 puppet_tags: heat_config,file,concat,file_line
81 step_config: *step_config
82 config_image: {get_param: DockerHeatApiConfigImage}
84 /var/lib/kolla/config_files/heat_api.json:
85 command: /usr/sbin/httpd -DFOREGROUND
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
95 /var/lib/kolla/config_files/heat_api_cron.json:
96 command: /usr/sbin/crond -n
98 - source: "/var/lib/kolla/config_files/src/*"
101 preserve_properties: true
103 - path: /var/log/heat
109 image: {get_param: DockerHeatApiImage}
113 # NOTE(mandre) kolla image changes the user to 'heat', we need it
114 # to be root to run httpd
118 - {get_attr: [ContainersCommon, volumes]}
120 - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
121 - /var/lib/config-data/puppet-generated/heat_api/:/var/lib/kolla/config_files/src:ro
122 - /var/log/containers/heat:/var/log/heat
123 - /var/log/containers/httpd/heat-api:/var/log/httpd
126 - internal_tls_enabled
127 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
131 - internal_tls_enabled
132 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
135 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
137 image: {get_param: DockerHeatApiImage}
146 - {get_attr: [ContainersCommon, volumes]}
148 - /var/lib/kolla/config_files/heat_api_cron.json:/var/lib/kolla/config_files/config.json:ro
149 - /var/lib/config-data/puppet-generated/heat_api/:/var/lib/kolla/config_files/src:ro
150 - /var/log/containers/heat:/var/log/heat
151 - /var/log/containers/httpd/heat-api:/var/log/httpd
153 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
155 - name: create persistent logs directory
160 - /var/log/containers/heat
161 - /var/log/containers/httpd/heat-api
163 - name: Check is heat_api is deployed
164 command: systemctl is-enabled openstack-heat-api
167 register: heat_api_enabled
168 - name: remove old heat cron jobs
170 path: /var/spool/cron/heat
172 - name: check for heat_api running under apache (post upgrade)
174 shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_wsgi"
175 register: heat_api_apache
179 - name: Stop heat_api service (running under httpd)
181 service: name=httpd state=stopped
182 when: heat_api_apache.rc == 0
183 - name: Stop and disable heat_api service (pre-upgrade not under httpd)
185 service: name=openstack-heat-api state=stopped enabled=no
186 when: heat_api_enabled.rc == 0
188 get_attr: [HeatBase, role_data, metadata_settings]