Merge pull request #640 from enovance/emc_vnx
Bring EMC VNX support for volumes backend
This commit is contained in:
@@ -5,7 +5,7 @@ fixtures:
|
|||||||
ref: 'c374bed10f8af6000601fa407ebaef0833e1999c'
|
ref: 'c374bed10f8af6000601fa407ebaef0833e1999c'
|
||||||
'cinder':
|
'cinder':
|
||||||
repo: 'git://github.com/enovance/puppet-cinder'
|
repo: 'git://github.com/enovance/puppet-cinder'
|
||||||
ref: '2da616a4a52d3086fe3a291b9199fc7313575504'
|
ref: 'ef0aaab38452f46eb2fc1ee1f2c4d85ccb149d52'
|
||||||
'keystone':
|
'keystone':
|
||||||
repo: 'git://github.com/enovance/puppet-keystone.git'
|
repo: 'git://github.com/enovance/puppet-keystone.git'
|
||||||
ref: 'e381349c1b838301dd730aa3cd146ecacc75aa7c'
|
ref: 'e381349c1b838301dd730aa3cd146ecacc75aa7c'
|
||||||
|
@@ -23,9 +23,10 @@ mod 'openstacklib',
|
|||||||
mod 'ceilometer',
|
mod 'ceilometer',
|
||||||
:git => 'git://github.com/enovance/puppet-ceilometer.git',
|
:git => 'git://github.com/enovance/puppet-ceilometer.git',
|
||||||
:ref => '957c2120d0ee0b9db08bfddcce996686ba61d97d'
|
:ref => '957c2120d0ee0b9db08bfddcce996686ba61d97d'
|
||||||
|
# Custom branch until https://review.openstack.org/#/c/124561/ merged
|
||||||
mod 'cinder',
|
mod 'cinder',
|
||||||
:git => 'git://github.com/enovance/puppet-cinder.git',
|
:git => 'git://github.com/enovance/puppet-cinder.git',
|
||||||
:ref => '2da616a4a52d3086fe3a291b9199fc7313575504'
|
:ref => 'ef0aaab38452f46eb2fc1ee1f2c4d85ccb149d52'
|
||||||
mod 'glance',
|
mod 'glance',
|
||||||
:git => 'git://github.com/enovance/puppet-glance.git',
|
:git => 'git://github.com/enovance/puppet-glance.git',
|
||||||
:ref => '78042d76c0854e16a55aaf05c03696d4d422e3c5'
|
:ref => '78042d76c0854e16a55aaf05c03696d4d422e3c5'
|
||||||
|
@@ -35,7 +35,11 @@ Cinder, Glance and Nova can use Ceph as backend storage, using [puppet-ceph](htt
|
|||||||
|
|
||||||
Only KVM and QEMU are supported as hypervisors, for now.
|
Only KVM and QEMU are supported as hypervisors, for now.
|
||||||
Neutron use ML2 plugin with GRE and Open-vSwitch drivers.
|
Neutron use ML2 plugin with GRE and Open-vSwitch drivers.
|
||||||
Cinder has multi-backend support with Ceph used by default and NetApp as an option.
|
Cinder has multi-backend support:
|
||||||
|
* RBD (default)
|
||||||
|
* NetAPP
|
||||||
|
* iSCSI
|
||||||
|
* EMC VNX direct
|
||||||
Trove support is now experimental.
|
Trove support is now experimental.
|
||||||
|
|
||||||
[Puppet Modules](http://docs.puppetlabs.com/learning/modules1.html#modules) are a collection of related contents that can be used to model the configuration of a discrete service.
|
[Puppet Modules](http://docs.puppetlabs.com/learning/modules1.html#modules) are a collection of related contents that can be used to model the configuration of a discrete service.
|
||||||
|
72
manifests/volume/backend/emc_vnx.pp
Normal file
72
manifests/volume/backend/emc_vnx.pp
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
# Configure EMC VNX backend for Cinder
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# [*volume_backend_name*]
|
||||||
|
# (optional) Allows for the volume_backend_name to be separate of $name.
|
||||||
|
# Defaults to: $name
|
||||||
|
#
|
||||||
|
# [*san_ip*]
|
||||||
|
# (required) IP address of SAN controller.
|
||||||
|
#
|
||||||
|
# [*san_password*]
|
||||||
|
# (required) Password of SAN controller.
|
||||||
|
#
|
||||||
|
# [*san_login*]
|
||||||
|
# (optional) Login of SAN controller.
|
||||||
|
# Defaults to : 'admin'
|
||||||
|
#
|
||||||
|
# [*storage_vnx_pool_name*]
|
||||||
|
# (required) Storage pool name.
|
||||||
|
#
|
||||||
|
# [*default_timeout*]
|
||||||
|
# (optional) Default timeout for CLI operations in minutes.
|
||||||
|
# Defaults to: '10'
|
||||||
|
#
|
||||||
|
# [*max_luns_per_storage_group*]
|
||||||
|
# (optional) Default max number of LUNs in a storage group.
|
||||||
|
# Defaults to: '256'
|
||||||
|
#
|
||||||
|
|
||||||
|
define cloud::volume::backend::emc_vnx (
|
||||||
|
$iscsi_ip_address,
|
||||||
|
$san_ip,
|
||||||
|
$san_password,
|
||||||
|
$storage_vnx_pool_name,
|
||||||
|
$default_timeout = '10',
|
||||||
|
$max_luns_per_storage_group = '256',
|
||||||
|
$san_login = 'admin',
|
||||||
|
$volume_backend_name = $name,
|
||||||
|
) {
|
||||||
|
cinder::backend::emc_vnx { $name:
|
||||||
|
default_timeout => $default_timeout,
|
||||||
|
iscsi_ip_address => $iscsi_ip_address,
|
||||||
|
max_luns_per_storage_group => $max_luns_per_storage_group,
|
||||||
|
san_ip => $san_ip,
|
||||||
|
san_login => $san_login,
|
||||||
|
san_password => $san_password,
|
||||||
|
storage_vnx_pool_name => $storage_vnx_pool_name,
|
||||||
|
}
|
||||||
|
|
||||||
|
@cinder::type { $volume_backend_name:
|
||||||
|
set_key => 'volume_backend_name',
|
||||||
|
set_value => $volume_backend_name,
|
||||||
|
notify => Service['cinder-volume']
|
||||||
|
}
|
||||||
|
}
|
@@ -91,8 +91,16 @@ class cloud::volume::storage(
|
|||||||
$iscsi_backends = { }
|
$iscsi_backends = { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if has_key($cinder_backends, 'emc_vnx') {
|
||||||
|
$emc_vnx_backends = $cinder_backends['emc_vnx']
|
||||||
|
create_resources('cloud::volume::backend::emc_vnx', $emc_vnx_backends)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$emc_vnx_backends = { }
|
||||||
|
}
|
||||||
|
|
||||||
class { 'cinder::backends':
|
class { 'cinder::backends':
|
||||||
enabled_backends => keys(merge($rbd_backends, $netapp_backends, $iscsi_backends))
|
enabled_backends => keys(merge($rbd_backends, $netapp_backends, $iscsi_backends, $emc_vnx_backends))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Manage Volume types.
|
# Manage Volume types.
|
||||||
|
@@ -61,6 +61,14 @@ describe 'cloud::volume::storage' do
|
|||||||
'iscsi_ip_address' => '10.0.0.1',
|
'iscsi_ip_address' => '10.0.0.1',
|
||||||
'volume_group' => 'fast-vol'
|
'volume_group' => 'fast-vol'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'emc_vnx' => {
|
||||||
|
'very-fast' => {
|
||||||
|
'iscsi_ip_address' => '10.0.0.1',
|
||||||
|
'san_ip' => '10.0.0.2',
|
||||||
|
'san_password' => 'secrete',
|
||||||
|
'storage_vnx_pool_name' => 'emc-volumes',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
:ks_keystone_internal_proto => 'http',
|
:ks_keystone_internal_proto => 'http',
|
||||||
@@ -151,6 +159,21 @@ describe 'cloud::volume::storage' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with EMC VNX backend' do
|
||||||
|
it 'configures EMC VNX volume driver' do
|
||||||
|
should contain_cinder_config('very-fast/volume_backend_name').with_value('very-fast')
|
||||||
|
should contain_cinder_config('very-fast/iscsi_ip_address').with_value('10.0.0.1')
|
||||||
|
should contain_cinder_config('very-fast/san_ip').with_value('10.0.0.2')
|
||||||
|
should contain_cinder_config('very-fast/san_password').with_value('secrete')
|
||||||
|
should contain_cinder_config('very-fast/storage_vnx_pool_name').with_value('emc-volumes')
|
||||||
|
should contain_cinder__type('very-fast').with(
|
||||||
|
:set_key => 'volume_backend_name',
|
||||||
|
:set_value => 'very-fast',
|
||||||
|
:notify => 'Service[cinder-volume]'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with two RBD backends' do
|
context 'with two RBD backends' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
@@ -204,7 +227,7 @@ describe 'cloud::volume::storage' do
|
|||||||
context 'with all backends enabled' do
|
context 'with all backends enabled' do
|
||||||
it 'configure all cinder backends' do
|
it 'configure all cinder backends' do
|
||||||
is_expected.to contain_class('cinder::backends').with(
|
is_expected.to contain_class('cinder::backends').with(
|
||||||
:enabled_backends => ['lowcost', 'premium', 'fast']
|
:enabled_backends => ['lowcost', 'premium', 'fast', 'very-fast']
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user