1 heat_template_version: pike
4 OpenStack Glance service configured with Puppet
10 DockerGlanceApiConfigImage:
11 description: The container image to use for the glance_api config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
51 type: ./containers-common.yaml
54 type: ../../puppet/services/database/mysql-client.yaml
57 type: ../../puppet/services/glance-api.yaml
59 EndpointMap: {get_param: EndpointMap}
60 ServiceData: {get_param: ServiceData}
61 ServiceNetMap: {get_param: ServiceNetMap}
62 DefaultPasswords: {get_param: DefaultPasswords}
63 RoleName: {get_param: RoleName}
64 RoleParameters: {get_param: RoleParameters}
68 description: Role data for the Glance API role.
70 service_name: {get_attr: [GlanceApiPuppetBase, role_data, service_name]}
73 - get_attr: [GlanceApiPuppetBase, role_data, config_settings]
74 - glance::api::sync_db: false
75 step_config: &step_config
78 - - {get_attr: [GlanceApiPuppetBase, role_data, step_config]}
79 - {get_attr: [MySQLClient, 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
86 config_image: {get_param: DockerGlanceApiConfigImage}
88 /var/lib/kolla/config_files/glance_api.json:
89 command: /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf
91 - source: "/var/lib/kolla/config_files/src/*"
94 preserve_properties: true
95 - source: "/var/lib/kolla/config_files/src-ceph/"
98 preserve_properties: true
99 /var/lib/kolla/config_files/glance_api_tls_proxy.json:
100 command: /usr/sbin/httpd -DFOREGROUND
102 - source: "/var/lib/kolla/config_files/src/*"
105 preserve_properties: true
107 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
110 image: &glance_api_image {get_param: DockerGlanceApiImage}
114 - /var/log/containers/glance:/var/log/glance
115 command: ['/bin/bash', '-c', 'chown -R glance:glance /var/log/glance']
118 image: *glance_api_image
123 volumes: &glance_volumes
125 - {get_attr: [ContainersCommon, volumes]}
127 - /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json
128 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
129 - /var/log/containers/glance:/var/log/glance
130 - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
132 - KOLLA_BOOTSTRAP=True
133 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
134 command: "/usr/bin/bootstrap_host_exec glance_api su glance -s /bin/bash -c '/usr/local/bin/kolla_start'"
139 image: *glance_api_image
143 volumes: *glance_volumes
145 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
147 - internal_tls_enabled
148 - glance_api_tls_proxy:
150 image: *glance_api_image
156 - {get_attr: [ContainersCommon, volumes]}
158 - /var/lib/kolla/config_files/glance_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
159 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
160 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
161 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
163 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
166 - name: create persistent logs directory
168 path: /var/log/containers/glance
170 - name: ensure ceph configurations exist
175 - name: Stop and disable glance_api service
177 service: name=openstack-glance-api state=stopped enabled=no
179 get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]