Merge "Add keystone to swift-proxy, use dispersion-report"

This commit is contained in:
Jenkins
2016-05-25 02:14:47 +00:00
committed by Gerrit Code Review
3 changed files with 19 additions and 12 deletions

View File

@@ -108,8 +108,8 @@ class swift::dispersion (
path => ['/bin', '/usr/bin'], path => ['/bin', '/usr/bin'],
subscribe => File['/etc/swift/dispersion.conf'], subscribe => File['/etc/swift/dispersion.conf'],
timeout => 0, timeout => 0,
onlyif => "swift -A ${auth_url} -U ${auth_tenant}:${auth_user} -K ${auth_pass} -V ${auth_version} stat | grep 'Account: '", onlyif => "swift -A ${auth_url} --os-username ${auth_user} --os-project-name ${auth_tenant} --os-password ${auth_pass} -V ${auth_version} stat | grep 'Account: '",
unless => "swift -A ${auth_url} -U ${auth_tenant}:${auth_user} -K ${auth_pass} -V ${auth_version} list | grep dispersion_", unless => "swift -A ${auth_url} --os-username ${auth_user} --os-project-name ${auth_tenant} --os-password ${auth_pass} -V ${auth_version} list | grep dispersion_",
require => Package['swiftclient'], require => Package['swiftclient'],
} }

View File

@@ -33,6 +33,7 @@ describe 'basic swift' do
} }
# create xfs partitions on a loopback device and mounts them # create xfs partitions on a loopback device and mounts them
swift::storage::loopback { '2': swift::storage::loopback { '2':
seek => '200000',
require => Class['swift'], require => Class['swift'],
} }
# sets up storage nodes which is composed of a single # sets up storage nodes which is composed of a single
@@ -53,19 +54,20 @@ describe 'basic swift' do
} }
class { '::swift::proxy': class { '::swift::proxy':
proxy_local_net_ip => '127.0.0.1', proxy_local_net_ip => '127.0.0.1',
pipeline => ['healthcheck', 'cache', 'tempauth', 'dlo', 'proxy-server'], pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'],
account_autocreate => true, account_autocreate => true,
require => Class['swift::ringbuilder'], require => Class['swift::ringbuilder'],
} }
class { '::swift::proxy::authtoken': class { '::swift::proxy::authtoken':
admin_password => 'a_big_secret', admin_password => 'a_big_secret',
} }
class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': }
class {'::swift::objectexpirer': class {'::swift::objectexpirer':
interval => 600, interval => 600,
} }
class { class {
[ '::swift::proxy::healthcheck', '::swift::proxy::cache', [ '::swift::proxy::healthcheck', '::swift::proxy::proxy_logging', '::swift::proxy::cache',
'::swift::proxy::tempauth', '::swift::proxy::dlo' ]: '::swift::proxy::keystone', '::swift::proxy::dlo' ]:
} }
EOS EOS
@@ -114,6 +116,7 @@ describe 'basic swift' do
} }
# create xfs partitions on a loopback device and mounts them # create xfs partitions on a loopback device and mounts them
swift::storage::loopback { '2': swift::storage::loopback { '2':
seek => '200000',
require => Class['swift'], require => Class['swift'],
} }
# sets up storage nodes which is composed of a single # sets up storage nodes which is composed of a single
@@ -127,13 +130,13 @@ describe 'basic swift' do
require => Swift::Storage::Loopback[2] , require => Swift::Storage::Loopback[2] ,
} }
class { '::swift::storage::account': class { '::swift::storage::account':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::container': class { '::swift::storage::container':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::storage::object': class { '::swift::storage::object':
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { '::swift::ringbuilder': class { '::swift::ringbuilder':
part_power => '18', part_power => '18',
@@ -143,7 +146,7 @@ describe 'basic swift' do
} }
class { '::swift::proxy': class { '::swift::proxy':
proxy_local_net_ip => '127.0.0.1', proxy_local_net_ip => '127.0.0.1',
pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'], pipeline => ['healthcheck', 'proxy-logging', 'cache', 'authtoken', 'keystone', 'dlo', 'proxy-server'],
account_autocreate => true, account_autocreate => true,
require => Class['swift::ringbuilder'], require => Class['swift::ringbuilder'],
service_provider => 'swiftinit', service_provider => 'swiftinit',
@@ -151,11 +154,15 @@ describe 'basic swift' do
class { '::swift::proxy::authtoken': class { '::swift::proxy::authtoken':
admin_password => 'a_big_secret', admin_password => 'a_big_secret',
} }
class { '::swift::keystone::dispersion': } -> class { '::swift::dispersion': }
class {'::swift::objectexpirer': class {'::swift::objectexpirer':
interval => 600, interval => 600,
service_provider => 'swiftinit', service_provider => 'swiftinit',
} }
class { ['::swift::proxy::healthcheck', '::swift::proxy::cache', '::swift::proxy::tempauth']: } class {
[ '::swift::proxy::healthcheck', '::swift::proxy::proxy_logging', '::swift::proxy::cache',
'::swift::proxy::keystone', '::swift::proxy::dlo' ]:
}
EOS EOS
# Run one time to catch any errors upgrading to swiftinit service provider # Run one time to catch any errors upgrading to swiftinit service provider

View File

@@ -65,8 +65,8 @@ describe 'swift::dispersion' do
is_expected.to contain_exec('swift-dispersion-populate').with( is_expected.to contain_exec('swift-dispersion-populate').with(
:path => ['/bin', '/usr/bin'], :path => ['/bin', '/usr/bin'],
:subscribe => 'File[/etc/swift/dispersion.conf]', :subscribe => 'File[/etc/swift/dispersion.conf]',
:onlyif => "swift -A #{p[:auth_url]} -U #{p[:auth_tenant]}:#{p[:auth_user]} -K #{p[:auth_pass]} -V #{p[:auth_version]} stat | grep 'Account: '", :onlyif => "swift -A #{p[:auth_url]} --os-username #{p[:auth_user]} --os-project-name #{p[:auth_tenant]} --os-password #{p[:auth_pass]} -V #{p[:auth_version]} stat | grep 'Account: '",
:unless => "swift -A #{p[:auth_url]} -U #{p[:auth_tenant]}:#{p[:auth_user]} -K #{p[:auth_pass]} -V #{p[:auth_version]} list | grep dispersion_", :unless => "swift -A #{p[:auth_url]} --os-username #{p[:auth_user]} --os-project-name #{p[:auth_tenant]} --os-password #{p[:auth_pass]} -V #{p[:auth_version]} list | grep dispersion_",
:require => 'Package[swiftclient]' :require => 'Package[swiftclient]'
) )
end end