1 heat_template_version: pike
4 OpenStack Glance service configured with Puppet
9 default: 'tripleoupstream'
13 default: 'centos-binary-glance-api:latest'
15 DockerGlanceApiConfigImage:
16 description: The container image to use for the glance_api config_volume
17 default: 'centos-binary-glance-api:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
30 description: Mapping of service_name -> network name. Typically set
31 via parameter_defaults in the resource registry. This
32 mapping overrides those in ServiceNetMapDefaults.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
51 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
57 type: ./containers-common.yaml
60 type: ../../puppet/services/glance-api.yaml
62 EndpointMap: {get_param: EndpointMap}
63 ServiceData: {get_param: ServiceData}
64 ServiceNetMap: {get_param: ServiceNetMap}
65 DefaultPasswords: {get_param: DefaultPasswords}
66 RoleName: {get_param: RoleName}
67 RoleParameters: {get_param: RoleParameters}
71 description: Role data for the Glance API role.
73 service_name: {get_attr: [GlanceApiPuppetBase, role_data, service_name]}
76 - get_attr: [GlanceApiPuppetBase, role_data, config_settings]
77 - glance::api::sync_db: false
78 step_config: &step_config
79 get_attr: [GlanceApiPuppetBase, role_data, step_config]
80 service_config_settings: {get_attr: [GlanceApiPuppetBase, role_data, service_config_settings]}
81 # BEGIN DOCKER SETTINGS #
83 config_volume: glance_api
84 puppet_tags: glance_api_config,glance_api_paste_ini,glance_swift_config,glance_cache_config
85 step_config: *step_config
89 - [ {get_param: DockerNamespace}, {get_param: DockerGlanceApiConfigImage} ]
91 /var/lib/kolla/config_files/glance_api.json:
92 command: /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf
94 - source: "/var/lib/kolla/config_files/src/*"
97 preserve_properties: true
98 /var/lib/kolla/config_files/glance_api_tls_proxy.json:
99 command: /usr/sbin/httpd -DFOREGROUND
101 - source: "/var/lib/kolla/config_files/src/*"
104 preserve_properties: true
106 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
109 image: &glance_api_image
112 - [ {get_param: DockerNamespace}, {get_param: DockerGlanceApiImage} ]
116 - /var/log/containers/glance:/var/log/glance
117 command: ['/bin/bash', '-c', 'chown -R glance:glance /var/log/glance']
120 image: *glance_api_image
125 volumes: &glance_volumes
127 - {get_attr: [ContainersCommon, volumes]}
129 - /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json
130 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
131 - /var/log/containers/glance:/var/log/glance
133 - KOLLA_BOOTSTRAP=True
134 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
135 command: "/usr/bin/bootstrap_host_exec glance_api su glance -s /bin/bash -c '/usr/local/bin/kolla_start'"
140 image: *glance_api_image
144 volumes: *glance_volumes
146 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
148 - internal_tls_enabled
149 - glance_api_tls_proxy:
151 image: *glance_api_image
157 - {get_attr: [ContainersCommon, volumes]}
159 - /var/lib/kolla/config_files/glance_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
160 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
161 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
162 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
164 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
167 - name: create persistent logs directory
169 path: /var/log/containers/glance
172 - name: Stop and disable glance_api service
174 service: name=openstack-glance-api state=stopped enabled=no
176 get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]