Merge "Add the new openstack::cinder class."

This commit is contained in:
Jenkins
2013-05-03 17:12:27 +00:00
committed by Gerrit Code Review
3 changed files with 112 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ class openstack::cinder(
$enabled = true $enabled = true
) { ) {
warning('The "openstack::cinder" class is deprecated. Use "openstack::cinder::controller and openstack::cinder::volume" instead.')
class { 'cinder::base': class { 'cinder::base':
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
rabbit_host => $rabbit_host, rabbit_host => $rabbit_host,

View File

@@ -0,0 +1,62 @@
class openstack::cinder::controller(
$cinder_sql_connection,
$rabbit_password,
$cinder_rpc_backend = 'cinder.openstack.common.rpc.impl_kombu',
$keystone_tenant = 'services',
$keystone_enabled = true,
$keystone_user = 'cinder',
$keystone_password = 'cinder',
$keystone_auth_host = 'localhost',
$keystone_auth_port = '35357',
$keystone_auth_protocol = 'http',
$keystone_service_port = '5000',
$rabbit_userid = 'guest',
$rabbit_host = '127.0.0.1',
$rabbit_hosts = undef,
$rabbit_port = '5672',
$cinder_rabbit_virtual_host = '/',
$cinder_package_ensure = 'present',
$cinder_api_package_ensure = 'latest',
$cinder_scheduler_package_ensure = 'latest',
$cinder_bind_host = '0.0.0.0',
$cinder_api_paste_config = '/etc/cinder/api-paste.ini',
$scheduler_driver = 'cinder.scheduler.simple.SimpleScheduler',
$cinder_api_enabled = true,
$cinder_scheduler_enabled = true,
$cinder_verbose = 'False'
) {
class {'::cinder':
sql_connection => $cinder_sql_connection,
rpc_backend => $cinder_rpc_backend,
rabbit_userid => $rabbit_userid,
rabbit_password => $rabbit_password,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $cinder_rabbit_virtual_host,
package_ensure => $cinder_package_ensure,
api_paste_config => $cinder_api_paste_config,
verbose => $cinder_verbose,
}
class {'::cinder::api':
keystone_password => $keystone_password,
keystone_enabled => $keystone_enabled,
keystone_user => $keystone_user,
keystone_auth_host => $keystone_auth_host,
keystone_auth_port => $keystone_auth_port,
keystone_auth_protocol => $keystone_auth_protocol,
service_port => $keystone_service_port,
package_ensure => $cinder_api_package_ensure,
bind_host => $cinder_bind_host,
enabled => $cinder_api_enabled,
}
class {'::cinder::scheduler':
scheduler_driver => $scheduler_driver,
package_ensure => $cinder_scheduler_package_ensure,
enabled => $cinder_scheduler_enabled,
}
}

View File

@@ -0,0 +1,48 @@
class openstack::cinder::storage(
$sql_connection,
$rabbit_password,
$rabbit_userid = 'guest',
$rabbit_host = '127.0.0.1',
$rabbit_hosts = undef,
$rabbit_port = '5672',
$rabbit_virtual_host = '/',
$cinder_package_ensure = 'present',
$api_paste_config = '/etc/cinder/api-paste.ini',
$cinder_package_ensure = 'latest',
$cinder_volume_package_ensure = 'latest',
$volume_group = 'cinder-volumes',
$cinder_volume_enabled = true,
$iscsi_enabled = true,
$iscsi_ip_address = '127.0.0.1',
$setup_test_volume = true,
$cinder_verbose = 'False',
) {
class {'::cinder':
sql_connection => $cinder_sql_connection,
rabbit_userid => $rabbit_userid,
rabbit_password => $rabbit_password,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host,
package_ensure => $cinder_package_ensure,
api_paste_config => $cinder_api_paste_config,
verbose => $cinder_verbose,
}
class { '::cinder::volume':
package_ensure => $cinder_volume_package_ensure,
enabled => $cinder_volume_enabled,
}
if $iscsi_enabled {
class { '::cinder::volume::iscsi':
iscsi_ip_address => $iscsi_ip_address,
volume_group => $volume_group,
}
}
if $setup_test_volume {
class {'::cinder::setup_test_volume':}
}
}