Skip to main content

OpenStack Rally Deployment

shipped with caddy webserver alongside to server reports

Deployment

To deploy, change into the appropriate overlay and run kustomize build | kubectl apply -f -

Preparation

Generally there can be used any existing user project, but its better to separate it into its own tenant.

Rally will clean up the resources created during its testing phase.

Manually

  1. create an OpenStack user project with the name rally
  2. create an OpenStack user with the name rally and assign it to the above mentioned project
  3. Set a user password for the user rally
  4. add a cirros image to your OpenStack cluster with the naming convention by this regex: ^cirros.*$. Rally will use this image to run VMs.

Automated

Here we use Terraform as an automation engine for the task like described above.

  1. Clone the rally-terraform repository from your git workspace.
  2. Follow the instructions in repositories/rallyterraform.

Configuration

Populate the ./config/rally-auth.json file for the admin account and rally user according to the setup you have prepared above.

Rally is configured via the following environment variables in the kustomization.yaml file:

  - name: rally-env
literals:
- OPENSTACK_USER_NETWORK_ID=6874d299-4eba-455c-a955-28edf88f7c99
- OPENSTACK_SERVICE_LIST="authentication keystone glance nova cinder neutron"
- RALLY_SMOKE_TEST="true"
- DEFAULT_FLAVOR=tiny
- BLOCK_MIGRATION=false
NameValuesDescription
OPENSTACK_USER_NETWORK_IDIDNetwork id within the Openstack tenant (optional)
OPENSTACK_SERVICE_LISTauthentication keystone glance nova cinder neutronList of services which should be tested.
RALLY_SMOKE_TESTbooleanDry run without load from 1 user
DEFAULT_FLAVORstringFlavor name that exist in cloud
BLOCK_MIGRATIONbooleanwether to use block migration or not. If you use ceph this is always false

Operations & Access

The Rally deployment will create a kubernetes job which will perform the tests against the configured OpenStack environment.

Alongside the rally job there is a caddy webserver deployment. You can access the Caddy Webserver via its service rally-output on port 2015 within the rally namespace. The Webserver serves the rendered HTML test reports of your rally-jobs. These are only accesibly from within the kuberenetes cluster. To acces the caddy webserver in your browser at localhost:2015 you can use a port forward as described below.

kubectl -n rally port-forward services/rally-output 2015:2015 

Usage

Run rally jobs

To run a rally job apply the deployment as described above. If there are previous jobs you should delete them beforehand.

kubectl get jobs

kubectl delete job rally-job

Rally Tasks

Rally Tasks are based on Jinja template engine (see docs).