# Rally tests for OpenStack Original Rally testsuites can be found here: https://github.com/stackforge/rally --- ## Intro In order to perform functional and performance testing, we use Rally (see https://wiki.openstack.org/wiki/Rally for details). Rally must be installed as jenkins user on the jumphost machine of the OPNFV solution. ## Installation & Configuration ### Rally * Log on jumphost machine as jenkins user * Create the file existing.json, adapt it to your OpenStack (until agreement on default passwords) ```bash { "type": "ExistingCloud", "auth_url": "http://example.net:5000/v2.0/", "region_name": "RegionOne", "endpoint_type": "public", "admin": { "username": "admin", "password": "myadminpass", "tenant_name": "demo" }, "https_insecure": False, "https_cacert": "", } ``` * Install Rally (ref https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html) ```bash git clone https://git.openstack.org/stackforge/rally ./rally/install_rally.sh -v rally deployment create --file=existing.json --name=existing ``` * you can check the available OpenStack services ```bash # rally deployment check keystone endpoints are valid and following service are available: +-------------+-----------+------------+ | Services | Type | Status | +-----------+-------------+------------+ | cinder | volume | Available | | cinderv2 | volumev2 | Available | | glance | image | Available | | keystone | identity | Available | | neutron | network | Available | | nova | compute | Available | | nova_ec2 | compute_ec2 | Available | | novav3 | computev3 | Available | +-----------+-------------+------------+ ``` * You can start Rally scenario manually, follow https://rally.readthedocs.org/en/latest/tutorial/step_1_setting_up_env_and_running_benchmark_from_samples.html ```bash # rally task start ./samples/tasks/scenarios/nova/my-boot-and-delete.json -------------------------------------------------------------------------------- Preparing input task -------------------------------------------------------------------------------- Input task is: { "NovaServers.boot_and_delete_server": [ { "args": { "flavor": { "name": "m1.small" }, "image": { "name": "^ubuntu-14.10-64b" }, "force_delete": false }, "runner": { "type": "constant", "times": 10, "concurrency": 2 }, "context": { "users": { "tenants": 3, "users_per_tenant": 2 } } } ] } -------------------------------------------------------------------------------- Task f42c8aed-00a6-4715-9951-945b4fb97c32: started -------------------------------------------------------------------------------- Benchmarking... This can take a while... To track task status use: rally task status or rally task detailed -------------------------------------------------------------------------------- Task f42c8aed-00a6-4715-9951-945b4fb97c32: finished -------------------------------------------------------------------------------- test scenario NovaServers.boot_and_delete_server args position 0 args values: OrderedDict([(u'runner', OrderedDict([(u'type', u'constant'), (u'concurrency', 2), (u'times', 10)])), (u'args', OrderedDict([(u'force_delete', False), (u'flavor', OrderedDict([(u'name', u'm1.small')])), (u'image', OrderedDict([(u'name', u'^ubuntu-14.10-64b')]))])), (u'context', OrderedDict([(u'users', OrderedDict([(u'project_domain', u'default'), (u'users_per_tenant', 2), (u'tenants', 3), (u'resource_management_workers', 30), (u'user_domain', u'default')]))]))]) +--------------------+-----------+-----------+-----------+---------------+---------------+---------+-------+ | action | min (sec) | avg (sec) | max (sec) | 90 percentile | 95 percentile | success | count | +--------------------+-----------+-----------+-----------+---------------+---------------+---------+-------+ | nova.boot_server | 4.675 | 5.554 | 6.357 | 6.289 | 6.323 | 100.0% | 10 | | nova.delete_server | 2.365 | 3.301 | 4.728 | 4.553 | 4.64 | 100.0% | 10 | | total | 7.303 | 8.