Tempest is the integration test suite used to validate any deployed OpenStack cloud.
TripleO undercloud is the all-in-one OpenStack installation that includes components for provisioning and managing the OpenStack nodes that form your OpenStack environment (the overcloud).
For validating undercloud using Tempest, Follow the below steps:
-
Using tripleo-quickstart:
- Follow this link to provision a libvirt guest environment through tripleo-quickstart
-
Deploy the undercloud and run Tempest tests on undercloud against undercloud
$ bash quickstart.sh -R master --no-clone --tags all \
--nodes config/nodes/1ctlr_1comp.yml \
-I --teardown none -p quickstart-extras-undercloud.yml \
--extra-vars test_ping=False \
--extra-vars tempest_undercloud=True \
--extra-vars tempest_overcloud=False \
--extra-vars run_tempest=True \
--extra-vars test_white_regex='tempest.api.identity|tempest.api.compute' \
$VIRTHOSTThe above command will:
- Deploy an undercloud
- Generate tempest_setup.sh script in /home/stack folder
- Run test_white_regex tempest tests
- Store all the results in /home/stack/tempest folder.
-
Running Tempest tests manually on undercloud:
- Deploy the undercloud manually by following this link and then ssh into undercloud.
-
Install openstack-tempest rpm on undercloud
$ sudo yum -y install openstack-tempest
-
Source stackrc on undercloud
$ source stackrc
-
Append Identity API version in $OS_AUTH_URL
$OS_AUTH_URL defined in stackrc does not contain the Identity API version, what will lead to a failure while generating tempest.conf using python-tempestconf. In order to fix the above issue, we need to append the API version to the OS_AUTH_URL environment variable and export it.
$ export OS_AUTH_URL="$OS_AUTH_URL/v$OS_IDENTITY_API_VERSION"
-
Create the Tempest workspace
$ tempest init <tempest_workspace>
-
Generate Tempest configuration using python-tempestconf
$ cd <path to the tempest_workspace>
$ discover-tempest-config --create --out etc/tempest.conf
The above command will generate tempest.conf in /etc/ directory.
-
Now we are all set to run Tempest tests. Run the following command to run Tempest tests
$ tempest run -r '(tempest.api.identity|tempest.api.compute)' --subunit
The above command will:
- Run tempest.api.identity and tempest.api.compute tests
- All the Tempest test subunit results in v2 format will be stored in .stestr directory under Tempest workspace.
-
Use subunit2html command to generate results in html format
$ sudo yum -y install python-subunit
$ subunit2html <path to tempest workspace>/.stestr/0 tempest.html
And we are done with running Tempest on undercloud.
Currently tripleo-ci-centos-7-undercloud-oooq job is running Tempest tests on undercloud in TripleO CI using featureset003
Thanks to Emilien, Enrique, Wes, Arx, Martin, Luigi, Alex, Sagi, Gabriel and RDO team for helping me in getting things in place.
Happy Hacking!