OpenStack Rocky : OpenStack Rally2018/09/18 |
OpenStack ベンチマークツール Rally をインストールします。
当例では以下のような環境を例に Rally をインストールします。
------------+---------------------------+---------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Storage Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | | | Libvirt | | Memcached httpd | | L2 Agent | | Nova_Compute | | Keystone Glance | | L3 Agent | | L2_Agent | | Nova API Cinder API | | Metadata Agent | | | | Neutron Server | | Cinder Volume | | | | Metadata Agent | | Heat API | | | | Rally | | Heat Engine | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Rally 用のユーザーとデータベースを 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 451 Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04 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)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
[2] | Rally をインストールします。 |
root@dlp ~(keystone)# apt -y install rally
|
[3] | Rally の基本設定です。 |
root@dlp ~(keystone)#
vi /etc/rally/rally.conf # 38行目:コメント解除して変更 log_file = rally.log
# 43行目:コメント解除して変更 log_dir = /var/log/rally
# 591行目:MariaDB 接続情報に変更 connection = mysql+pymysql://rally:password@10.0.0.30/rally
rally-manage db create |
[4] | Rally がベンチマークタスクを実行できるように、現在セットしている環境変数から認証情報を登録しておきます。 |
root@dlp ~(keystone)# rally deployment create --fromenv --name=my_cloud +--------------------------------------+---------------------+----------+------------------+--------+ | uuid | created_at | name | status | active | +--------------------------------------+---------------------+----------+------------------+--------+ | 168002de-1210-4514-8937-fde60a3daf51 | 2018-09-18 06:22:06 | my_cloud | deploy->finished | | +--------------------------------------+---------------------+----------+------------------+--------+ Using deployment: 168002de-1210-4514-8937-fde60a3daf51 ~/.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 listroot@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 +-------------+----------------+-----------+ | services | type | status | +-------------+----------------+-----------+ | __unknown__ | key-manager | Available | | __unknown__ | placement | Available | | __unknown__ | volumev3 | Available | | cloud | cloudformation | Available | | designate | dns | Available | | glance | image | Available | | heat | orchestration | 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). |
[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": "Ubuntu1804" }, "force_delete": false }, "runner": { "type": "constant", "times": 10, "concurrency": 2 }, "context": { "users": { "tenants": 1, "users_per_tenant": 1 } } } ] } # ベンチマークタスクを開始 root@dlp ~(keystone)# rally task start boot-and-delete.json Running Rally version 0.9.1 -------------------------------------------------------------------------------- Preparing input task -------------------------------------------------------------------------------- Task is: { "NovaServers.boot_and_delete_server": [ { "args": { "flavor": { "name": "m1.small" }, "image": { "name": "Ubuntu1804" }, "force_delete": false }, "runner": { "type": "constant", "times": 10, "concurrency": 2 }, "context": { "users": { "tenants": 1, "users_per_tenant": 1 } } } ] } Task syntax is correct :) Task config is valid :) -------------------------------------------------------------------------------- Task 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958: started -------------------------------------------------------------------------------- Benchmarking... This can take a while... To track task status use: rally task status or rally task detailed Using task: 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958 -------------------------------------------------------------------------------- Task 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958: finished -------------------------------------------------------------------------------- test scenario NovaServers.boot_and_delete_server args position 0 args values: { "runner": { "type": "constant", "times": 10, "concurrency": 2 }, "hooks": [], "args": { "flavor": { "name": "m1.small" }, "image": { "name": "Ubuntu1804" }, "force_delete": false }, "sla": {}, "context": { "users": { "tenants": 1, "users_per_tenant": 1 } } } -------------------------------------------------------------------------------- Task 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958 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 | 6.91 | 9.792 | 15.342 | 15.344 | 15.346 | 10.488 | 100.0% | 10 | | nova.delete_server | 2.343 | 2.452 | 2.681 | 2.684 | 2.686 | 2.487 | 100.0% | 10 | | total | 8.347 | 11.244 | 17.024 | 17.028 | 17.033 | 11.975 | 100.0% | 10 | +--------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+ Load duration: 64.0072 Full duration: 83.5423 HINTS: * To plot HTML graphics with this data, run: rally task report 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958 --out output.html * To generate a JUnit report, run: rally task report 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958 --junit --out output.xml * To get raw JSON output of task results, run: rally task results 95de9fd3-016c-4eb5-b3f3-0d00a1e6f958 |
[6] | タスク完了時に表示された HTML 出力コマンドを実行すると HTML ファイルが生成され、以下のようにベンチマーク結果がグラフで確認可能です。 |
Sponsored Link |
|