Add support for glance multistore
Add parameters to support deploying multiple glance-api backends. The existing GlanceBackend parameter specifies the first backend, and it's the default backend when multiple backends are defined. Additional backends are defined using a new GlanceMultistoreConfig parameter. The data is a hash where the keys are the glance backend identifier and the data is the glance settings for that backend. A new GlanceStoreDescription lets the user to provide a description for each backend. The configuration can specify any combination of supported backend types. Multiple rbd backends can be specified, but cinder, file and swift backends are limited to one each. Change-Id: Ifc538250815f0ce0e534cae443037e143309ca56 Depends-On: I41ab9b3593bf3d078c5bbd1826df8308e3f5e7af
This commit is contained in:
parent
d639b51c0b
commit
96937674a7
|
@ -99,7 +99,13 @@ parameter_defaults:
|
|||
NovaEnableRbdBackend: true
|
||||
CinderEnableRbdBackend: true
|
||||
CinderBackupBackend: ceph
|
||||
GlanceBackend: rbd
|
||||
GlanceBackend: cinder
|
||||
GlanceStoreDescription: 'Cinder glance store'
|
||||
GlanceMultistoreConfig:
|
||||
rbd_store:
|
||||
GlanceBackend: rbd
|
||||
GlanceStoreDescription: 'RBD glance store'
|
||||
CephClientUserName: 'glance'
|
||||
GnocchiBackend: rbd
|
||||
CinderEnableIscsiBackend: false
|
||||
GnocchiArchivePolicy: 'ceilometer-high-rate'
|
||||
|
|
|
@ -205,6 +205,40 @@ parameters:
|
|||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['swift', 'file', 'rbd', 'cinder']
|
||||
GlanceBackendID:
|
||||
type: string
|
||||
default: 'default_backend'
|
||||
description: The default backend's identifier.
|
||||
constraints:
|
||||
- allowed_pattern: "[a-zA-Z0-9_-]+"
|
||||
GlanceStoreDescription:
|
||||
type: string
|
||||
default: 'Default glance store backend.'
|
||||
description: User facing description for the Glance backend.
|
||||
GlanceMultistoreConfig:
|
||||
type: json
|
||||
default: {}
|
||||
description: |
|
||||
Dictionary of settings when configuring additional glance backends. The
|
||||
hash key is the backend ID, and the value is a dictionary of parameter
|
||||
values unique to that backend. Multiple rbd backends are allowed, but
|
||||
cinder, file and swift backends are limited to one each. Example:
|
||||
# Default glance store is rbd.
|
||||
GlanceBackend: rbd
|
||||
GlanceStoreDescription: 'Default rbd store'
|
||||
# GlanceMultistoreConfig specifies a second rbd backend, plus a cinder
|
||||
# backend.
|
||||
GlanceMultistoreConfig:
|
||||
rbd2_store:
|
||||
GlanceBackend: rbd
|
||||
GlanceStoreDescription: 'Second rbd store'
|
||||
CephClusterName: ceph2
|
||||
# Override CephClientUserName if this cluster uses a different
|
||||
# client name.
|
||||
CephClientUserName: client2
|
||||
cinder_store:
|
||||
GlanceBackend: cinder
|
||||
GlanceStoreDescription: 'Cinder store'
|
||||
CephClientUserName:
|
||||
default: openstack
|
||||
type: string
|
||||
|
@ -235,17 +269,35 @@ parameters:
|
|||
conditions:
|
||||
|
||||
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
||||
cinder_backend_enabled: {equals: [{get_param: GlanceBackend}, cinder]}
|
||||
cinder_backend_enabled:
|
||||
or:
|
||||
- equals:
|
||||
- get_param: GlanceBackend
|
||||
- cinder
|
||||
- equals:
|
||||
- yaql:
|
||||
expression: $.data.values().any($.get("GlanceBackend", "") = "cinder")
|
||||
data: {get_param: GlanceMultistoreConfig}
|
||||
- true
|
||||
cinder_multipathd_enabled:
|
||||
and:
|
||||
- cinder_backend_enabled
|
||||
- equals:
|
||||
- get_param: MultipathdEnable
|
||||
- true
|
||||
rbd_backend_enabled: {equals: [{get_param: GlanceBackend}, rbd]}
|
||||
rbd_backend_enabled:
|
||||
or:
|
||||
- equals:
|
||||
- get_param: GlanceBackend
|
||||
- rbd
|
||||
- equals:
|
||||
- yaql:
|
||||
expression: $.data.values().any($.get("GlanceBackend", "") = "rbd")
|
||||
data: {get_param: GlanceMultistoreConfig}
|
||||
- true
|
||||
enable_image_conversion:
|
||||
and:
|
||||
- equals: [{get_param: GlanceBackend}, rbd]
|
||||
- rbd_backend_enabled
|
||||
- equals: [{get_param: NovaEnableRbdBackend}, true]
|
||||
use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]}
|
||||
glance_workers_unset: {equals : [{get_param: GlanceWorkers}, '']}
|
||||
|
@ -258,9 +310,7 @@ conditions:
|
|||
- glance_netapp_nfs_enabled
|
||||
- and:
|
||||
# Keep this for compat, but ignore NovaEnableRbdBackend if it's a role param
|
||||
- equals:
|
||||
- get_param: GlanceBackend
|
||||
- rbd
|
||||
- rbd_backend_enabled
|
||||
- equals:
|
||||
- get_param: NovaEnableRbdBackend
|
||||
- true
|
||||
|
@ -419,6 +469,9 @@ outputs:
|
|||
glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
|
||||
glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
|
||||
glance_backend: {get_param: GlanceBackend}
|
||||
tripleo::profile::base::glance::api::glance_backend_id: {get_param: GlanceBackendID}
|
||||
tripleo::profile::base::glance::api::glance_store_description: {get_param: GlanceStoreDescription}
|
||||
tripleo::profile::base::glance::api::multistore_config: {get_param: GlanceMultistoreConfig}
|
||||
glance::notify::rabbitmq::notification_driver: {get_param: NotificationDriver}
|
||||
-
|
||||
if:
|
||||
|
@ -493,17 +546,31 @@ outputs:
|
|||
merge: true
|
||||
preserve_properties: true
|
||||
permissions:
|
||||
- path: /var/lib/glance
|
||||
owner: glance:glance
|
||||
recurse: true
|
||||
- path:
|
||||
str_replace:
|
||||
template: /etc/ceph/CLUSTER.client.USER.keyring
|
||||
params:
|
||||
CLUSTER: {get_param: CephClusterName}
|
||||
USER: {get_param: CephClientUserName}
|
||||
owner: glance:glance
|
||||
perm: '0600'
|
||||
list_concat:
|
||||
-
|
||||
- path: /var/lib/glance
|
||||
owner: glance:glance
|
||||
recurse: true
|
||||
- path:
|
||||
str_replace:
|
||||
template: /etc/ceph/CLUSTER.client.USER.keyring
|
||||
params:
|
||||
CLUSTER: {get_param: CephClusterName}
|
||||
USER: {get_param: CephClientUserName}
|
||||
owner: glance:glance
|
||||
perm: '0600'
|
||||
- repeat:
|
||||
template:
|
||||
path: /etc/ceph/<%keyring%>
|
||||
owner: glance:glance
|
||||
perm: '0600'
|
||||
for_each:
|
||||
<%keyring%>:
|
||||
yaql:
|
||||
expression: let(u => $.data.user) -> $.data.multistore.values().where($.get("CephClusterName")).select("{0}.client.{1}.keyring".format($.CephClusterName, $.get("CephClientUserName", $u)))
|
||||
data:
|
||||
user: {get_param: CephClientUserName}
|
||||
multistore: {get_param: GlanceMultistoreConfig}
|
||||
/var/lib/kolla/config_files/glance_api_tls_proxy.json:
|
||||
command: /usr/sbin/httpd -DFOREGROUND
|
||||
config_files:
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add parameters for configuring multiple glance-api backends. The existing
|
||||
``GlanceBackend`` parameter represents the default backend, and a new
|
||||
``GlanceMultistoreConfig`` parameter is a hash representing the
|
||||
configuration of additional backends. A new ``GlanceStoreDescription``
|
||||
parameter provides a means of describing each backend.
|
||||
|
||||
The configuration can specify any combination of supported backend types.
|
||||
Multiple rbd backends can be specified, but cinder, file and swift
|
||||
backends are limited to one each.
|
Loading…
Reference in New Issue