Add cinder volume ISCSI resource

Add ISCSI backend as enabled default for the
cinder_volume resource. Note, cannot be decoupled
as a separate resource because of the external
puppet class reference hardcoded upstream.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-08-03 16:08:15 +02:00
parent ab24480e32
commit 847f17b1a3
4 changed files with 38 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# Cinder Volume resource for puppet handler
Setup and configure the cinder volume service
Setup and configure the cinder volume service.
Configure ISCSI volume backend for cinder volume nodes, if specified
(Default true)
source https://github.com/openstack/puppet-cinder/blob/5.1.0/manifests/volume/iscsi.pp
source https://github.com/openstack/puppet-cinder/blob/5.1.0/manifests/volume.pp

View File

@ -1,6 +1,12 @@
$resource = hiera($::resource_name)
$package_ensure = $resource['input']['package_ensure']['value']
$use_iscsi_backend = $resource['input']['use_iscsi_backend']['value']
$iscsi_ip_address = $resource['input']['iscsi_ip_address']['value']
$volume_driver = $resource['input']['volume_driver']['value']
$volume_group = $resource['input']['volume_group']['value']
$iscsi_helper = $resource['input']['iscsi_helper']['value']
include cinder::params
@ -14,3 +20,12 @@ class {'cinder::volume':
enabled => true,
manage_service => true,
}
if $use_iscsi_backend {
class {'cinder::volume::iscsi':
iscsi_ip_address => $iscsi_ip_address,
volume_driver => $volume_driver,
volume_group => $volume_group,
iscsi_helper => $iscsi_helper,
}
}

View File

@ -6,6 +6,22 @@ input:
package_ensure:
schema: str
value: 'present'
iscsi_ip_address:
schema: str
value: '127.0.0.1'
volume_driver:
schema: str
value: 'cinder.volume.drivers.lvm.LVMISCSIDriver'
volume_group:
schema: str
value: 'cinder-volumes'
iscsi_helper:
schema: str
value: 'tgtadm'
use_iscsi_backend:
schema: bool
value: true
git:
schema: {repository: str!, branch: str!}