Jump to: navigation, search

Difference between revisions of "Rally/HowTo"

(Action!)
(Action!)
Line 47: Line 47:
 
   "tests": {
 
   "tests": {
 
     "verify": {
 
     "verify": {
       "tests_to_run": ["sanity", "smoke"]
+
       "tests_to_run": []
 
     },  
 
     },  
 
     "benchmark": {
 
     "benchmark": {
 
       "tests_to_run": {
 
       "tests_to_run": {
 
         "NovaServers.boot_and_delete_server": [
 
         "NovaServers.boot_and_delete_server": [
           {"args": {"flavor_id": 5, "image_id": "38abef78-4527-402c-8de3-df097bff2be1"},
+
           {"args": {"flavor_id": 2, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
           "times": 1, "concurrent": 1},
+
           "times": 2, "concurrent": 1},
           {"args": {"flavor_id": 4, "image_id": "bd892d13-b9bd-4a3c-953f-a759aa78da76"},
+
           {"args": {"flavor_id": 2, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
           "times": 100, "concurrent": 10}
+
           "times": 6, "concurrent": 2}
 
         ]
 
         ]
 
       }
 
       }
Line 83: Line 83:
 
   |                uuid                |        created_at        |          status        | failed |
 
   |                uuid                |        created_at        |          status        | failed |
 
   +--------------------------------------+----------------------------+-------------------------+--------+
 
   +--------------------------------------+----------------------------+-------------------------+--------+
   | 8532319f-d093-47de-b9f3-2909c03c7e30 | 2013-09-16 05:28:57.241456 | test_tool->benchmarking | False  |
+
   | 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:
 +
 +
  openstack-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  |
 +
  +--------------+---------------+---------------+-------+

Revision as of 13:27, 11 October 2013

Run It!

The easiest way to learn how Rally works is to use already existing OpenStack deployed by DevStack. So let assume that we have 2 VMs:

 Vm1 - 192.168.1.2 (with Rally)
 Vm2 - 192.168.1.3 (with OpenStack deployed by DevStack)

Preparing

1) Installing Rally & Zipkin on Vm1 To install Rally and Zipkin on Vm1 use this instruction

2) Installing OpenStack using DevStack on Vm2

 ssh root@192.168.1.3
 git clone https://github.com/openstack-dev/devstack.git
 cd devstack && ./stack.sh

Action!

Now we should properly configure task configuration: base_task.json:

{
  "deploy": {
    "name": "FakeEngine", 
    "cloud_config": {
      "identity": {
        "url": "http://192.168.1.3/",
        "uri": "http://192.168.1.3:5000/v2.0/",
        "admin_username": "admin",
        "admin_password": "admin_pass",
        "admin_tenant_name": "demo"
      }, 
      "compute": {
        "controller_nodes_name": "192.168.1.3",
        "controller_node_ssh_user": "root_user",
        "controller_node_ssh_password": "root_password", 
        "path_to_private_key": "/local/path/to/the/private/key/of/node",
        "compute_nodes": "192.168.1.3"
      }
    }
  }, 

  "tests": {
    "verify": {
      "tests_to_run": []
    }, 
    "benchmark": {
      "tests_to_run": {
        "NovaServers.boot_and_delete_server": [
          {"args": {"flavor_id": 2, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
           "times": 2, "concurrent": 1},
          {"args": {"flavor_id": 2, "image_id": "0d7cfe07-f684-4afa-813d-ca2611373c59"},
           "times": 6, "concurrent": 2}
        ]
      }
    }
  }
}

DevStack deploys all OpenStack component on Vm2, actually in

  • "identity" section you should specify IP address of Server where Keystone is run
  • "compute" you should specify information about Server where works one of Nova Computes

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

  openstack-rally-manage db recreate


Ok now we should run our rally with benchmark configuration:

 openstack-rally --verbose task start --task base_task.json

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

 oepnstack-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:

 openstack-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  |
 +--------------+---------------+---------------+-------+