Merge pull request #207 from enovance/bug/178/emilien
Ability to disable Swift when deploying puppet-cloud
This commit is contained in:
@@ -324,6 +324,7 @@
|
|||||||
# Defaults value in params
|
# Defaults value in params
|
||||||
#
|
#
|
||||||
class cloud::identity (
|
class cloud::identity (
|
||||||
|
$swift_enabled = $os_params::swift,
|
||||||
$identity_roles_addons = $os_params::identity_roles_addons,
|
$identity_roles_addons = $os_params::identity_roles_addons,
|
||||||
$keystone_db_host = $os_params::keystone_db_host,
|
$keystone_db_host = $os_params::keystone_db_host,
|
||||||
$keystone_db_user = $os_params::keystone_db_user,
|
$keystone_db_user = $os_params::keystone_db_user,
|
||||||
@@ -454,19 +455,21 @@ class cloud::identity (
|
|||||||
# ssl => false
|
# ssl => false
|
||||||
# }
|
# }
|
||||||
|
|
||||||
class {'swift::keystone::auth':
|
if $swift_enabled {
|
||||||
address => $ks_swift_internal_host,
|
class {'swift::keystone::auth':
|
||||||
password => $ks_swift_password,
|
address => $ks_swift_internal_host,
|
||||||
public_address => $ks_swift_public_host,
|
password => $ks_swift_password,
|
||||||
public_port => $ks_swift_public_port,
|
public_address => $ks_swift_public_host,
|
||||||
public_protocol => $ks_swift_public_proto,
|
public_port => $ks_swift_public_port,
|
||||||
admin_address => $ks_swift_admin_host,
|
public_protocol => $ks_swift_public_proto,
|
||||||
internal_address => $ks_swift_internal_host,
|
admin_address => $ks_swift_admin_host,
|
||||||
region => $region
|
internal_address => $ks_swift_internal_host,
|
||||||
}
|
region => $region
|
||||||
|
}
|
||||||
|
|
||||||
class {'swift::keystone::dispersion':
|
class {'swift::keystone::dispersion':
|
||||||
auth_pass => $ks_swift_dispersion_password
|
auth_pass => $ks_swift_dispersion_password
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class {'ceilometer::keystone::auth':
|
class {'ceilometer::keystone::auth':
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
# HAproxy nodes
|
# HAproxy nodes
|
||||||
#
|
#
|
||||||
class cloud::loadbalancer(
|
class cloud::loadbalancer(
|
||||||
|
$swift_api = $os_params::swift,
|
||||||
$ceilometer_api = true,
|
$ceilometer_api = true,
|
||||||
$cinder_api = true,
|
$cinder_api = true,
|
||||||
$glance_api = true,
|
$glance_api = true,
|
||||||
@@ -27,7 +28,6 @@ class cloud::loadbalancer(
|
|||||||
$nova_api = true,
|
$nova_api = true,
|
||||||
$ec2_api = true,
|
$ec2_api = true,
|
||||||
$metadata_api = true,
|
$metadata_api = true,
|
||||||
$swift_api = true,
|
|
||||||
$keystone_api_admin = true,
|
$keystone_api_admin = true,
|
||||||
$keystone_api = true,
|
$keystone_api = true,
|
||||||
$horizon = true,
|
$horizon = true,
|
||||||
|
@@ -24,6 +24,7 @@ describe 'cloud::identity' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :identity_roles_addons => ['SwiftOperator', 'ResellerAdmin'],
|
{ :identity_roles_addons => ['SwiftOperator', 'ResellerAdmin'],
|
||||||
|
:swift_enabled => true,
|
||||||
:keystone_db_host => '10.0.0.1',
|
:keystone_db_host => '10.0.0.1',
|
||||||
:keystone_db_user => 'keystone',
|
:keystone_db_user => 'keystone',
|
||||||
:keystone_db_password => 'secrete',
|
:keystone_db_password => 'secrete',
|
||||||
@@ -253,6 +254,16 @@ describe 'cloud::identity' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'without Swift' do
|
||||||
|
before :each do
|
||||||
|
params.merge!(:swift_enabled => false)
|
||||||
|
end
|
||||||
|
it 'should not configure swift endpoints and users' do
|
||||||
|
should_not contain_class('swift::keystone::auth')
|
||||||
|
should_not contain_class('swift::keystone::dispersion')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
|
Reference in New Issue
Block a user