Merge "Add support of shared staging location for glance-direct"
This commit is contained in:
@@ -202,16 +202,7 @@ outputs:
|
|||||||
- /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json
|
- /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json
|
||||||
- /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
|
- /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
|
||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
-
|
- /var/lib/glance:/var/lib/glance:slave
|
||||||
if:
|
|
||||||
- nfs_backend_enabled
|
|
||||||
- /var/lib/glance:/var/lib/glance
|
|
||||||
- ''
|
|
||||||
-
|
|
||||||
if:
|
|
||||||
- netapp_nfs_backend_enabled
|
|
||||||
- /var/lib/glance:/var/lib/glance
|
|
||||||
- ''
|
|
||||||
-
|
-
|
||||||
if:
|
if:
|
||||||
- cinder_backend_enabled
|
- cinder_backend_enabled
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
# Configure and include this environment to enable the use of an NFS
|
# Configure and include this environment to enable the use of an NFS
|
||||||
# share as the backend for Glance.
|
# share as the backend for Glance.
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
|
# List of enabled Image Import Methods. Valid values in the list are 'glance-direct' and 'web-download'
|
||||||
|
# Type: comma_delimited_list
|
||||||
|
GlanceEnabledImportMethods: web-download
|
||||||
|
|
||||||
# When using GlanceBackend 'file', Netapp mount NFS share for image storage.
|
# When using GlanceBackend 'file', Netapp mount NFS share for image storage.
|
||||||
# Type: boolean
|
# Type: boolean
|
||||||
GlanceNetappNfsEnabled: False
|
GlanceNetappNfsEnabled: False
|
||||||
@@ -21,6 +25,18 @@ parameter_defaults:
|
|||||||
# Type: string
|
# Type: string
|
||||||
GlanceNfsShare: ''
|
GlanceNfsShare: ''
|
||||||
|
|
||||||
|
# URI that specifies the staging location to use when importing images
|
||||||
|
# Type: string
|
||||||
|
GlanceNodeStagingUri: file:///var/lib/glance/staging
|
||||||
|
|
||||||
|
# NFS mount options for NFS image import staging
|
||||||
|
# Type: string
|
||||||
|
GlanceStagingNfsOptions: _netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0
|
||||||
|
|
||||||
|
# NFS share to mount for image import staging
|
||||||
|
# Type: string
|
||||||
|
GlanceStagingNfsShare: ''
|
||||||
|
|
||||||
# Netapp share to mount for image storage (when GlanceNetappNfsEnabled is true)
|
# Netapp share to mount for image storage (when GlanceNetappNfsEnabled is true)
|
||||||
# Type: string
|
# Type: string
|
||||||
NetappShareLocation: ''
|
NetappShareLocation: ''
|
||||||
|
@@ -137,6 +137,21 @@ parameters:
|
|||||||
List of enabled Image Import Methods. Valid values in the list are
|
List of enabled Image Import Methods. Valid values in the list are
|
||||||
'glance-direct' and 'web-download'
|
'glance-direct' and 'web-download'
|
||||||
type: comma_delimited_list
|
type: comma_delimited_list
|
||||||
|
GlanceStagingNfsShare:
|
||||||
|
default: ''
|
||||||
|
description: >
|
||||||
|
NFS share to mount for image import staging
|
||||||
|
type: string
|
||||||
|
GlanceNodeStagingUri:
|
||||||
|
default: 'file:///var/lib/glance/staging'
|
||||||
|
description: >
|
||||||
|
URI that specifies the staging location to use when importing images
|
||||||
|
type: string
|
||||||
|
GlanceStagingNfsOptions:
|
||||||
|
default: '_netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0'
|
||||||
|
description: >
|
||||||
|
NFS mount options for NFS image import staging
|
||||||
|
type: string
|
||||||
KeystoneRegion:
|
KeystoneRegion:
|
||||||
type: string
|
type: string
|
||||||
default: 'regionOne'
|
default: 'regionOne'
|
||||||
@@ -244,6 +259,7 @@ outputs:
|
|||||||
glance::api::os_region_name: {get_param: KeystoneRegion}
|
glance::api::os_region_name: {get_param: KeystoneRegion}
|
||||||
glance::api::image_member_quota: {get_param: GlanceImageMemberQuota}
|
glance::api::image_member_quota: {get_param: GlanceImageMemberQuota}
|
||||||
glance::api::enabled_import_methods: {get_param: GlanceEnabledImportMethods}
|
glance::api::enabled_import_methods: {get_param: GlanceEnabledImportMethods}
|
||||||
|
glance::api::node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||||
# NOTE: bind IP is found in hiera replacing the network name with the
|
# NOTE: bind IP is found in hiera replacing the network name with the
|
||||||
# local node IP for the given network; replacement examples
|
# local node IP for the given network; replacement examples
|
||||||
# (eg. for internal_api):
|
# (eg. for internal_api):
|
||||||
@@ -356,6 +372,14 @@ outputs:
|
|||||||
- NETAPP_SHARE: {get_param: NetappShareLocation}
|
- NETAPP_SHARE: {get_param: NetappShareLocation}
|
||||||
NFS_OPTIONS: {get_param: GlanceNfsOptions}
|
NFS_OPTIONS: {get_param: GlanceNfsOptions}
|
||||||
when: netapp_nfs_backend_enable
|
when: netapp_nfs_backend_enable
|
||||||
|
- name: Mount Node Staging Location
|
||||||
|
vars:
|
||||||
|
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||||
|
glance_staging_nfs_share: {get_param: GlanceStagingNfsShare}
|
||||||
|
glance_nfs_options: {get_param: GlanceStagingNfsOptions}
|
||||||
|
# Gleaning mount point by stripping "file://" prefix from staging uri
|
||||||
|
mount: name="{{glance_node_staging_uri[7:]}}" src="{{glance_staging_nfs_share}}" fstype=nfs opts="{{glance_nfs_options}}" state=mounted
|
||||||
|
when: glance_staging_nfs_share
|
||||||
|
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Check if glance_api is deployed
|
- name: Check if glance_api is deployed
|
||||||
|
@@ -28,6 +28,10 @@ environments:
|
|||||||
- GlanceNfsOptions
|
- GlanceNfsOptions
|
||||||
- GlanceNetappNfsEnabled
|
- GlanceNetappNfsEnabled
|
||||||
- NetappShareLocation
|
- NetappShareLocation
|
||||||
|
- GlanceEnabledImportMethods
|
||||||
|
- GlanceStagingNfsShare
|
||||||
|
- GlanceNodeStagingUri
|
||||||
|
- GlanceStagingNfsOptions
|
||||||
sample_values:
|
sample_values:
|
||||||
GlanceBackend: file
|
GlanceBackend: file
|
||||||
GlanceNfsEnabled: True
|
GlanceNfsEnabled: True
|
||||||
|
Reference in New Issue
Block a user