Red Hat Openstack Platform 13: Openstack Integration Test Suite Guide
Red Hat Openstack Platform 13: Openstack Integration Test Suite Guide
OpenStack Team
[email protected]
Legal Notice
Copyright © 2018 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity
logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other
countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to
or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other countries
and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or
sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
This guide provides instructions to install, configure and manage the OpenStack Integration Test
Suite in a Red Hat OpenStack Platform environment.
Table of Contents
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3. . . . . . . . . .
PREFACE
. . . . . . . . . .1.. .INTRODUCTION
CHAPTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . .
. . . . . . . . . .2.. .OPENSTACK
CHAPTER . . . . . . . . . . . .INTEGRATION
. . . . . . . . . . . . .TEST
. . . . .SUITE
. . . . . TESTS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5. . . . . . . . . .
2.1. SCENARIO TESTS 5
2.2. API TESTS 5
.CHAPTER
. . . . . . . . .3.. .INSTALLING
. . . . . . . . . . . THE
. . . . OPENSTACK
. . . . . . . . . . . .INTEGRATION
. . . . . . . . . . . . .TEST
. . . . . SUITE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6. . . . . . . . . .
3.1. USING THE DIRECTOR 6
3.2. PREPARING A MANUAL INSTALLATION 6
3.3. INSTALLING THE OPENSTACK INTEGRATION TEST SUITE PACKAGES 7
3.3.1. List of Tempest Plug-in Packages 7
.CHAPTER
. . . . . . . . .4.. .CONFIGURING
. . . . . . . . . . . . . THE
. . . . OPENSTACK
. . . . . . . . . . . .INTEGRATION
. . . . . . . . . . . . .TEST
. . . . . SUITE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9. . . . . . . . . .
4.1. CREATING A WORKSPACE 9
4.2. VERIFYING YOUR TEMPEST CONFIGURATION 9
4.3. CHANGING THE LOGGING CONFIGURATION 9
4.4. CONFIGURING MICROVERSION TESTS 10
.CHAPTER
. . . . . . . . .5.. .USING
. . . . . .OSTESTR
. . . . . . . . .TO
. . .RUN
. . . . TEMPEST
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
...........
5.1. RUNNING SMOKE TESTS 11
5.2. PASSING TESTS USING WHITELIST FILES 11
5.3. SKIPPING TESTS USING BLACKLIST FILES 11
5.4. RUNNING TESTS IN PARALLEL CONCURRENTLY, OR SERIALLY 11
.CHAPTER
. . . . . . . . .6.. .CLEANING
. . . . . . . . . .TEMPEST
. . . . . . . . .RESOURCES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
...........
6.1. PERFORMING A CLEAN UP 13
6.2. PERFORMING A DRY RUN 13
6.3. DELETING TEMPEST OBJECTS 13
1
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
2
PREFACE
PREFACE
This guide provides instructions to install, configure and manage the OpenStack Integration Test Suite in
a Red Hat OpenStack Platform environment.
3
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
CHAPTER 1. INTRODUCTION
As OpenStack consists of many different projects, it is important to test their interoperability within your
OpenStack cluster. The OpenStack Integration Test Suite (tempest) automates the integration testing of
your Red Hat OpenStack Platform deployment. Running tests ensures your cluster is working as
expected, and can also provide early warning of potential problems, especially after an upgrade.
The Integration Test Suite contains tests for OpenStack API validation and scenario testing, as well as
unit testing for self-validation. It performs black box testing using the OpenStack public APIs, with ostestr
as the test runner.
4
CHAPTER 2. OPENSTACK INTEGRATION TEST SUITE TESTS
5
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
enable_tempest = true
You are now ready to install the tempest packages and plug-ins, described in Section 3.3, “Installing
the OpenStack Integration Test Suite Packages”.
On the controller node, as a root user, create a virtual machine called tempest. This machine must
run Red Hat Enterprise Linux 7.3 or greater. It also needs to be able to reach the cloud, but it does not
have to be part of the cloud. For more information, see Creating Guests with Virt-Manager.
Also, before installing the OpenStack Integration Test Suite, the following networks are required within
your Red Hat OpenStack Platform environment:
A private network
6
CHAPTER 3. INSTALLING THE OPENSTACK INTEGRATION TEST SUITE
You are now ready to install and configure the OpenStack Integration Test Suite within the tempest
virtual machine. For more information, see Section 3.3, “Installing the OpenStack Integration Test Suite
Packages”.
However, this command will not install any tempest plug-ins. These have to be installed
manually, depending on your OpenStack installation.
# openstack-status
3. Install the appropriate tempest plug-in for each component you have, for example:
See Section 3.3.1, “List of Tempest Plug-in Packages” for a list of the tempest plug-ins for each
OpenStack component.
aodh python-aodh-tests
ceilometer python-ceilometer-tests
cinder python-cinder-tests
designate python-designate-tests-tempest
glance python-glance-tests
gnocchi python-gnocchi-tests
heat python-heat-tests
horizon python-horizon-tests-tempest
ironic python-ironic-tests
7
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
ironic-inspector python-ironic-inspector-tests
keystone python-keystone-tests
magnum python-magnum-tests
manila python-manila-tests
mistral python-mistral-tests
murano python-murano-tests
neutron python-neutron-tests
neutron-fwaas python-neutron-fwaas-tests
neutron-lbaas python-neutron-lbaas-tests
nova python-nova-tests
sahara python-sahara-tests-tempest
swift python-swift-tests
trove python-trove-tests
watcher python-watcher-tests-tempest
zaqar python-zaqar-tests
8
CHAPTER 4. CONFIGURING THE OPENSTACK INTEGRATION TEST SUITE
# source stackrc
Or in the overcloud:
# source overcloudrc
2. Initialize tempest:
output is the output file where your updated configuration is written. This is different from your original
configuration file.
9
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
To change this directory, in tempest.conf, under the [DEFAULT] section, set log_dir to the desired
directory:
[DEFAULT]
log_dir = <directory>
If you have your own logging configuration file, in tempest.conf, under the [DEFAULT] section, set
log_config_append to your file:
[DEFAULT]
log_config_append = <file>
If this is set, all other logging configuration in tempest.conf will be ignored, including log_dir.
You first need to configure options in the tempest.conf configuration file to specify the target
microversions. This is to make sure that the supported microversions match the microversions used in
the OpenStack cloud. You can run multiple microversion tests in a single Integration Test Suite operation
by specifying a range of target microversions.
For example, to limit the range of microversions for the compute service, in the [compute] section of
your configuration file, assign values to the min_microversion and max_microversion parameters:
[compute]
min_microversion = 2.14
max_microversion = latest
10
CHAPTER 5. USING OSTESTR TO RUN TEMPEST
# ostestr '.*smoke'
Alternatively:
# ostestr -w <whitelist_file>
Alternatively:
# ostestr -b <blacklist_file>
# ostestr --serial
# ostestr --parallel
11
Red Hat OpenStack Platform 13 OpenStack Integration Test Suite Guide
Alternatively:
# ostestr -c <workers>
12
CHAPTER 6. CLEANING TEMPEST RESOURCES
# tempest cleanup
13