Once you have completed your cloud deployment, these are some of the common post-installation tasks you may need to perform to verify your cloud installation.
HPE Helion OpenStack 8 provides a tool, Tempest, that you can use to verify that your cloud deployment completed successfully:
The verification tests rely on you having an external network setup and a cloud image in your image (Glance) repository. Run the following playbook to configure your cloud:
cd ~/scratch/ansible/next/ardana/ansible ansible-playbook -i hosts/verb_hosts ardana-cloud-configure.yml
In HPE Helion OpenStack 8, the EXT_NET_CIDR setting for the external network is now specified in the input model - see Book “Planning an Installation with Cloud Lifecycle Manager”, Chapter 6 “Configuration Objects”, Section 6.16 “Configuration Data”, Section 6.16.2 “Neutron Configuration Data”, Section 6.16.2.2 “neutron-external-networks”.
Tempest is a set of integration tests for OpenStack API validation, scenarios, and other specific tests to be run against a live OpenStack cluster. In HPE Helion OpenStack 8, Tempest has been modeled as a service and this gives you the ability to locate Tempest anywhere in the cloud. It is recommended that you install Tempest on your Cloud Lifecycle Manager node - that is where it resides by default in a new installation.
A version of the upstream Tempest integration tests is pre-deployed on the Cloud Lifecycle Manager node. For details on what Tempest is testing, you can check the contents of this file on your Cloud Lifecycle Manager:
/opt/stack/tempest/run_filters/ci.txt
You can use these embedded tests to verify if the deployed cloud is functional.
For more information on running Tempest tests, see Tempest - The OpenStack Integration Test Suite.
Running these tests requires access to the deployed cloud's identity admin credentials
Tempest creates and deletes test accounts and test resources for test purposes.
In certain cases Tempest might fail to clean-up some of test resources after a test is complete, for example in case of failed tests.
To run the default set of Tempest tests:
Log in to the Cloud Lifecycle Manager.
Ensure you can access your cloud:
cd ~/scratch/ansible/next/ardana/ansible ansible-playbook -i hosts/verb_hosts cloud-client-setup.yml source /etc/environment
Run the tests:
cd ~/scratch/ansible/next/ardana/ansible ansible-playbook -i hosts/verb_hosts tempest-run.yml
Optionally, you can Section 27.1.5, “Customizing the Test Run”.
Tempest is deployed under /opt/stack/tempest
. Test
results are written in a log file in the following directory:
/opt/stack/tempest/logs
A detailed log file is written to:
/opt/stack/tempest/tempest.log
The results are also stored in the testrepository
database.
To access the results after the run:
Log in to the Cloud Lifecycle Manager.
Change to the tempest
directory and list the test
results:
cd /opt/stack/tempest ./venv/bin/testr last
If you encounter an error saying "local variable 'run_subunit_content'
referenced before assignment", you may need to log in as the
tempest
user to run this command. This is due to a known
issue reported at
https://bugs.launchpad.net/testrepository/+bug/1348970.
See Test Repository Users Manual for more details on how to manage the test result repository.
There are several ways available to customize which tests will be executed.
Tempest allows you to test specific services and features using the
tempest.conf
configuration file.
A working configuration file with inline documentation is deployed under
/opt/stack/tempest/etc/
.
To use this, follow these steps:
Log in to the Cloud Lifecycle Manager.
Edit the
/opt/stack/tempest/configs/tempest_region0.conf
file.
To test specific service, edit the [service_available]
section and clear the comment character #
and set a
line to true
to test that service or
false
to not test that service.
cinder = true neutron = false
To test specific features, edit any of the
*_feature_enabled
sections to enable or disable tests
on specific features of a service.
[volume-feature-enabled] [compute-feature-enabled] [identity-feature-enabled] [image-feature-enabled] [network-feature-enabled] [object-storage-feature-enabled]
#Is the v2 identity API enabled (boolean value) api_v2 = true #Is the v3 identity API enabled (boolean value) api_v3 = false
Then run tests normally
You can run tests against specific scenarios by editing or creating a run filter file.
Run filter files are deployed under
/opt/stack/tempest/run_filters
.
Use run filters to whitelist or blacklist specific tests or groups of tests:
lines starting with # or empty are ignored
lines starting with +
are whitelisted
lines starting with -
are blacklisted
lines not matching any of the above conditions are blacklisted
If whitelist is empty, all available tests are fed to blacklist. If blacklist is empty, all tests from whitelist are returned.
Whitelist is applied first. The blacklist is executed against the set of tests returned by the whitelist.
To run whitelist and blacklist tests:
Log in to the Cloud Lifecycle Manager.
Make sure you can access the cloud:
cd ~/scratch/ansible/next/ardana/ansible ansible-playbook -i hosts/verb_hosts cloud-client-setup.yml source /etc/environment
Run the tests:
cd ~/scratch/ansible/next/ardana/ansible ansible-playbook -i hosts/verb_hosts tempest-run.yml -e run_filter <run_filter_name>
Note that the run_filter_name is the name of the run_filter file except for the extension. For instance, to run using the filter from the file /opt/stack/tempest/run_filters/ci.txt, use the following:
ansible-playbook -i hosts/verb_hosts tempest-run.yml -e run_filter=ci
Documentation on the format of white and black-lists is available at:
/opt/stack/tempest/tests2skip.py
Example:
The following entries run API tests, exclude tests that are less relevant for deployment validation, such as negative, admin, cli and third-party (EC2) tests:
+tempest\.api\.* *[Aa]dmin.* *[Nn]egative.* - tempest\.cli.* - tempest\.thirdparty\.*