scenario001: enable object service

* Install and configure Swift
* Enable Swift tests in Tempest

Change-Id: If62c238babfb798226102388911178a5acbd127b
This commit is contained in:
Emilien Macchi 2015-09-28 09:07:32 -04:00
parent eb711ffff7
commit 30efa3463c
2 changed files with 66 additions and 1 deletions

View File

@ -402,6 +402,70 @@ class { '::heat::api_cfn':
workers => '2',
}
# Deploy Swift
include ::memcached
class { '::swift':
swift_hash_suffix => 'secrete',
}
class { '::swift::proxy':
proxy_local_net_ip => '127.0.0.1',
workers => '4',
pipeline => [
'catch_errors', 'healthcheck', 'cache', 'tempurl', 'ratelimit',
'authtoken', 'keystone', 'formpost', 'staticweb', 'container_quotas',
'account_quotas', 'proxy-logging', 'proxy-server'
],
}
include ::swift::proxy::catch_errors
include ::swift::proxy::healthcheck
include ::swift::proxy::proxy_logging
include ::swift::proxy::cache
include ::swift::proxy::tempurl
include ::swift::proxy::ratelimit
class { '::swift::proxy::authtoken':
auth_uri => 'http://127.0.0.1:5000/v2.0',
identity_uri => 'http://127.0.0.1:35357/',
admin_password => 'a_big_secret',
}
class { '::swift::proxy::keystone':
operator_roles => ['Member', 'admin', 'SwiftOperator']
}
include ::swift::proxy::formpost
include ::swift::proxy::staticweb
include ::swift::proxy::container_quotas
include ::swift::proxy::account_quotas
include ::swift::proxy::tempauth
class { '::swift::keystone::auth':
password => 'a_big_secret',
}
file { '/srv/node':
ensure => directory,
owner => 'swift',
group => 'swift',
require => Package['swift'],
}
include ::swift::ringbuilder
class { '::swift::storage::all':
storage_local_net_ip => '127.0.0.1',
incoming_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
outgoing_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
}
$swift_components = ['account', 'container', 'object']
swift::storage::filter::recon { $swift_components : }
swift::storage::filter::healthcheck { $swift_components : }
ring_object_device { '127.0.0.1:6000/1':
zone => 1,
weight => 1,
}
ring_container_device { '127.0.0.1:6001/1':
zone => 1,
weight => 1,
}
ring_account_device { '127.0.0.1:6002/1':
zone => 1,
weight => 1,
}
# Configure Tempest and the resources
$os_auth_options = '--os-username admin --os-password a_big_secret --os-tenant-name openstack --os-auth-url http://127.0.0.1:5000/v2.0'
@ -500,6 +564,7 @@ class { '::tempest':
ceilometer_available => true,
sahara_available => true,
heat_available => true,
swift_available => true,
public_network_name => 'public',
flavor_ref => '42',
flavor_ref_alt => '84',

View File

@ -84,5 +84,5 @@ fi
# TODO(emilien) later, we should use local image if present. That would be a next iteration.
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp/openstack/tempest
# run a scenario that validates Keystone, Nova, Glance, Neutron, Ceilometer, Cinder, Sahara and Heat
# run a scenario that validates Keystone, Nova, Glance, Neutron, Ceilometer, Cinder, Sahara, Swift and Heat
cd /tmp/openstack/tempest; tox -eall -- --concurrency=2 smoke