CentOS 7
Ads

OpenStack Ocata : OpenStack Rally
2017/03/26
 
Install OpenStack BenchiMarking Tool, Rally.
This example is based on the environment like follows.
Install and Configure Rally on Control Node as an example.
     ------------+--------------------------------+--------------------------------+------------
                 |                                |                                |
             eth0|10.0.0.30                   eth0|10.0.0.50                   eth0|10.0.0.51
     +-----------+-----------+        +-----------+-----------+        +-----------+-----------+
     |    [ Control Node ]   |        |    [ Storage Node ]   |        |    [ Compute Node ]   |
     |                       |        |                       |        |                       |
     |  MariaDB    RabbitMQ  |        |      Open vSwitch     |        |        Libvirt        |
     |  Memcached  httpd     |        |  L2,L3,Metadata Agent |        |      Nova Compute     |
     |  Keystone   Glance    |        |     Cinder-Volume     |        |      Open vSwitch     |
     |  Nova-API             |        |                       |        |        L2 Agent       |
     |  Neutron Server       |        |                       |        |                       |
     |  Cinder-API Rally     |        |                       |        |                       |
     +-----------------------+        +-----------------------+        +-----------------------+

[1] Add a User or Endpoint for Rally to Keystone on Control Node.
[root@dlp ~(keystone)]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 43
Server version: 10.1.20-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database rally;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on rally.* to rally@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on rally.* to rally@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[2] Install Rally.
# install from Ocata, EPEL

[root@dlp ~(keystone)]#
yum --enablerepo=centos-openstack-ocata,epel -y install openstack-rally
[3] Configure Rally.
[root@dlp ~(keystone)]#
vi /etc/rally/rally.conf
# line 38: uncomment and change

log_file =
rally.log
# line 43: uncomment and change

log_dir =
/var/log/rally
# line 597: add the line for MariaDB connection info

connection = mysql+pymysql://rally:password@10.0.0.30/rally
[root@dlp ~(keystone)]#
rally-manage db create

[4] How to use Rally.
For a sample scenario in follwoing tutorial, there are many other samples on the site below, refer to them.
⇒ https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/
# add current Openstack environment's definitions

[root@dlp ~(keystone)]#
rally deployment create --fromenv --name=my_openstack_cloud

+--------------------------------------+---------------------+--------------------+------------------+--------+
| uuid                                 | created_at          | name               | status           | active |
+--------------------------------------+---------------------+--------------------+------------------+--------+
| c6037840-94e3-4543-9dfc-f4ba71dd5c58 | 2017-03-28 03:57:05 | my_openstack_cloud | deploy->finished |        |
+--------------------------------------+---------------------+--------------------+------------------+--------+
Using deployment: c6037840-94e3-4543-9dfc-f4ba71dd5c58
~/.rally/openrc was updated

HINTS:

* To use standard OpenStack clients, set up your env by running:
        source ~/.rally/openrc
  OpenStack clients are now configured, e.g run:
        openstack image list

# show environment

[root@dlp ~(keystone)]#
rally deployment check

keystone endpoints are valid and following services are available:
+-------------+-------------+-----------+
| services    | type        | status    |
+-------------+-------------+-----------+
| __unknown__ | key-manager | Available |
| __unknown__ | placement   | Available |
| __unknown__ | volumev2    | Available |
| cinder      | volume      | Available |
| glance      | image       | Available |
| keystone    | identity    | Available |
| neutron     | network     | Available |
| nova        | compute     | Available |
+-------------+-------------+-----------+
NOTE: '__unknown__' service name means that Keystone service catalog doesn't return name for this service and
Rally can not identify service by its type. BUT you still can use such services with api_versions context,
specifying type of service (execute `rally plugin show api_versions` for more details).
# define Benchimarking scenario

# for example, define a simple scenario to create and delete a compute instance

# for [flavor], specify your own registered flavor name

# for [image], specify your own registered image name

[root@dlp ~(keystone)]#
vi boot-and-delete.json
{
    "NovaServers.boot_and_delete_server": [
        {
            "args": {
                "flavor": {
                    "name": "m1.small"
                },
                "image": {
                    "name": "CentOS7"
                },
                "force_delete": false
            },
            "runner": {
                "type": "constant",
                "times": 10,
                "concurrency": 2
            },
            "context": {
                "users": {
                  "tenants": 3,
                  "users_per_tenant": 2
                }
            }
        }
    ]
}

# start BenchiMarking

[root@dlp ~(keystone)]#
rally task start boot-and-delete.json

Running Rally version 0.8.1
--------------------------------------------------------------------------------
Preparing input task
--------------------------------------------------------------------------------

Input task is:
{
    "NovaServers.boot_and_delete_server": [
        {
            "args": {
                "flavor": {
                    "name": "m1.small"
                },
                "image": {
                    "name": "CentOS7"
                },
                "force_delete": false
            },
            "runner": {
                "type": "constant",
                "times": 10,
                "concurrency": 2
            },
            "context": {
                "users": {
                  "tenants": 3,
                  "users_per_tenant": 2
                }
            }
        }
    ]
}

Task syntax is correct :)
Task config is valid :)
--------------------------------------------------------------------------------
Task  89266900-a11c-4557-b484-595630b4da84: started
--------------------------------------------------------------------------------

Benchmarking... This can take a while...

To track task status use:

        rally task status
        or
        rally task detailed

Using task: 89266900-a11c-4557-b484-595630b4da84

--------------------------------------------------------------------------------
Task 89266900-a11c-4557-b484-595630b4da84: finished
--------------------------------------------------------------------------------

test scenario NovaServers.boot_and_delete_server
args position 0
args values:
{
  "runner": {
    "type": "constant",
    "concurrency": 2,
    "times": 10
  },
  "hooks": [],
  "args": {
    "force_delete": false,
    "flavor": {
      "name": "m1.small"
    },
    "image": {
      "name": "CentOS7"
    }
  },
  "sla": {},
  "context": {
    "users": {
      "users_per_tenant": 2,
      "tenants": 3
    }
  }
}

--------------------------------------------------------------------------------
Task 89266900-a11c-4557-b484-595630b4da84 has 0 error(s)
--------------------------------------------------------------------------------

+-----------------------------------------------------------------------------------------------------------------------+
|                                                 Response Times (sec)                                                  |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| Action             | Min (sec) | Median (sec) | 90%ile (sec) | 95%ile (sec) | Max (sec) | Avg (sec) | Success | Count |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| nova.boot_server   | 3.962     | 5.087        | 6.024        | 6.1          | 6.177     | 5.064     | 100.0%  | 10    |
| nova.delete_server | 2.504     | 2.573        | 2.654        | 2.687        | 2.721     | 2.592     | 100.0%  | 10    |
| total              | 5.466     | 6.686        | 7.597        | 7.693        | 7.789     | 6.656     | 100.0%  | 10    |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+

Load duration: 38.3381
Full duration: 53.2868

HINTS:
* To plot HTML graphics with this data, run:
        rally task report 89266900-a11c-4557-b484-595630b4da84 --out output.html

* To generate a JUnit report, run:
        rally task report 89266900-a11c-4557-b484-595630b4da84 --junit --out output.xml

* To get raw JSON output of task results, run:
        rally task results 89266900-a11c-4557-b484-595630b4da84
[5] To run the commands that were shown when task had completed, it's possible to generate HTML file with Graph like follows.
 
Tweet