Rally is a benchmarking tool that automates and unifies multi-node OpenStack deployment, cloud verification, benchmarking & profiling.
For OpenStack deployment I used packstack tool.
##Install Rally
[1.] Install rally:
$ sudo yum install openstack-rally
[2.] After the installation is complete set up the Rally database:
$ sudo rally-manage db recreate
##Register an OpenStack deployment
You have to provide Rally with an OpenStack deployment it is going to benchmark. To do that, we’re going to use keystone configuration file generated by packstack installation.
[1.] Evaluate the configuration file:
$ source keystone_admin
[2.] Create rally deployment and let’s name it “existing”
$ rally deployment create –fromenv –name=existing
+————————————–+—————————-+———-+——————+——–+
| uuid | created_at | name | status | active |
+————————————–+—————————-+———-+——————+——–+
| 6973e349-739e-41af-947a-34230b7383f8 | 2016-10-05 08:24:27.939523 | existing | deploy->finished | |
+————————————–+—————————-+———-+——————+——–+
[3.] You can verify that your current deployment is healthy and ready to be benchmarked by the deployment check command:
$ rally deployment check
+————-+————–+———–+
| services | type | status |
+————-+————–+———–+
| ceilometer | metering | Available |
| cinder | volume | Available |
| glance | image | Available |
| gnocchi | metric | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
| swift | object-store | Available |
+————-+————–+———–+
##Run Rally
The sequence of benchmarks to be launched by Rally should be specified in a benchmark task configuration file (either in JSON or in YAML format).
Let’s create one of the sample benchmark task, for example task for boot and delete server.
[1.] Create a new file and name it boot-and-delete.json
[2.] Copy this to the boot-and-delete.json file:
{% set flavor_name = flavor_name or “m1.tiny” %}
{% set image_name = image_name or “cirros” %}
{
“NovaServers.boot_and_delete_server”: [
{
“args”: {
“flavor”: {
“name”: “{{flavor_name}}”
},
“image”: {
“name”: “{{image_name}}”
},
“force_delete”: false
},
“runner”: {
“type”: “constant”,
“times”: 10,
“concurrency”: 2
},
“context”: {
“users”: {
“tenants”: 3,
“users_per_tenant”: 2
}
}
},
{
“args”: {
“flavor”: {
“name”: “{{flavor_name}}”
},
“image”: {
“name”: “{{image_name}}”
},
“auto_assign_nic”: true
},
“runner”: {
“type”: “constant”,
“times”: 10,
“concurrency”: 2
},
“context”: {
“users”: {
“tenants”: 3,
“users_per_tenant”: 2
},
“network”: {
“start_cidr”: “10.2.0.0/24″,
“networks_per_tenant”: 2
}
}
}
]
}
[3.] Run the task:
$ rally task start boot-and-delete.json
After successfull ran you’ll see information such as: Task ID, Response Times, duration, …
Note that the Rally input task above uses cirros as image name and ‘m1.tiny’ as flavor name. If this benchmark task fails, then the reason for that might be a non-existing image/flavor specified in the task. To check what images/flavors are available in the deployment you are currently benchmarking, you might use the rally show command:
$ rally show images
$ rally show flavors
More about Rally tasks templates can be found on Rally documentation
Quelle: RDO
Published by