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: Mapping of service_name -> network name. Typically set
21 via parameter_defaults in the resource registry. This
22 mapping overrides those in ServiceNetMapDefaults.
29 description: Role name on which the service is applied
33 description: Parameters specific to the role
41 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
47 type: ./containers-common.yaml
50 type: ../../puppet/services/glance-api.yaml
52 EndpointMap: {get_param: EndpointMap}
53 ServiceNetMap: {get_param: ServiceNetMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the Glance API role.
62 service_name: {get_attr: [GlanceApiPuppetBase, role_data, service_name]}
65 - get_attr: [GlanceApiPuppetBase, role_data, config_settings]
66 - glance::api::sync_db: false
67 step_config: &step_config
68 get_attr: [GlanceApiPuppetBase, role_data, step_config]
69 service_config_settings: {get_attr: [GlanceApiPuppetBase, role_data, service_config_settings]}
70 # BEGIN DOCKER SETTINGS #
72 config_volume: glance_api
73 puppet_tags: glance_api_config,glance_api_paste_ini,glance_swift_config,glance_cache_config
74 step_config: *step_config
75 config_image: {get_param: DockerGlanceApiConfigImage}
77 /var/lib/kolla/config_files/glance_api.json:
78 command: /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf
80 - source: "/var/lib/kolla/config_files/src/*"
83 preserve_properties: true
84 /var/lib/kolla/config_files/glance_api_tls_proxy.json:
85 command: /usr/sbin/httpd -DFOREGROUND
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
92 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
95 image: &glance_api_image {get_param: DockerGlanceApiImage}
99 - /var/log/containers/glance:/var/log/glance
100 command: ['/bin/bash', '-c', 'chown -R glance:glance /var/log/glance']
103 image: *glance_api_image
108 volumes: &glance_volumes
110 - {get_attr: [ContainersCommon, volumes]}
112 - /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json
113 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
114 - /var/log/containers/glance:/var/log/glance
116 - KOLLA_BOOTSTRAP=True
117 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
118 command: "/usr/bin/bootstrap_host_exec glance_api su glance -s /bin/bash -c '/usr/local/bin/kolla_start'"
123 image: *glance_api_image
127 volumes: *glance_volumes
129 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
131 - internal_tls_enabled
132 - glance_api_tls_proxy:
134 image: *glance_api_image
140 - {get_attr: [ContainersCommon, volumes]}
142 - /var/lib/kolla/config_files/glance_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
143 - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
144 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
145 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
147 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
150 - name: create persistent logs directory
152 path: /var/log/containers/glance
155 - name: Stop and disable glance_api service
157 service: name=openstack-glance-api state=stopped enabled=no
159 get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]