Skip to content

Commit b5bd465

Browse files
authored
Merge pull request #28 from stackhpc/rally-tempest
Add section on running Rally and Tempest
2 parents 1fa0781 + 26e8424 commit b5bd465

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Contents
2626
operations_and_monitoring
2727
customising_deployment
2828
gpus_in_openstack
29+
rally_and_tempest
2930

3031
Indices and search
3132
==================

source/rally_and_tempest.rst

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
.. include:: vars.rst
2+
3+
==========================================
4+
Verifying the Cloud with Rally and Tempest
5+
==========================================
6+
7+
`Rally <https://docs.openstack.org/rally/latest/>`_ is a test framework,
8+
and `Tempest <https://docs.openstack.org/tempest/latest/>`_ is the
9+
OpenStack API test suite. In this guide, Rally is used to run Tempest tests.
10+
11+
Requirements
12+
------------
13+
14+
OpenStack tests are run from a host with access to the OpenStack APIs
15+
and external network for instances.
16+
17+
The following software environment is needed:
18+
19+
* OpenStack admin credentials, eg public-openrc.sh from kayobe-config/etc/kolla
20+
* A virtualenv setup with python-openstackclient installed
21+
22+
.. code-block:: shell
23+
:substitutions:
24+
25+
source venv/bin/activate
26+
pip install python-openstackclient
27+
source |base_path|/src/|kayobe_config|/etc/kolla/public-openrc.sh
28+
29+
Setup Rally for a new user
30+
--------------------------
31+
32+
A good directory hierarchy would be `~/rally/shakespeare/tempest-recipes`.
33+
This is assumed in this guide.
34+
35+
Install Rally into the virtualenv:
36+
37+
.. code-block:: shell
38+
39+
pip install rally-openstack \
40+
--constraint https://releases.openstack.org/constraints/upper/master
41+
42+
Create the Rally test database and configuration file. For this you will
43+
need the virtualenv and public-openrc as described above:
44+
45+
.. code-block:: shell
46+
47+
mkdir -p ~/.rally ~/rally/data
48+
echo "[database]" | tee ~/.rally/rally.conf
49+
echo "connection=sqlite:///${HOME}/rally/data/rally.db" | tee -a ~/.rally/rally.conf
50+
rally db recreate
51+
rally verify create-verifier --name default --type tempest
52+
rally deployment create --fromenv --name production
53+
54+
Check:
55+
56+
.. code-block:: shell
57+
58+
rally deployment show
59+
60+
Install Shakespeare
61+
-------------------
62+
63+
Shakespeare is used for writing Tempest test configuration.
64+
65+
.. code-block:: shell
66+
67+
cd ~/rally
68+
git clone https://github.com/stackhpc/shakespeare.git
69+
cd shakespeare
70+
pip install -r requirements.txt
71+
72+
Install Tempest Recipe
73+
----------------------
74+
75+
A custom set of Tempest recipes should be maintained for |project_name|,
76+
defining key parameters needed and fine-grained control on the test cases
77+
to run (and which to skip).
78+
79+
In your `shakespeare` directory,
80+
install the Tempest recipes in your Tempest configuration.
81+
82+
.. code-block:: shell
83+
:substitutions:
84+
85+
git clone |tempest_recipes|
86+
ansible-playbook template.yml -e @tempest-recipes/production.yml
87+
mkdir -p ../config/production
88+
rally verify configure-verifier --reconfigure --extend ../config/production/production.conf
89+
90+
Rally invocation
91+
----------------
92+
93+
Invoke the tests (this will take several hours to complete):
94+
95+
.. code-block:: shell
96+
97+
rally --debug verify start --concurrency 1 --skip-list tempest-recipes/production-skiplist.yml
98+
99+
Report generation
100+
-----------------
101+
102+
Generate an HTML report of the results:
103+
104+
.. code-block:: shell
105+
106+
rally verify report --type html --to ~/rally/report-$(date -d "today" +"%Y%m%d%H%M").html

source/vars.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
.. |seed_user| replace:: stack
4545
.. |support_email| replace:: [email protected]
4646
.. |support_level| replace:: standard support
47+
.. |tempest_recipes| replace:: https://github.com/acme-openstack/tempest-recipes.git
4748
.. |tls_setup| replace:: TLS is implemented using a wildcard certificate available for ``*.acme.example``.
4849
.. |vault_password_file_path| replace:: ~/vault-password

0 commit comments

Comments
 (0)