Allow for multiple store backends for Glance
This implementation will add a new `user_variables.yml` override glance_additional_stores which is set with the default values http, cinder The operator can now independently enable Glance store protocols besides glance_default_store. A example configuration can be glance_default_store = rbd glance_additional_stores: - swift - http - cinder to maintain glance images over RBD and Swift/HTTP. This is particular useful when adding new storage protocols to glance while retaining access to the existing protocols/images. DocImpact Closes-Bug: #1524544 Change-Id: I2517fd5170bc67460fe3f66e0a0215af390343bc
This commit is contained in:
parent
c21e88e8c0
commit
a4a29ecf88
@ -55,6 +55,9 @@ glance_system_user_home: "/var/lib/{{ glance_system_user_name }}"
|
|||||||
glance_registry_host: "{{ internal_lb_vip_address }}"
|
glance_registry_host: "{{ internal_lb_vip_address }}"
|
||||||
glance_rpc_backend: glance.openstack.common.rpc.impl_kombu
|
glance_rpc_backend: glance.openstack.common.rpc.impl_kombu
|
||||||
glance_default_store: file
|
glance_default_store: file
|
||||||
|
glance_additional_stores:
|
||||||
|
- http
|
||||||
|
- cinder
|
||||||
glance_flavor: "{% if glance_default_store == 'rbd' %}keystone{% else %}keystone+cachemanagement{% endif %}"
|
glance_flavor: "{% if glance_default_store == 'rbd' %}keystone{% else %}keystone+cachemanagement{% endif %}"
|
||||||
glance_show_image_direct_url: "{{ glance_default_store == 'rbd' }}"
|
glance_show_image_direct_url: "{{ glance_default_store == 'rbd' }}"
|
||||||
|
|
||||||
|
@ -92,11 +92,15 @@ flavor = {{ glance_flavor }}
|
|||||||
|
|
||||||
[glance_store]
|
[glance_store]
|
||||||
default_store = {{ glance_default_store }}
|
default_store = {{ glance_default_store }}
|
||||||
{% if glance_default_store == "file" %}
|
|
||||||
stores = file,http,cinder
|
{% set glance_available_stores = [ glance_default_store ] + glance_additional_stores %}
|
||||||
|
stores = {% for backend in glance_available_stores %}{{ backend }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||||
|
|
||||||
|
{% if 'file' in glance_available_stores %}
|
||||||
filesystem_store_datadir = {{ glance_system_user_home }}/images/
|
filesystem_store_datadir = {{ glance_system_user_home }}/images/
|
||||||
{% elif glance_default_store == "swift" %}
|
{% endif %}
|
||||||
stores = swift,http,cinder
|
|
||||||
|
{% if 'swift' in glance_available_stores %}
|
||||||
user_domain_id = {{ glance_swift_store_user_domain }}
|
user_domain_id = {{ glance_swift_store_user_domain }}
|
||||||
project_domain_id = {{ glance_swift_store_project_domain }}
|
project_domain_id = {{ glance_swift_store_project_domain }}
|
||||||
swift_store_auth_version = {{ glance_swift_store_auth_version }}
|
swift_store_auth_version = {{ glance_swift_store_auth_version }}
|
||||||
@ -111,8 +115,9 @@ swift_store_large_object_size = {{ glance_swift_store_large_object_size }}
|
|||||||
swift_store_large_object_chunk_size = {{ glance_swift_store_large_object_chunk_size }}
|
swift_store_large_object_chunk_size = {{ glance_swift_store_large_object_chunk_size }}
|
||||||
swift_store_retry_get_count = 5
|
swift_store_retry_get_count = 5
|
||||||
swift_store_endpoint_type = {{ glance_swift_store_endpoint_type }}
|
swift_store_endpoint_type = {{ glance_swift_store_endpoint_type }}
|
||||||
{% elif glance_default_store == "rbd" %}
|
{% endif %}
|
||||||
stores = rbd,http,cinder
|
|
||||||
|
{% if 'rbd' in glance_available_stores %}
|
||||||
rbd_store_pool = {{ glance_rbd_store_pool }}
|
rbd_store_pool = {{ glance_rbd_store_pool }}
|
||||||
rbd_store_user = {{ glance_rbd_store_user }}
|
rbd_store_user = {{ glance_rbd_store_user }}
|
||||||
rbd_store_ceph_conf = /etc/ceph/ceph.conf
|
rbd_store_ceph_conf = /etc/ceph/ceph.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user