Jump to: navigation, search

Difference between revisions of "Rally/HowTo"

m (Usage demo)
(Usage demo)
Line 2: Line 2:
 
== Usage demo ==
 
== Usage demo ==
  
'''''Note:''''' Throughout this demo, we assume that you have a configured [[Rally/installation|Rally installation]] and an already existing OpenStack deployment available at ''192.168.1.3''.
+
'''''Note:''''' Throughout this demo, we assume that you have a configured [[Rally/installation|Rally installation]] and an already existing OpenStack deployment has keystone available at <KEYSTON_AUTH_URL>
  
  
Line 12: Line 12:
 
     "name": "DummyEngine",
 
     "name": "DummyEngine",
 
     "endpoint": {
 
     "endpoint": {
         "auth_url": "http://192.168.1.3:5000/v2.0/",
+
         "auth_url": <KEYSTONE_AUTH_URL>,
         "username": "admin",
+
         "username": <ADMIN_USER_NAME>,
         "password": "password",
+
         "password": <ADMIN_PASSWORD>,
         "tenant_name": "demo"
+
         "tenant_name": <ADMIN_TENANT>
 
     }
 
     }
 
}
 
}
 
</pre>
 
</pre>
 +
  
 
To register this deployment in Rally, use the '''deployment create''' command:
 
To register this deployment in Rally, use the '''deployment create''' command:
Line 62: Line 63:
 
{
 
{
 
   "NovaServers.boot_and_delete_server": [
 
   "NovaServers.boot_and_delete_server": [
     {"args": {"flavor_id": 1, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
+
     {"args": {"flavor_id": 1, "image_id": <GLANCE_IMAGE_UUID>},
 
     "config": {"times": 2, "active_users": 1}},
 
     "config": {"times": 2, "active_users": 1}},
     {"args": {"flavor_id": 1, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
+
     {"args": {"flavor_id": 1, "image_id": <GLANCE_IMAGE_UUID>},
 
     "config": {"times": 4, "active_users": 2}}
 
     "config": {"times": 4, "active_users": 2}}
 
   ]
 
   ]
 
}
 
}
 +
</pre>
 +
 +
<big>'''NOTE: To obtain proper image_id and flavor_id you can use standard python clients:'''</big>
 +
 +
First of all you should source proper openrc file for your cloud, next command should work for you:
 +
 +
  $ . ~/.rally/openrc
 +
 +
Now let's get proper image uuid:
 +
<pre>
 +
$ glance image-list
 +
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
 +
| ID                                  | Name                            | Disk Format | Container Format | Size    | Status |
 +
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
 +
| <UUID_THAT_YOU_NEED>                | cirros-0.3.1-x86_64-uec        | ami        | ami              | 25165824 | active |
 +
| b420cefb-eae6-4738-9ee7-6ad8d36b125d | cirros-0.3.1-x86_64-uec-kernel  | aki        | aki              | 4955792  | active |
 +
| 8b217e33-4557-4826-aa1a-983149a27ed7 | cirros-0.3.1-x86_64-uec-ramdisk | ari        | ari              | 3714968  | active |
 +
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
 +
</pre>
 +
 +
Let's get proper flavor id:
 +
 +
<pre>
 +
 
</pre>
 
</pre>
  

Revision as of 01:35, 16 February 2014

Usage demo

Note: Throughout this demo, we assume that you have a configured Rally installation and an already existing OpenStack deployment has keystone available at <KEYSTON_AUTH_URL>


Step 1. Deployment initialization

First, you have to provide Rally with an Openstack deployment it is going to benchmark. This is done through deployment configuration files. The actual deployment can be either created by Rally (see /doc/samples for configuration examples) or, as in our example, an already existing one. The configuration file (let's call it dummy_deployment.json) should contain the deployment strategy (in our case, the deployment will be performed by the so called "DummyEngine", since the deployment is ready to use) and some specific parameters (for the DummyEngine, an endpoint with administrator permissions):

{
    "name": "DummyEngine",
    "endpoint": {
        "auth_url": <KEYSTONE_AUTH_URL>,
        "username": <ADMIN_USER_NAME>,
        "password": <ADMIN_PASSWORD>,
        "tenant_name": <ADMIN_TENANT>
    }
}


To register this deployment in Rally, use the deployment create command:

$ rally deployment create --filename=dummy_deployment.json --name=dummy
+--------------------------------------+----------------------------+-------+------------------+
|                 uuid                 |         created_at         |  name |      status      |
+--------------------------------------+----------------------------+-------+------------------+
| e17557f4-1ba5-402f-80cc-36adc45d3f5e | 2014-02-15 22:00:28.270941 | dummy | deploy->finished |
+--------------------------------------+----------------------------+-------+------------------+
Using deployment : e17557f4-1ba5-402f-80cc-36adc45d3f5e

Note the last line in the output. It says that the just created deployment is now used by Rally; that means that all the benchmarking operations from now on are going to be performed on this deployment. In case you want to switch to another deployment, execute the use deployment command:

$ rally use deployment --deploy_id=<Deployment UUID>
Using deployment : <Deployment UUID>

Finally, the deployment check command enables you to verify that your current deployment is healthy and ready to be benchmarked:

$ rally deployment check
+----------+-----------+-----------+
| services |    type   |   status  |
+----------+-----------+-----------+
|   nova   |  compute  | Available |
| cinderv2 |  volumev2 | Available |
|  novav3  | computev3 | Available |
|    s3    |     s3    | Available |
|  glance  |   image   | Available |
|  cinder  |   volume  | Available |
|   ec2    |    ec2    | Available |
| keystone |  identity | Available |
+----------+-----------+-----------+

Step 2. Benchmarking

A sample of a task configuration also a good point to start. Take copy of doc/samples/tasks/nova/boot-and-delete.json, specify a proper image_id and store to a separate file boot-and-delete.json:

{
  "NovaServers.boot_and_delete_server": [
    {"args": {"flavor_id": 1, "image_id": <GLANCE_IMAGE_UUID>},
     "config": {"times": 2, "active_users": 1}},
    {"args": {"flavor_id": 1, "image_id": <GLANCE_IMAGE_UUID>},
     "config": {"times": 4, "active_users": 2}}
  ]
}

NOTE: To obtain proper image_id and flavor_id you can use standard python clients:

First of all you should source proper openrc file for your cloud, next command should work for you:

 $ . ~/.rally/openrc

Now let's get proper image uuid:

 $ glance image-list 
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
| ID                                   | Name                            | Disk Format | Container Format | Size     | Status |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
| <UUID_THAT_YOU_NEED>                 | cirros-0.3.1-x86_64-uec         | ami         | ami              | 25165824 | active |
| b420cefb-eae6-4738-9ee7-6ad8d36b125d | cirros-0.3.1-x86_64-uec-kernel  | aki         | aki              | 4955792  | active |
| 8b217e33-4557-4826-aa1a-983149a27ed7 | cirros-0.3.1-x86_64-uec-ramdisk | ari         | ari              | 3714968  | active |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+

Let's get proper flavor id:


Run Rally!

If you didn't create Rally DB you should run this command:

   $ rally-manage db recreate


First, the deployment should be added in Rally:

   $ rally deployment create --name=mydeploy --filename dummy.json

List all deployments to get its UUID:

   $ rally deployment list
   +--------------------------------------+----------------------------+----------+------------------+
   |                 uuid                 |         created_at         |   name   |      status      |
   +--------------------------------------+----------------------------+----------+------------------+
   | 7712c8de-1539-4f4e-8a77-0a54c64499e8 | 2013-11-25 14:58:20.310001 | mydeploy | deploy->finished |
   +--------------------------------------+----------------------------+----------+------------------+

Ok now we should run our rally with benchmark configuration:

   $ rally --verbose task start --deploy-id=7712c8de-1539-4f4e-8a77-0a54c64499e8 --task boot-and-delete.json

Now using another ssh connection to Rally VM. Run this command:

   $ rally task list 
   +--------------------------------------+----------------------------+-------------------------+--------+
   |                 uuid                 |         created_at         |          status         | failed |
   +--------------------------------------+----------------------------+-------------------------+--------+
   | 83d9e08c-4f2b-4c1d-9c83-f36bcc6b5a68 | 2013-09-16 05:28:57.241456 | test_tool->benchmarking | False  |
   +--------------------------------------+----------------------------+-------------------------+--------+

To get detailed results by task with uuid: 83d9e08c-4f2b-4c1d-9c83-f36bcc6b5a68 you should run:

   $ rally task detailed  8532319f-d093-47de-b9f3-2909c03c7e30
   ================================================================================
   Task 83d9e08c-4f2b-4c1d-9c83-f36bcc6b5a68 is finished.
   --------------------------------------------------------------------------------
   test scenario NovaServers.boot_and_delete_server
   args position 0
   args values:
  {u'args': {u'flavor_id': 2,
           u'image_id': u'0d7cfe07-f684-4afa-813d-ca2611373c59'},
   u'concurrent': 1,
   u'times': 2}
   +---------------+---------------+---------------+-------+
   |      max      |      avg      |      min      | ratio |
   +---------------+---------------+---------------+-------+
   | 13.4224121571 | 13.2850991488 | 13.1477861404 |  1.0  |
   +---------------+---------------+---------------+-------+
   --------------------------------------------------------------------------------
   test scenario NovaServers.boot_and_delete_server
   args position 1
   args values:
   {u'args': {u'flavor_id': 2,
            u'image_id': u'0d7cfe07-f684-4afa-813d-ca2611373c59'},
    u'concurrent': 2,
    u'times': 6}
   +--------------+---------------+---------------+-------+
   |     max      |      avg      |      min      | ratio |
   +--------------+---------------+---------------+-------+
   | 19.802423954 | 16.9980401595 | 16.3908159733 |  1.0  |
   +--------------+---------------+---------------+-------+

Available Rally facilities

List of available Deploy engines (including their description and usage examples): Deploy engines

List of available Server providers (including their description and usage examples): Server providers

List of available Benchmark scenarios (including their description and usage examples): Benchmark scenarios