CentOS Stream 9
Sponsored Link

OpenStack Antelope : OpenStack Rally2023/04/20

 
OpenStack ベンチマークツール Rally をインストールします。
当例では以下のような環境を例に Rally をインストールします。
------------+--------------------------+--------------------------+------------
            |                          |                          |
        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] Rally 用のユーザーとデータベースを MariaDB に作成しておきます。
[root@dlp ~(keystone)]#
mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 90188
Server version: 10.5.16-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] Rally をインストールします。
# Antelope, EPEL, CRB からインストール

[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-antelope,epel,crb -y install openstack-rally openstack-rally-plugins python3-fixtures
[3] Rally の基本設定です。
[root@dlp ~(keystone)]#
vi /etc/rally/rally.conf
# 33行目 : ログファイル名を追記

log_file = rally.log
# 38行目 : ログ格納ディレクトリ名を追記

log_dir = /var/log/rally
# 203行目 : MariaDB 接続情報を追記

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

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

Creating database: mysql+pymysql://rally:password@dlp.srv.world/rally
Database created successfully
[4] Rally がベンチマークタスクを実行できるよう認証情報を登録しておきます。
URL や ユーザー情報等は自身の環境に置き換えてください。
[root@dlp ~(keystone)]#
rally deployment create --fromenv --name=my-cloud

+--------------------------------------+---------------------+----------+------------------+--------+
| uuid                                 | created_at          | name     | status           | active |
+--------------------------------------+---------------------+----------+------------------+--------+
| 4c5f5fe3-d362-4f4a-b009-777141c17094 | 2023-04-20T03:40:49 | my-cloud | deploy->finished |        |
+--------------------------------------+---------------------+----------+------------------+--------+
Using deployment: 4c5f5fe3-d362-4f4a-b009-777141c17094
~/.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 |
+----------------------------+----------+----------+-------------+-------------+---------------+
| https://dlp.srv.world:5000 | admin    | ***      | admin       |             | None          |
+----------------------------+----------+----------+-------------+-------------+---------------+

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

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

Available services:
+-------------+----------------+-----------+
| Service     | Service Type   | Status    |
+-------------+----------------+-----------+
| __unknown__ | placement      | Available |
| __unknown__ | rating         | Available |
| barbican    | key-manager    | Available |
| ceilometer  | metering       | Available |
| cinder      | volumev3       | Available |
| cloud       | cloudformation | Available |
| glance      | image          | Available |
| gnocchi     | metric         | Available |
| heat        | orchestration  | Available |
| keystone    | identity       | Available |
| neutron     | network        | Available |
| nova        | compute        | Available |
+-------------+----------------+-----------+
[5] Rally の利用方法です。
なお、下例で定義しているベンチマークシナリオのその他サンプルは下記サイトを参照ください。
⇒ https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/
# ベンチマークのシナリオを定義する
# 例として インスタンスの作成/起動~削除までを行うシンプルなシナリオを定義
# [flavor] は登録済みの flavor 名を指定
# [image] は登録済みの image 名を指定

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

# ベンチマークタスクを開始

[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": "CentOS-Stream9"
        },
        "force_delete": false
      },
      "runner": {
        "type": "constant",
        "times": 10,
        "concurrency": 2
      },
      "context": {}
    }
  ]
}

Task syntax is correct :)
Running Rally version 3.3.0
--------------------------------------------------------------------------------
Task  7ff3764e-d442-4091-94c0-f28eeb24701f: started
--------------------------------------------------------------------------------

.....
.....

--------------------------------------------------------------------------------
Task 7ff3764e-d442-4091-94c0-f28eeb24701f 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   | 1.644     | 3.837        | 4.283        | 4.314        | 4.346     | 3.535     | 100.0%  | 10    |
| nova.delete_server | 2.097     | 2.119        | 2.145        | 2.152        | 2.16      | 2.121     | 100.0%  | 10    |
| total              | 3.742     | 5.958        | 6.409        | 6.457        | 6.506     | 5.657     | 100.0%  | 10    |
|  -> duration       | 2.742     | 4.958        | 5.409        | 5.457        | 5.506     | 4.657     | 100.0%  | 10    |
|  -> idle_duration  | 1.0       | 1.0          | 1.0          | 1.0          | 1.0       | 1.0       | 100.0%  | 10    |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+

Load duration: 27.6548
Full duration: 36.4713

HINTS:
* To plot HTML graphics with this data, run:
        rally task report 7ff3764e-d442-4091-94c0-f28eeb24701f --out output.html

* To generate a JUnit report, run:
        rally task export 7ff3764e-d442-4091-94c0-f28eeb24701f --type junit-xml --to output.xml

* To get raw JSON output of task results, run:
        rally task report 7ff3764e-d442-4091-94c0-f28eeb24701f --json --out output.json
[6] タスク完了時に表示された HTML 出力コマンドを実行すると HTML ファイルが生成され、以下のようにベンチマーク結果がグラフで確認可能です。
関連コンテンツ