Guillaume Boutry 4931ad53b9
[*-k8s] Migrate charm base to ubuntu@24.04
Update charm base to ubuntu@24.04 for all k8s based charms. Deploying
k8s charm is abstracted from the underlying host base, therefore we can
already deploy next generation based charms.

Change-Id: If8e8960a58a39f9978aaeec26ed4df4a2b690396
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
2024-10-09 09:23:37 +02:00

158 lines
4.5 KiB
YAML

type: charm
name: tempest-k8s
summary: OpenStack integration test suite (tempest)
description: |
Tempest provides a set of integration tests to be run, in ad-hoc
or periodic fasion, against a live OpenStack cluster for OpenStack API
validation, scenarios, and other specific tests useful in validating an
OpenStack deployment.
assumes:
- k8s-api
- juju >= 3.1
links:
source: https://opendev.org/openstack/sunbeam-charms
issues: https://bugs.launchpad.net/sunbeam-charms
documentation: https://discourse.charmhub.io/t/tempest-k8s-docs-index/13258
base: ubuntu@24.04
platforms:
amd64:
config:
options:
region:
type: string
default: RegionOne
description: Name of the OpenStack region
schedule:
type: string
default: 0 */1 * * *
description: |
The cron schedule expression to define when to run tempest periodic checks.
The value will only take effect when 'logging' relation is joined. Otherwise,
regardless of the value set, periodic checks are disabled.
By default, tests will run every hour. When the value is set to empty,
periodic checks will be disabled.
The cron implementation used is Vixie Cron, installed from Ubuntu main.
For help with expressions, see `man 5 crontab` for Vixie Cron,
or visit https://crontab.guru/ .
The schedule should not result in tempest running more than once every 15 minutes.
Example expressions:
"*/30 * * * *" every 30 minutes
"5 2 * * *" at 2:05am every day
"5 2 * * mon" at 2:05am every Monday
actions:
validate:
description: |
Run a set of tempest tests.
Tests can be filtered using parameters: regex, exclude-regex, and test-list.
These parameters are optional; if none are given, all tests will run.
Provided parameters narrow down the tests that will run.
For example, `regex="one two" exclude-regex=three test-list=list1`,
will run tests that are:
- found in test list "list1"
- AND match regex "one" or "two"
- AND don't match regex "three"
A summary of the results will be printed.
The complete results may be large,
and will be written to /var/lib/tempest/workspace/tempest-validation.log
in the workload container.
This can be copied to your local machine using juju,
for example:
juju scp --container tempest tempest/0:/var/lib/tempest/workspace/tempest-validation.log tempest-validation.log
additionalProperties: false
params:
regex:
type: string
default: ""
description: |
A list of regexes, whitespace separated, used to select tests from the list.
Tests matching any of the regexes will be selected.
If no value provided (the default), all tests will be selected.
To run the equivalent of tempest smoke tests (`tempest run --smoke`),
use `regex=smoke`.
exclude-regex:
type: string
default: ""
description: |
A single regex to exclude tests.
Any test that matches this regex will be excluded from the final list.
serial:
type: boolean
default: false
description: Run tests serially. By default, tests run in parallel.
test-list:
type: string
default: ""
description: |
Use a predefined test list. See `get-lists` for available test lists.
get-lists:
description: List existing test lists, to be used with validate action.
additionalProperties: false
containers:
tempest:
resource: tempest-image
resources:
tempest-image:
type: oci-image
description: OCI image for tempest
upstream-source: ghcr.io/canonical/tempest:2024.1
requires:
identity-ops:
interface: keystone-resources
logging:
interface: loki_push_api
receive-ca-cert:
interface: certificate_transfer
optional: true
tracing:
interface: tracing
optional: true
limit: 1
provides:
grafana-dashboard:
interface: grafana_dashboard
peers:
peers:
interface: tempest-peer
parts:
update-certificates:
plugin: nil
override-build: |
apt update
apt install -y ca-certificates
update-ca-certificates
charm:
after:
- update-certificates
build-packages:
- git
- libffi-dev
- libssl-dev
- rustc
- cargo
- pkg-config
charm-binary-python-packages:
- cryptography
- jsonschema
- pydantic
- jinja2