1 heat_template_version: pike
4 OpenStack containerized Heat API CFN service
10 # puppet needs the heat-wsgi-api-cfn binary from centos-binary-heat-api-cfn
11 DockerHeatApiCfnConfigImage:
12 description: The container image to use for the heat_api_cfn 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-cfn.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 CFN 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 service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
75 # BEGIN DOCKER SETTINGS
77 config_volume: heat_api_cfn
78 puppet_tags: heat_config,file,concat,file_line
79 step_config: *step_config
80 config_image: {get_param: DockerHeatApiCfnConfigImage}
82 /var/lib/kolla/config_files/heat_api_cfn.json:
83 command: /usr/sbin/httpd -DFOREGROUND
85 - source: "/var/lib/kolla/config_files/src/*"
88 preserve_properties: true
96 image: {get_param: DockerHeatApiCfnImage}
100 # NOTE(mandre) kolla image changes the user to 'heat', we need it
101 # to be root to run httpd
105 - {get_attr: [ContainersCommon, volumes]}
107 - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
108 - /var/lib/config-data/puppet-generated/heat_api_cfn/:/var/lib/kolla/config_files/src:ro
109 - /var/log/containers/heat:/var/log/heat
112 - internal_tls_enabled
113 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
117 - internal_tls_enabled
118 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
121 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
123 - name: create persistent logs directory
125 path: /var/log/containers/heat
128 - name: Check if heat_api_cfn is deployed
129 command: systemctl is-enabled openstack-heat-api-cfn
132 register: heat_api_cfn_enabled
133 - name: check for heat_api_cfn running under apache (post upgrade)
135 shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi"
136 register: heat_api_cfn_apache
140 - name: Stop heat_api_cfn service (running under httpd)
142 service: name=httpd state=stopped
143 when: heat_api_cfn_apache.rc == 0
144 - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
146 service: name=openstack-heat-api-cfn state=stopped enabled=no
147 when: heat_api_cfn_enabled.rc == 0
149 get_attr: [HeatBase, role_data, metadata_settings]