Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 1 | :: |
| 2 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 3 | Tempest - The OpenStack Integration Test Suite |
| 4 | ============================================== |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 5 | |
Soren Hansen | 5d40bdb | 2011-08-26 16:06:37 +0200 | [diff] [blame] | 6 | This is a set of integration tests to be run against a live cluster. |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 7 | |
| 8 | Quickstart |
| 9 | ---------- |
| 10 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 11 | To run Tempest, you first need to create a configuration file that |
| 12 | will tell Tempest where to find the various OpenStack services and |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 13 | other testing behavior switches. |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 14 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 15 | The easiest way to create a configuration file is to copy the sample |
| 16 | one in the ``etc/`` directory :: |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 17 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 18 | $> cd $TEMPEST_ROOT_DIR |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 19 | $> cp etc/tempest.conf.sample etc/tempest.conf |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 20 | |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 21 | After that, open up the ``etc/tempest.conf`` file and edit the |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 22 | configuration variables to match valid data in your environment. |
| 23 | This includes your Keystone endpoint, a valid user and credentials, |
| 24 | and reference data to be used in testing. |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 25 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 26 | .. note:: |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 27 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 28 | If you have a running devstack environment, look at the |
| 29 | environment variables in your ``devstack/localrc`` file. |
| 30 | The ADMIN_PASSWORD variable should match the api_key value |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 31 | in the tempest.conf [nova] configuration section. In addition, |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 32 | you will need to get the UUID identifier of the image that |
| 33 | devstack uploaded and set the image_ref value in the [environment] |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 34 | section in the tempest.conf to that image UUID. |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 35 | |
Armando Migliaccio | dc7d017 | 2012-04-23 16:51:27 +0100 | [diff] [blame] | 36 | In addition, the ``<devstack-repo>/tools/configure_tempest.sh`` script can |
| 37 | also be used to generate a tempest.conf based on your devstack's rc files. |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 38 | |
| 39 | Tempest is not tied to any single test runner, but Nose been the most commonly |
| 40 | used tool. After setting up your configuration file, you can execute |
| 41 | the set of Tempest tests by using ``nosetests`` :: |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 42 | |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 43 | $> nosetests tempest |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 44 | |
| 45 | Configuration |
| 46 | ------------- |
| 47 | |
| 48 | At present, there are three sections to be configured: nova, environment, |
| 49 | and image. The nova section includes information about your Keystone endpoint, |
| 50 | as well as valid credentials for a user. It also contains logical timeouts |
| 51 | for certain actions. The environment section contains reference data to be |
| 52 | used when testing the Compute portion of OpenStack, as well as feature flags |
| 53 | for tests that may or may not work based on your hypervisor or current |
| 54 | environment. Lastly, the image section contains credentials and endpoints for |
| 55 | the Glance image service. |
| 56 | |
| 57 | Common Issues |
| 58 | ------------- |
| 59 | |
| 60 | Tempest was originally designed to primarily run against a full OpenStack |
| 61 | deployment. Due to that focus, some issues may occur when running Tempest |
| 62 | against devstack. |
| 63 | |
| 64 | Running Tempest, especially in parallel, against a devstack instance may |
| 65 | cause requests to be rate limited, which will cause unexpected failures. |
| 66 | Given the number of requests Tempest can make against a cluster, rate limiting |
| 67 | should be disabled for all test accounts. |
| 68 | |
| 69 | Additionally, devstack only provides a single image which Nova can use. |
| 70 | For the moment, the best solution is to provide the same image uuid for |
| 71 | both image_ref and image_ref_alt. Tempest will skip tests as needed if it |
| 72 | detects that both images are the same. |