Make glance filesystem_store_datadir configurable.

User can use custom directory to store images.
For example using a shared file system as backend.

Change-Id: Iab7a9a51e619bdbf8f7bd4626ebe4d703e6d4819
This commit is contained in:
jimmygc 2017-03-31 16:17:40 +08:00 committed by Paul Bourke
parent 4510c525a6
commit f70dfc5dc3
4 changed files with 8 additions and 1 deletions

View File

@ -471,6 +471,7 @@ keystone_default_user_role: "_member_"
glance_backend_file: "{{ not enable_ceph | bool }}" glance_backend_file: "{{ not enable_ceph | bool }}"
glance_backend_ceph: "{{ enable_ceph }}" glance_backend_ceph: "{{ enable_ceph }}"
glance_backend_vmware: "no" glance_backend_vmware: "no"
glance_file_datadir_volume: "glance"
####################### #######################
# Ceilometer options # Ceilometer options

View File

@ -3,6 +3,7 @@
command: > command: >
env enable_haproxy={{ enable_haproxy }} env enable_haproxy={{ enable_haproxy }}
enable_swift={{ enable_swift }} enable_swift={{ enable_swift }}
glance_file_datadir_volume={{ glance_file_datadir_volume }}
kolla_internal_vip_address={{ kolla_internal_vip_address }} kolla_internal_vip_address={{ kolla_internal_vip_address }}
kolla_external_vip_address={{ kolla_external_vip_address }} kolla_external_vip_address={{ kolla_external_vip_address }}
kolla_dev_repos_directory={{ kolla_dev_repos_directory }} kolla_dev_repos_directory={{ kolla_dev_repos_directory }}

View File

@ -10,7 +10,7 @@ glance_services:
volumes: volumes:
- "{{ node_config_directory }}/glance-api/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/glance-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "glance:/var/lib/glance/" - "{{ glance_file_datadir_volume }}:/var/lib/glance/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
glance-registry: glance-registry:
container_name: glance_registry container_name: glance_registry

View File

@ -51,6 +51,11 @@ if [[ "$enable_swift" == "yes" ]]; then
sed -i '/\/srv\/node\//d' /etc/fstab sed -i '/\/srv\/node\//d' /etc/fstab
fi fi
if [[ "$glance_file_datadir_volume" != "glance" && -d "$glance_file_datadir_volume" ]]; then
echo "Removing glance volume if it is customzied"
rm -rfv $glance_file_datadir_volume
fi
echo "Getting folders name..." echo "Getting folders name..."
FOLDER_PATH="/etc/kolla/" FOLDER_PATH="/etc/kolla/"
for dir in $FOLDER_PATH*; do for dir in $FOLDER_PATH*; do