Install tempest from rpm

In RDO, from ocata release tempest rpm is using upstream tempest
as a source. It would be good to use the same rpm for installing
and configure tempest.

Depends-On: Ia9e48d951e0f37e985e628b7a49401d75c9e4729

Change-Id: Ie6b20063944d3e6307bd332c624572e0cb3f1158
This commit is contained in:
Chandan Kumar 2017-02-03 08:49:15 +00:00
parent 8168496c9e
commit eab6d1fdcb
6 changed files with 13 additions and 47 deletions

View File

@ -988,12 +988,6 @@ Provisioning tempest config
**CONFIG_PROVISION_TEMPEST_FLOATRANGE** **CONFIG_PROVISION_TEMPEST_FLOATRANGE**
CIDR network address for the floating IP subnet. CIDR network address for the floating IP subnet.
**CONFIG_PROVISION_TEMPEST_REPO_URI**
URI of the Integration Test Suite git repository.
**CONFIG_PROVISION_TEMPEST_REPO_REVISION**
Revision (branch) of the Integration Test Suite git repository.
**CONFIG_RUN_TEMPEST** **CONFIG_RUN_TEMPEST**
Specify 'y' to run Tempest smoke test as last step of installation. Specify 'y' to run Tempest smoke test as last step of installation.

View File

@ -56,7 +56,7 @@ def run_tempest(config, messages):
print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST']) print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST'])
server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST']) server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST'])
server.append('pushd /var/lib/tempest') server.append('pushd /var/lib/tempest')
server.append('tox -eall \'(%s)\' -- --concurrency=2 > %s' server.append('tempest run --regex \'(%s)\' --concurrency 2 > %s'
% (config['CONFIG_RUN_TEMPEST_TESTS'].replace(' ', '|'), % (config['CONFIG_RUN_TEMPEST_TESTS'].replace(' ', '|'),
logfile)) logfile))
server.append('popd') server.append('popd')

View File

@ -253,31 +253,6 @@ def initConfig(controller):
"NEED_CONFIRM": False, "NEED_CONFIRM": False,
"CONDITION": False}, "CONDITION": False},
{"CMD_OPTION": "provision-tempest-repo-uri",
"PROMPT": "What is the uri of the Tempest git repository?",
"OPTION_LIST": [],
"VALIDATORS": [validators.validate_not_empty],
"DEFAULT_VALUE": "https://github.com/openstack/tempest.git",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_URI",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "provision-tempest-repo-revision",
"PROMPT": ("What revision, branch, or tag of the Tempest git "
"repository should be used"),
"OPTION_LIST": [],
"VALIDATORS": [validators.validate_not_empty],
"DEFAULT_VALUE": "master",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_REVISION",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "run-tempest", {"CMD_OPTION": "run-tempest",
"PROMPT": ("Do you wish to run tempest?"), "PROMPT": ("Do you wish to run tempest?"),
"OPTION_LIST": ["y", "n"], "OPTION_LIST": ["y", "n"],
@ -367,10 +342,7 @@ def initConfig(controller):
# provision.pp needs them all. So we will initialize them with default # provision.pp needs them all. So we will initialize them with default
# values # values
params = [ params = [
controller.getParamByName(x) controller.getParamByName('CONFIG_PROVISION_OVS_BRIDGE')
for x in ['CONFIG_PROVISION_TEMPEST_REPO_URI',
'CONFIG_PROVISION_TEMPEST_REPO_REVISION',
'CONFIG_PROVISION_OVS_BRIDGE']
] ]
for param in params: for param in params:
value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE) value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE)

View File

@ -49,10 +49,7 @@ class packstack::provision::tempest ()
$public_router_id = undef $public_router_id = undef
# Tempest # Tempest
$tempest_repo_uri = hiera('CONFIG_PROVISION_TEMPEST_REPO_URI') $tempest_workspace = '/var/lib/tempest'
$tempest_repo_revision = hiera('CONFIG_PROVISION_TEMPEST_REPO_REVISION')
$tempest_clone_path = '/var/lib/tempest'
$tempest_clone_owner = 'root'
$tempest_user = hiera('CONFIG_PROVISION_TEMPEST_USER') $tempest_user = hiera('CONFIG_PROVISION_TEMPEST_USER')
$tempest_password = hiera('CONFIG_PROVISION_TEMPEST_USER_PW') $tempest_password = hiera('CONFIG_PROVISION_TEMPEST_USER_PW')
@ -125,10 +122,8 @@ class packstack::provision::tempest ()
resize_available => $resize_available, resize_available => $resize_available,
sahara_available => $sahara_available, sahara_available => $sahara_available,
swift_available => $swift_available, swift_available => $swift_available,
tempest_clone_owner => $tempest_clone_owner, tempest_workspace => $tempest_workspace,
tempest_clone_path => $tempest_clone_path, install_from_source => false,
tempest_repo_revision => $tempest_repo_revision,
tempest_repo_uri => $tempest_repo_uri,
tenant_name => $tenant_name, tenant_name => $tenant_name,
trove_available => $trove_available, trove_available => $trove_available,
username => $username, username => $username,
@ -137,6 +132,6 @@ class packstack::provision::tempest ()
tempest_config { 'object-storage/operator_role': tempest_config { 'object-storage/operator_role':
value => 'SwiftOperator', value => 'SwiftOperator',
path => "${tempest_clone_path}/etc/tempest.conf", path => "${tempest_workspace}/etc/tempest.conf",
} }
} }

View File

@ -0,0 +1,5 @@
---
features:
- Install tempest from rpm.
deprecations:
- CONFIG_PROVISION_TEMPEST_REPO_URI and CONFIG_PROVISION_TEMPEST_REPO_REVISION options are removed.

View File

@ -252,8 +252,8 @@ result=$?
# Print output and generate subunit if results exist # Print output and generate subunit if results exist
if [ -d /var/lib/tempest ]; then if [ -d /var/lib/tempest ]; then
pushd /var/lib/tempest pushd /var/lib/tempest
$SUDO .tox/tempest/bin/testr last || true $SUDO /usr/bin/testr last || true
$SUDO bash -c ".tox/tempest/bin/testr last --subunit > /var/tmp/packstack/latest/testrepository.subunit" || true $SUDO bash -c "/usr/bin/testr last --subunit > /var/tmp/packstack/latest/testrepository.subunit" || true
popd popd
fi fi