Add Cinder volume
This commit is contained in:
parent
61a7c81fd0
commit
9634db2bea
33
manifests/cinder/volume.pp
Normal file
33
manifests/cinder/volume.pp
Normal file
@ -0,0 +1,33 @@
|
||||
class kickstack::cinder::volume inherits kickstack {
|
||||
|
||||
include kickstack::cinder::config
|
||||
|
||||
class { '::cinder::volume': }
|
||||
|
||||
case $::kickstack::cinder_backend {
|
||||
'iscsi': {
|
||||
$pv = "$::kickstack::cinder_lvm_pv"
|
||||
$vg = "$::kickstack::cinder_lvm_vg"
|
||||
physical_volume { "$pv":
|
||||
ensure => present
|
||||
}
|
||||
volume_group { "$vg":
|
||||
ensure => present,
|
||||
physical_volumes => "$pv",
|
||||
require => Physical_volume["$pv"]
|
||||
}
|
||||
class { '::cinder::volume::iscsi':
|
||||
iscsi_ip_address => '0.0.0.0',
|
||||
require => Volume_group["$vg"]
|
||||
}
|
||||
}
|
||||
'rbd': {
|
||||
$rbd_secret_uuid = getvar("${fact_prefix}rbd_secret_uuid")
|
||||
class { '::cinder::volume::rbd':
|
||||
rbd_pool => $cinder_rbd_pool,
|
||||
rbd_user => $cinder_rbd_user,
|
||||
rbd_secret_uuid => $rbd_secret_uuid
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -33,6 +33,11 @@ class kickstack (
|
||||
$keystone_service_tenant = $kickstack::params::keystone_service_tenant,
|
||||
$keystone_admin_email = $kickstack::params::keystone_admin_email,
|
||||
$keystone_admin_password = $kickstack::params::keystone_admin_password,
|
||||
$cinder_backend = $kickstack::params::cinder_backend,
|
||||
$cinder_lvm_pv = $kickstack::params::cinder_lvm_pv,
|
||||
$cinder_lvm_vg = $kickstack::params::cinder_lvm_vg,
|
||||
$cinder_rbd_pool = $kickstack::params::cinder_rbd_pool,
|
||||
$cinder_rbd_user = $kickstack::params::cinder_rbd_user,
|
||||
) inherits kickstack::params {
|
||||
|
||||
include exportfact
|
||||
|
@ -76,4 +76,18 @@ class kickstack::params {
|
||||
# The initial password to set for the admin user
|
||||
$keystone_admin_password = pick(getvar("::${variable_prefix}keystone_admin_password"),"kickstack")
|
||||
|
||||
# The backend to use with Cinder. Supported: iscsi (default), rbd
|
||||
$cinder_backend = pick(getvar("::${variable_prefix}cinder_backend"),"iscsi")
|
||||
|
||||
# The device to create the LVM physical volume on. Ignored unless $cinder_backend==iscsi.
|
||||
$cinder_lvm_pv = pick(getvar("::${variable_prefix}cinder_lvm_pv"),"/dev/disk/by-partlabel/cinder-volumes")
|
||||
|
||||
# The LVM volume group name to use for volumes. Ignored unless $cinder_backend==iscsi.
|
||||
$cinder_lvm_vg = pick(getvar("::${variable_prefix}cinder_lvm_vg"),"cinder-volumes")
|
||||
|
||||
# The RADOS pool to use for volumes. Ignored unless $cinder_backend==rbd.
|
||||
$cinder_rbd_pool = pick(getvar("::${variable_prefix}cinder_rbd_pool"),"cinder-volumes")
|
||||
|
||||
# The RADOS user to use for volumes. Ignored unless $cinder_backend==rbd.
|
||||
$cinder_rbd_user = pick(getvar("::${variable_prefix}cinder_rbd_pool"),"cinder")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user