22231b2d66
This patch moves the default_store config option to the glance::api class, and makes it possible to configure more than one store while supplying a value for the default store to be used. If only one store is given for glance_store/stores, the default store is automatically set to be the same value. If multiple stores are given and no default store is explicitly set, the config will fail and ask the user to provide a default store. Change-Id: I28a79ae36e673a3537ea16910d338666b65c80f7 Closes-bug: #1481460 Co-Authored-By: Alex Schultz <aschultz@mirantis.com>
73 lines
2.0 KiB
Puppet
73 lines
2.0 KiB
Puppet
# == class: glance::backend::rbd
|
|
#
|
|
# configures the storage backend for glance
|
|
# as a rbd instance
|
|
#
|
|
# === parameters:
|
|
#
|
|
# [*rbd_store_user*]
|
|
# Optional.
|
|
#
|
|
# [*rbd_store_pool*]
|
|
# Optional. Default:'images'
|
|
#
|
|
# [*rbd_store_ceph_conf*]
|
|
# Optional. Default:'/etc/ceph/ceph.conf'
|
|
#
|
|
# [*rbd_store_chunk_size*]
|
|
# Optional. Default:'8'
|
|
#
|
|
# [*show_image_direct_url*]
|
|
# Optional. Enables direct COW from glance to rbd
|
|
# DEPRECATED, use show_image_direct_url in glance::api
|
|
#
|
|
# [*package_ensure*]
|
|
# (optional) Desired ensure state of packages.
|
|
# accepts latest or specific versions.
|
|
# Defaults to present.
|
|
#
|
|
# [*rados_connect_timeout*]
|
|
# Optinal. Timeout value (in seconds) used when connecting
|
|
# to ceph cluster. If value <= 0, no timeout is set and
|
|
# default librados value is used.
|
|
#
|
|
# [*multi_store*]
|
|
# (optional) Boolean describing if multiple backends will be configured
|
|
# Defaults to false
|
|
#
|
|
|
|
class glance::backend::rbd(
|
|
$rbd_store_user = undef,
|
|
$rbd_store_ceph_conf = '/etc/ceph/ceph.conf',
|
|
$rbd_store_pool = 'images',
|
|
$rbd_store_chunk_size = '8',
|
|
$show_image_direct_url = undef,
|
|
$package_ensure = 'present',
|
|
$rados_connect_timeout = '0',
|
|
$multi_store = false,
|
|
) {
|
|
include ::glance::params
|
|
|
|
if $show_image_direct_url {
|
|
notice('parameter show_image_direct_url is deprecated, use parameter in glance::api')
|
|
}
|
|
|
|
glance_api_config {
|
|
'glance_store/rbd_store_ceph_conf': value => $rbd_store_ceph_conf;
|
|
'glance_store/rbd_store_user': value => $rbd_store_user;
|
|
'glance_store/rbd_store_pool': value => $rbd_store_pool;
|
|
'glance_store/rbd_store_chunk_size': value => $rbd_store_chunk_size;
|
|
'glance_store/rados_connect_timeout': value => $rados_connect_timeout;
|
|
}
|
|
|
|
if !$multi_store {
|
|
glance_api_config { 'glance_store/default_store': value => 'rbd'; }
|
|
}
|
|
|
|
package { 'python-ceph':
|
|
ensure => $package_ensure,
|
|
name => $::glance::params::pyceph_package_name,
|
|
}
|
|
|
|
}
|