Add instack-tempest-test-overcloud
...and run it optionally from instack-deploy-overcloud. Co-Authored-By: Imre Farkas <ifarkas@redhat.com> Change-Id: I5975345d6aa3f3e9fc92f62cd1cc908f2d21679b
This commit is contained in:
parent
9bf651c17d
commit
f003d0065f
|
@ -225,6 +225,20 @@ Deploy the overcloud (default of 1 compute and 1 control):
|
||||||
|
|
||||||
instack-deploy-overcloud --tuskar
|
instack-deploy-overcloud --tuskar
|
||||||
|
|
||||||
|
.. admonition:: Deployment with post-install validation
|
||||||
|
:class: tempest
|
||||||
|
|
||||||
|
To deploy the overcloud **and** verify it by running Tempest::
|
||||||
|
|
||||||
|
instack-deploy-overcloud --tuskar --tempest
|
||||||
|
|
||||||
|
.. note:: The full Tempest test suite might take hours to run on a single CPU.
|
||||||
|
|
||||||
|
To run only a part of the Tempest test suite (eg. tests with ``gate`` tag)::
|
||||||
|
|
||||||
|
export TEMPEST_ARGS="gate"
|
||||||
|
instack-deploy-overcloud --tuskar --tempest
|
||||||
|
|
||||||
|
|
||||||
Post-Deployment
|
Post-Deployment
|
||||||
---------------
|
---------------
|
||||||
|
|
|
@ -360,3 +360,5 @@ class { 'tuskar::ui':
|
||||||
# tempest
|
# tempest
|
||||||
# TODO: when puppet-tempest supports install by package, do that instead
|
# TODO: when puppet-tempest supports install by package, do that instead
|
||||||
package{'openstack-tempest': }
|
package{'openstack-tempest': }
|
||||||
|
# needed for /bin/subunit-2to1 (called by run_tempest.sh)
|
||||||
|
package{'subunit-filters': }
|
||||||
|
|
|
@ -12,6 +12,7 @@ if [ -z "$OS_AUTH_URL" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TUSKAR=
|
TUSKAR=
|
||||||
|
TEMPEST=
|
||||||
|
|
||||||
# Default stack create timeout, in minutes
|
# Default stack create timeout, in minutes
|
||||||
# Note heat defaults to 60mins, which may not be enough when
|
# Note heat defaults to 60mins, which may not be enough when
|
||||||
|
@ -27,11 +28,12 @@ function show_options () {
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --tuskar -- will use tuskar for building the heat Template"
|
echo " --tuskar -- will use tuskar for building the heat Template"
|
||||||
echo " --timeout -- create timeout in minutes, default $TIMEOUT"
|
echo " --timeout -- create timeout in minutes, default $TIMEOUT"
|
||||||
|
echo " --tempest -- run tempest tests after deployment"
|
||||||
echo
|
echo
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
TEMP=$(getopt -o ,h -l,tuskar,timeout:,help -n $SCRIPT_NAME -- "$@")
|
TEMP=$(getopt -o ,h -l,tuskar,timeout:,tempest,help -n $SCRIPT_NAME -- "$@")
|
||||||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||||
|
|
||||||
# Note the quotes around `$TEMP': they are essential!
|
# Note the quotes around `$TEMP': they are essential!
|
||||||
|
@ -41,6 +43,7 @@ while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--tuskar) TUSKAR="1"; shift 1;;
|
--tuskar) TUSKAR="1"; shift 1;;
|
||||||
--timeout) TIMEOUT="$2"; shift 2;;
|
--timeout) TIMEOUT="$2"; shift 2;;
|
||||||
|
--tempest) TEMPEST="1"; shift 1;;
|
||||||
-h | --help) show_options 0;;
|
-h | --help) show_options 0;;
|
||||||
--) shift ; break ;;
|
--) shift ; break ;;
|
||||||
*) echo "Error: unsupported option $1." ; exit 1 ;;
|
*) echo "Error: unsupported option $1." ; exit 1 ;;
|
||||||
|
@ -517,3 +520,8 @@ rm $NETWORK_JSON
|
||||||
nova flavor-create m1.demo auto 512 10 1
|
nova flavor-create m1.demo auto 512 10 1
|
||||||
|
|
||||||
echo "Overcloud Deployed"
|
echo "Overcloud Deployed"
|
||||||
|
|
||||||
|
if [ -n "$TEMPEST" ]; then
|
||||||
|
TEMPEST_ARGS=${TEMPEST_ARGS:-} $(dirname $0)/instack-tempest-test-overcloud
|
||||||
|
$(dirname $0)/instack-test-overcloud
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
source ~/overcloudrc
|
||||||
|
|
||||||
|
TEMPEST_ARGS=${TEMPEST_ARGS:-}
|
||||||
|
# e.g. TEMPEST_ARGS='tempest.api.compute.flavors tempest.api.network.admin'
|
||||||
|
|
||||||
|
mkdir -p ~/tempest
|
||||||
|
cd ~/tempest
|
||||||
|
/usr/share/openstack-tempest-kilo/tools/configure-tempest-directory
|
||||||
|
|
||||||
|
./tools/config_tempest.py --out etc/tempest.conf --debug --create \
|
||||||
|
identity.uri $OS_AUTH_URL \
|
||||||
|
compute.allow_tenant_isolation true \
|
||||||
|
object-storage.operator_role SwiftOperator \
|
||||||
|
identity.admin_password $OS_PASSWORD \
|
||||||
|
compute.build_timeout 500 \
|
||||||
|
compute.image_ssh_user cirros \
|
||||||
|
compute.ssh_user cirros \
|
||||||
|
network.build_timeout 500 \
|
||||||
|
volume.build_timeout 500 \
|
||||||
|
scenario.ssh_user cirros
|
||||||
|
|
||||||
|
FULL_TEMPEST_ARGS="--no-virtual-env"
|
||||||
|
if [ -n "$TEMPEST_ARGS" ]; then
|
||||||
|
FULL_TEMPEST_ARGS="$FULL_TEMPEST_ARGS -- $TEMPEST_ARGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
./run_tempest.sh $FULL_TEMPEST_ARGS 2>&1 | tee ~/tempest/tempest-run.log
|
|
@ -27,6 +27,7 @@ scripts =
|
||||||
scripts/instack-install-undercloud
|
scripts/instack-install-undercloud
|
||||||
scripts/instack-ironic-deployment
|
scripts/instack-ironic-deployment
|
||||||
scripts/instack-prepare-for-overcloud
|
scripts/instack-prepare-for-overcloud
|
||||||
|
scripts/instack-tempest-test-overcloud
|
||||||
scripts/instack-test-overcloud
|
scripts/instack-test-overcloud
|
||||||
scripts/instack-virt-setup
|
scripts/instack-virt-setup
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue