|
| 1 | +# rally |
| 2 | +Role to setup and run Rally benchmarking tests against an OpenStack deployment. |
| 3 | + |
| 4 | +Rally is run inside the `quay.io/airshipit/xrally-openstack` container via podman. |
| 5 | +OpenStack credentials are discovered automatically from the Kubernetes KeystoneAPI resource, |
| 6 | +or can be supplied directly via `cifmw_rally_os_*` variables. |
| 7 | + |
| 8 | +## Prerequisites |
| 9 | +- `oc` CLI available and pointing to the target OpenStack cluster (used for credential and CA discovery). |
| 10 | +- `cifmw_openstack_namespace` must be set to the OpenStack namespace (typically `openstack`). |
| 11 | + |
| 12 | +### Manila prerequisites |
| 13 | + |
| 14 | +If running Manila benchmarks, the `dhss_true` share type must exist before Rally runs. |
| 15 | +Use `manila_create_default_resources.yml` with `share_type_name` and `extra_specs` overrides: |
| 16 | + |
| 17 | +```yaml |
| 18 | +pre_tests_80_manila_share_type: |
| 19 | + type: playbook |
| 20 | + source: manila_create_default_resources.yml |
| 21 | + extra_vars: |
| 22 | + share_type_name: dhss_true |
| 23 | + extra_specs: {} |
| 24 | +``` |
| 25 | +
|
| 26 | +## Privilege escalation |
| 27 | +become - Required to install podman and fix artifact directory ownership after the container run. |
| 28 | +
|
| 29 | +## Parameters |
| 30 | +
|
| 31 | +* `cifmw_rally_artifacts_basedir`: (String) Directory where all Rally artifacts are stored. |
| 32 | + Default: `{{ cifmw_basedir }}/tests/rally` |
| 33 | +* `cifmw_rally_registry`: (String) Container registry. Default: `quay.io` |
| 34 | +* `cifmw_rally_namespace`: (String) Registry namespace. Default: `airshipit` |
| 35 | +* `cifmw_rally_container`: (String) Container image name. Default: `xrally-openstack` |
| 36 | +* `cifmw_rally_image`: (String) Full image reference. Composed from registry/namespace/container. |
| 37 | +* `cifmw_rally_image_tag`: (String) Container image tag. Default: `3.0.0` |
| 38 | +* `cifmw_rally_dry_run`: (Boolean) Skip actual container execution. Default: `false` |
| 39 | +* `cifmw_rally_remove_container`: (Boolean) Remove container after run. Default: `true` |
| 40 | +* `cifmw_rally_fail_on_task_failure`: (Boolean) Fail the play if Rally exits non-zero. Default: `true` |
| 41 | +* `cifmw_rally_deployment_name`: (String) Rally deployment name. Default: `cifmw` |
| 42 | +* `cifmw_rally_concurrency`: (Integer) Concurrency passed to the Rally task via `--task-args`. Default: `1` |
| 43 | +* `cifmw_rally_task_file`: (String) Absolute path to a custom Rally task YAML on the host. |
| 44 | + Mutually exclusive with `cifmw_rally_openstack_tests`. Default: `""` |
| 45 | +* `cifmw_rally_task_extra_args`: (String) Extra arguments passed verbatim to `rally task start`. Default: `""` |
| 46 | +* `cifmw_rally_dns_servers`: (List) DNS servers used inside the Rally container. Default: `["192.168.122.10"]` |
| 47 | +* `cifmw_rally_os_auth_url`: (String) OpenStack auth URL. Auto-discovered from KeystoneAPI if unset. |
| 48 | +* `cifmw_rally_os_username`: (String) OpenStack username. Default: `admin` |
| 49 | +* `cifmw_rally_os_password`: (String) OpenStack password. Auto-discovered from Kubernetes secret if unset. |
| 50 | +* `cifmw_rally_os_project_name`: (String) OpenStack project. Default: `admin` |
| 51 | +* `cifmw_rally_os_user_domain_name`: (String) User domain. Default: `Default` |
| 52 | +* `cifmw_rally_os_project_domain_name`: (String) Project domain. Default: `Default` |
| 53 | +* `cifmw_rally_os_region_name`: (String) OpenStack region. Default: `regionOne` |
| 54 | +* `cifmw_rally_runs`: (List) List of run definitions for sequential multi-run mode. |
| 55 | + When empty (default), the role runs once using the top-level `cifmw_rally_*` variables. |
| 56 | + When non-empty, the role loops over the list; each entry may override any `cifmw_rally_*` |
| 57 | + variable for that run and **must** include a `name` key used to namespace artifacts. |
| 58 | + Default: `[]` |
| 59 | + |
| 60 | +## Standalone usage (single run) |
| 61 | + |
| 62 | +```yaml |
| 63 | +- hosts: hypervisor |
| 64 | + roles: |
| 65 | + - role: rally |
| 66 | + vars: |
| 67 | + cifmw_rally_openstack_tests: "cinder" |
| 68 | + cifmw_rally_concurrency: 2 |
| 69 | + cifmw_rally_fail_on_task_failure: false |
| 70 | +``` |
| 71 | + |
| 72 | +## Usage via hook (multiple runs) |
| 73 | + |
| 74 | +Add a `post_tests_*` hook in your job vars and define `cifmw_rally_runs`: |
| 75 | + |
| 76 | +```yaml |
| 77 | +post_tests_90_rally_run: |
| 78 | + type: playbook |
| 79 | + source: rally_run.yaml |
| 80 | +cifmw_rally_runs: |
| 81 | + - name: cinder |
| 82 | + cifmw_rally_openstack_tests: "cinder" |
| 83 | + cifmw_rally_concurrency: 1 |
| 84 | + - name: nova |
| 85 | + cifmw_rally_openstack_tests: "nova" |
| 86 | + cifmw_rally_concurrency: 2 |
| 87 | + cifmw_rally_fail_on_task_failure: false |
| 88 | +``` |
| 89 | + |
| 90 | +Each run stores its artifacts under `cifmw_rally_artifacts_basedir/<name>/`. |
| 91 | + |
| 92 | +## Custom task files |
| 93 | + |
| 94 | +To use a custom Rally task file, set `cifmw_rally_task_file` to the absolute path of the |
| 95 | +YAML on the hypervisor host (pre-stage it via an earlier hook if needed). |
0 commit comments