1 heat_template_version: ocata
4 OpenStack Glance API service configured with Puppet
9 description: Mapping of service_name -> network name. Typically set
10 via parameter_defaults in the resource registry. This
11 mapping overrides those in ServiceNetMapDefaults.
18 description: Mapping of service endpoint -> protocol. Typically set
19 via parameter_defaults in the resource registry.
23 description: Set to True to enable debugging on all services.
26 description: The password for the glance service and db account, used by the glance services.
32 Number of API worker processes for Glance. If left unset (empty string), the
33 default value will result in the configuration being left unset and a
34 system-dependent default value will be chosen (e.g.: number of
35 processors). Please note that this will create a large number of
36 processes on systems with a large number of CPUs resulting in excess
37 memory consumption. It is recommended that a suitable non-default value
38 be selected on such systems.
40 MonitoringSubscriptionGlanceApi:
41 default: 'overcloud-glance-api'
43 GlanceApiLoggingSource:
46 tag: openstack.glance.api
47 path: /var/log/glance/api.log
56 description: Set to True to enable debugging on all services.
58 GlanceNotifierStrategy:
59 description: Strategy to use for Glance notification queue
63 description: The filepath of the file to use for logging messages from Glance.
68 description: The short name of the Glance backend to use. Should be one
69 of swift, rbd, or file
72 - allowed_values: ['swift', 'file', 'rbd']
76 When using GlanceBackend 'file', mount NFS share for image storage.
81 NFS share to mount for image storage (when GlanceNfsEnabled is true)
84 default: 'intr,context=system_u:object_r:glance_var_lib_t:s0'
86 NFS mount options for image storage (when GlanceNfsEnabled is true)
92 description: The password for RabbitMQ
97 description: The username for RabbitMQ
101 description: Set rabbit subscriber port, change this if using SSL
106 Rabbit client subscriber parameter to specify
107 an SSL connection to the RabbitMQ host.
112 description: Keystone region for endpoint
115 use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]}
120 type: OS::TripleO::Services::TLSProxyBase
122 ServiceNetMap: {get_param: ServiceNetMap}
123 DefaultPasswords: {get_param: DefaultPasswords}
124 EndpointMap: {get_param: EndpointMap}
125 EnableInternalTLS: {get_param: EnableInternalTLS}
129 description: Role data for the Glance API role.
131 service_name: glance_api
132 monitoring_subscription: {get_param: MonitoringSubscriptionGlanceApi}
133 logging_source: {get_param: GlanceApiLoggingSource}
138 - get_attr: [TLSProxyBase, role_data, config_settings]
139 - glance::api::database_connection:
142 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
144 - {get_param: GlancePassword}
146 - {get_param: [EndpointMap, MysqlInternal, host]}
148 - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
149 glance::api::bind_port: {get_param: [EndpointMap, GlanceInternal, port]}
150 glance::api::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
151 glance::api::authtoken::auth_url: { get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
152 glance::api::enable_v1_api: false
153 glance::api::enable_v2_api: true
154 glance::api::authtoken::password: {get_param: GlancePassword}
155 glance::api::enable_proxy_headers_parsing: true
156 glance::api::debug: {get_param: Debug}
157 glance::api::workers: {get_param: GlanceWorkers}
158 tripleo.glance_api.firewall_rules:
163 glance::api::authtoken::project_name: 'service'
164 glance::api::pipeline: 'keystone'
165 glance::api::show_image_direct_url: true
166 # NOTE: bind IP is found in Heat replacing the network name with the
167 # local node IP for the given network; replacement examples
168 # (eg. for internal_api):
170 # internal_api_uri -> [IP]
171 # internal_api_subnet - > IP/CIDR
172 tripleo::profile::base::glance::api::tls_proxy_bind_ip:
173 get_param: [ServiceNetMap, GlanceApiNetwork]
174 tripleo::profile::base::glance::api::tls_proxy_fqdn:
177 "%{hiera('fqdn_$NETWORK')}"
179 $NETWORK: {get_param: [ServiceNetMap, GlanceApiNetwork]}
180 tripleo::profile::base::glance::api::tls_proxy_port:
181 get_param: [EndpointMap, GlanceInternal, port]
182 # Bind to localhost if internal TLS is enabled, since we put a TLs
184 glance::api::bind_host:
188 - {get_param: [ServiceNetMap, GlanceApiNetwork]}
189 glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
190 glance_log_file: {get_param: GlanceLogFile}
191 glance::backend::swift::swift_store_auth_address: {get_param: [EndpointMap, KeystoneInternal, uri] }
192 glance::backend::swift::swift_store_user: service:glance
193 glance::backend::swift::swift_store_key: {get_param: GlancePassword}
194 glance::backend::swift::swift_store_create_container_on_put: true
195 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
196 glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
197 glance_backend: {get_param: GlanceBackend}
198 glance::notify::rabbitmq::rabbit_userid: {get_param: RabbitUserName}
199 glance::notify::rabbitmq::rabbit_port: {get_param: RabbitClientPort}
200 glance::notify::rabbitmq::rabbit_password: {get_param: RabbitPassword}
201 glance::notify::rabbitmq::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
202 glance::notify::rabbitmq::notification_driver: messagingv2
203 tripleo::profile::base::glance::api::glance_nfs_enabled: {get_param: GlanceNfsEnabled}
204 tripleo::glance::nfs_mount::share: {get_param: GlanceNfsShare}
205 tripleo::glance::nfs_mount::options: {get_param: GlanceNfsOptions}
206 service_config_settings:
208 glance::keystone::auth::public_url: {get_param: [EndpointMap, GlancePublic, uri]}
209 glance::keystone::auth::internal_url: {get_param: [EndpointMap, GlanceInternal, uri]}
210 glance::keystone::auth::admin_url: {get_param: [EndpointMap, GlanceAdmin, uri]}
211 glance::keystone::auth::password: {get_param: GlancePassword }
212 glance::keystone::auth::region: {get_param: KeystoneRegion}
213 glance::keystone::auth::tenant: 'service'
215 glance::db::mysql::password: {get_param: GlancePassword}
216 glance::db::mysql::user: glance
217 glance::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
218 glance::db::mysql::dbname: glance
219 glance::db::mysql::allowed_hosts:
221 - "%{hiera('mysql_bind_host')}"
223 include ::tripleo::profile::base::glance::api
225 - name: Check if glance_api is deployed
226 command: systemctl is-enabled openstack-glance-api
229 register: glance_api_enabled
230 #(TODO) Remove all glance-registry bits in Pike.
231 - name: Check if glance_registry is deployed
232 command: systemctl is-enabled openstack-glance-registry
235 register: glance_registry_enabled
236 - name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
237 shell: /usr/bin/systemctl show 'openstack-glance-api' --property ActiveState | grep '\bactive\b'
238 tags: step0,validation
239 when: glance_api_enabled.rc == 0
240 - name: Stop glance_api service
242 when: glance_api_enabled.rc == 0
243 service: name=openstack-glance-api state=stopped
244 - name: Stop and disable glance registry (removed for Ocata)
246 when: glance_registry_enabled.rc == 0
247 service: name=openstack-glance-registry state=stopped enabled=no