Friday, December 5, 2025

OpenStack Epoxy : OpenStack Rally

 

OpenStack Epoxy : OpenStack Rally

 

Install OpenStack BenchiMarking Tool, Rally.

This example is based on the environment like follows.

------------+--------------------------+--------------------------+------------
            |                          |                          |
        eth0|10.0.0.30             eth0|10.0.0.50             eth0|10.0.0.51
+-----------+-----------+  +-----------+-----------+  +-----------+-----------+
|   [ dlp.srv.world ]   |  | [ network.srv.world ] |  |  [ node01.srv.world ] |
|     (Control Node)    |  |     (Network Node)    |  |     (Compute Node)    |
|                       |  |                       |  |                       |
|  MariaDB    RabbitMQ  |  |      Open vSwitch     |  |        Libvirt        |
|  Memcached  Nginx     |  |     Neutron Server    |  |      Nova Compute     |
|  Keystone   httpd     |  |      OVN-Northd       |  |      Open vSwitch     |
|  Glance     Nova API  |  |  Nginx  iSCSI Target  |  |   OVN Metadata Agent  |
|  Cinder API           |  |     Cinder Volume     |  |     OVN-Controller    |
|  Rally                |  |    Heat API/Engine    |  |                       |
+-----------------------+  +-----------------------+  +-----------------------+

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

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 310
Server version: 11.8.2-MariaDB-1 from Debian -- Please help get to 10k stars at https://github.com/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)]> exit 
Bye
[2]Install Rally.
root@dlp ~(keystone)# 
apt -y install rally python3-rally-openstack python3-fixtures
[3]Configure Rally.
root@dlp ~(keystone)# 
vi /etc/rally/rally.conf
# line 33 : add log file name

log_file = rally.log
# line 38 : add log directory name

log_dir = /var/log/rally
[database]
# line 202 : change : MariaDB connection info

connection = 
mysql+pymysql://rally:password@dlp.srv.world/rally
root@dlp ~(keystone)# 
rally db create

Creating database: mysql+pymysql://rally:password@dlp.srv.world/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

+--------------------------------------+---------------------+----------+------------------+--------+
| uuid                                 | created_at          | name     | status           | active |
+--------------------------------------+---------------------+----------+------------------+--------+
| aeebe9da-0683-4495-b503-766ad8910430 | 2025-09-04T01:03:58 | my-cloud | deploy->finished |        |
+--------------------------------------+---------------------+----------+------------------+--------+
Using deployment: aeebe9da-0683-4495-b503-766ad8910430
~/.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)# 
rally deployment show my-cloud

+-------------------------------+----------+----------+-------------+-------------+---------------+
| auth_url                      | username | password | tenant_name | region_name | endpoint_type |
+-------------------------------+----------+----------+-------------+-------------+---------------+
| https://dlp.srv.world:5000/v3 | admin    | ***      | admin       |             | None          |
+-------------------------------+----------+----------+-------------+-------------+---------------+

root@dlp ~(keystone)# 
rally deployment check

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

Available services:
+-------------+----------------+-----------+
| Service     | Service Type   | Status    |
+-------------+----------------+-----------+
| __unknown__ | placement      | Available |
| barbican    | key-manager    | Available |
| cinder      | volumev3       | Available |
| cloud       | cloudformation | Available |
| glance      | image          | Available |
| heat        | orchestration  | Available |
| keystone    | identity       | 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/
root@dlp ~(keystone)# 
openstack image list

+--------------------------------------+--------------+--------+
| ID                                   | Name         | Status |
+--------------------------------------+--------------+--------+
| 33def798-3361-483b-9de1-8c2c6e1c840c | Debian13     | active |
| a43cc8d1-4212-4118-9a8a-2f73315a6b46 | Trove-Ubuntu | active |
+--------------------------------------+--------------+--------+

root@dlp ~(keystone)# 
openstack flavor list

+----+-----------+-------+------+-----------+-------+-----------+
| ID | Name      |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+-------+------+-----------+-------+-----------+
| 1  | m1.tiny   |  2048 |   10 |         0 |     1 | True      |
| 2  | m1.small  |  4096 |   10 |         0 |     2 | True      |
| 3  | m1.medium |  8192 |   10 |         0 |     4 | True      |
| 4  | m1.large  | 16384 |   10 |         0 |     8 | True      |
| 5  | m2.medium |  8192 |   10 |        10 |     4 | True      |
+----+-----------+-------+------+-----------+-------+-----------+

# set Benchimarking scenario
# for example, set 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.tiny"
        },
        "image": {
          "name": "Debian13"
        },
        "force_delete": false
      },
      "runner": {
        "type": "constant",
        "times": 10,
        "concurrency": 2
      },
      "context": {}
    }
  ]
}

# start BenchiMarking Tasks

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

.....
.....

--------------------------------------------------------------------------------
Task 1b664a81-2147-4a7d-93b9-396d7ce58458 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   | 11.857    | 12.037       | 14.026       | 14.105       | 14.185    | 12.523    | 100.0%  | 10    |
| nova.delete_server | 6.217     | 6.258        | 6.414        | 6.445        | 6.477     | 6.284     | 100.0%  | 10    |
| total              | 18.113    | 18.352       | 20.245       | 20.332       | 20.418    | 18.807    | 100.0%  | 10    |
|  -> duration       | 17.113    | 17.352       | 19.245       | 19.332       | 19.418    | 17.807    | 100.0%  | 10    |
|  -> idle_duration  | 1.0       | 1.0          | 1.0          | 1.0          | 1.0       | 1.0       | 100.0%  | 10    |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+

Load duration: 95.0776
Full duration: 103.242

HINTS:
* To plot HTML graphics with this data, run:
        rally task report 1b664a81-2147-4a7d-93b9-396d7ce58458 --out output.html

* To generate a JUnit report, run:
        rally task export 1b664a81-2147-4a7d-93b9-396d7ce58458 --type junit-xml --to output.xml

* To get raw JSON output of task results, run:
        rally task report 1b664a81-2147-4a7d-93b9-396d7ce58458 --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

No comments:

Post a Comment