CentOS 7
Sponsored Link

OpenStack Stein : OpenStack Rally2019/05/17

 
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_Agent       |   |     Nova_Compute      |
|  Keystone   Glance    |   |        L3_Agent       |   |      Open_vSwitch     |
|  Nova_API  Cinder_API |   |     Metadata_Agent    |   |        L2_Agent       |
|  Neutron_Server       |   |     Cinder_Volume     |   |  Ceilometer_Compute   |
|  Metadata_Agent       |   |        Heat_API       |   |                       |
|  Rally                |   |      Heat Engine      |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Create user and Database for Rally in MariaDB.
[root@dlp ~(keystone)]#
mysql -u root -p

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

Copyright (c) 2000, 2018, 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 Stein, EPEL

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

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

log_dir =
/var/log/rally
# line 189: MariaDB connection info

connection = mysql+pymysql://rally:password@10.0.0.30/rally
[root@dlp ~(keystone)]#
mkdir /var/log/rally

[root@dlp ~(keystone)]#
rally db create

Creating database: mysql+pymysql://rally:password@10.0.0.30/rally
Database created successfully
[4] Add environment variables for Openstack to Rally to run Rally BenchiMarking Tasks.
[root@dlp ~(keystone)]#
rally deployment create --fromenv --name=my_cloud

2019-05-17 14:34:36.487 5534 WARNING rally_openstack.platforms.existing [-] endpoint is deprecated and not used.
+--------------------------------------+---------------------+----------+------------------+--------+
| uuid                                 | created_at          | name     | status           | active |
+--------------------------------------+---------------------+----------+------------------+--------+
| 153ef284-4148-4920-830e-a52f47da47bb | 2019-05-17T05:34:36 | my_cloud | deploy->finished |        |
+--------------------------------------+---------------------+----------+------------------+--------+
Using deployment: 153ef284-4148-4920-830e-a52f47da47bb
~/.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

[root@dlp ~(keystone)]#
source ~/.rally/openrc

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

+--------------------------+----------+----------+-------------+-------------+---------------+
| auth_url                 | username | password | tenant_name | region_name | endpoint_type |
+--------------------------+----------+----------+-------------+-------------+---------------+
| http://10.0.0.30:5000/v3 | admin    | ***      | admin       |             | None          |
+--------------------------+----------+----------+-------------+-------------+---------------+

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

--------------------------------------------------------------------------------
Platform openstack:
--------------------------------------------------------------------------------

Available services:
+-------------+----------------+-----------+
| Service     | Service Type   | Status    |
+-------------+----------------+-----------+
| __unknown__ | placement      | Available |
| __unknown__ | sharev2        | Available |
| barbican    | key-manager    | Available |
| cinderv3    | volumev3       | Available |
| cloud       | cloudformation | Available |
| glance      | image          | Available |
| heat        | orchestration  | Available |
| keystone    | identity       | Available |
| manila      | share          | Available |
| neutron     | network        | Available |
| nova        | compute        | Available |
+-------------+----------------+-----------+
[5] How to use Rally.
For a sample scenario in following tutorial, there are many other samples on the site below, refer to them.
⇒ https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/
# 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": {}
        }
    ]
}

# start BenchiMarking Tasks

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

--------------------------------------------------------------------------------
Preparing input task
--------------------------------------------------------------------------------

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": {}
        }
    ]
}

Task syntax is correct :)
Running Rally version 1.4.1
--------------------------------------------------------------------------------
Task  1598a7df-198a-4b4a-b539-9858d5694d8a: started
--------------------------------------------------------------------------------

Running Task... This can take a while...

To track task status use:

        rally task status
        or
        rally task detailed

Using task: 1598a7df-198a-4b4a-b539-9858d5694d8a

.....
.....

--------------------------------------------------------------------------------
Task 1598a7df-198a-4b4a-b539-9858d5694d8a 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   | 4.849     | 6.954        | 10.03        | 10.723       | 11.416    | 7.047     | 100.0%  | 10    |
| nova.delete_server | 2.341     | 2.408        | 2.457        | 2.537        | 2.618     | 2.416     | 100.0%  | 10    |
| total              | 7.293     | 9.379        | 12.435       | 13.123       | 13.811    | 9.463     | 100.0%  | 10    |
|  -> duration       | 6.293     | 8.379        | 11.435       | 12.123       | 12.811    | 8.463     | 100.0%  | 10    |
|  -> idle_duration  | 1.0       | 1.0          | 1.0          | 1.0          | 1.0       | 1.0       | 100.0%  | 10    |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+

Load duration: 46.9174
Full duration: 67.2443

HINTS:
* To plot HTML graphics with this data, run:
        rally task report 1598a7df-198a-4b4a-b539-9858d5694d8a --out output.html

* To generate a JUnit report, run:
        rally task export 1598a7df-198a-4b4a-b539-9858d5694d8a --type junit --to output.xml

* To get raw JSON output of task results, run:
        rally task report 1598a7df-198a-4b4a-b539-9858d5694d8a --json --out output.json
[6] To run the commands that were shown when task had completed, it's possible to generate HTML file with Graph like follows.
Matched Content