tempest-k8s docs - index

The tempest-k8s charm is a Kubernetes charm for Tempest, developed as part of the validation plugin in Canonical OpenStack.

Tempest is a tool for running integration tests on an OpenStack deployment. This charm autoconfigures Tempest on a live OpenStack deployment, and provides methods for running sets of integration tests periodically and/or on demand.

This can be useful to operators and QA engineers who want to simplify testing an OpenStack deployment.

Canonical OpenStack integration

This charm is available as part of the validation plugin for Canonical OpenStack. Please see the Validation plugin docs for more information.

Usage

This assumes an OpenStack deployment with juju is ready. MicroStack is officially supported, but this may work with other deployments with juju too. Deploy to the openstack model:

juju deploy tempest-k8s tempest
juju integrate tempest:identity-ops keystone

Warning: this charm is only designed to have one unit deployed - adding a second one may render the Tempest application inoperable.

Tempest is ready to run tests as soon as the application reaches the active/idle state. To run a set of tests on demand, run the validation action. A couple of examples:

# some quick tests, this should only take a few minutes
juju run tempest/leader validate test-list=readonly-quick

# the full suite of smoke tests
juju run tempest/leader validate regex=smoke

The Tempest charm can also be configured to periodically run the readonly-quick set of tests and display their results in a Grafana dashboard. To achieve this, the Canonical Observability Stack must be deployed, along with the Grafana Agent (K8s) charm; the Grafana Agent K8s charm must be related to loki (logging) and grafana (dashboards); finally, the Tempest application must be related to Grafana Agent:

juju integrate tempest:grafana-dashboard grafana-agent-k8s
juju integrate tempest:logging grafana-agent-k8s

# The schedule defaults to hourly, but this can be configured with a custom cron expression
juju config tempest schedule="*/30 * * * *"

Once all units have reached active idle state once more, you will be able to find the “Tempest” dashboard in the Grafana web ui, and soon begin seeing reports on periodic test runs. This dashboard can also be toggled to display reports of test runs launched via the validate action. Note that an alert will be fired in Alertmanager if any of the periodic tests fails.

Known issues

  • Tests may sometimes fail with Invalid Credentials ... Details: Insufficient number of users provided. This is due to a bug in tempest: #2052752. The bug appears to be more likely to occur the more tests in a single validate run.
  • Only a single unit is supported, by design. Currently though there isn’t any logic for restricting to a single unit or checking if additional units are added, resulting in a broken environment for tempest. If this happens, it should be possible to recover by removing the application and re-deploying.
  • The alert rule is currently not working (will never fire) when the charm is used with grafana-agent-k8s on latest/stable. It has been fixed in canonical/grafana-agent-k8s-operator#277, and available on grafana-agent-k8s latest/edge, but it has not been released to stable yet.

Security, Bugs and feature requests

If you find a bug in this application or want to request a specific feature, here are the relevant links:

  • Raise issues or feature requests on Launchpad.
  • Security issues in Tempest-k8s can be reported through LaunchPad; please read about how to file.

To chat with the community, join our online chat.

Contributing

Please see the Juju SDK docs for guidelines on enhancements to this charm following best practice guidelines, and CONTRIBUTING.md files in the source repository for developer guidance.

License

Tempest-k8s is free software, distributed under the Apache Software License, version 2.0. See LICENSE for more information.