1、查看变量
root@edge:~/rally-openstack/samples/deployments# openstack catalog list
+-------------+----------------+----------------------------------------------------------------------------+
| Name | Type | Endpoints |
+-------------+----------------+----------------------------------------------------------------------------+
| neutron | network | RegionOne |
| | | public: http://192.168.1.224:9696/ |
| | | |
| placement | placement | RegionOne |
| | | public: http://192.168.1.224/placement |
| | | |
| cinder | block-storage | RegionOne |
| | | public: http://192.168.1.224/volume/v3/07357339f79e4a208f17c6bcd9bfa63d |
| | | |
| cinderv3 | volumev3 | RegionOne |
| | | public: http://192.168.1.224/volume/v3/07357339f79e4a208f17c6bcd9bfa63d |
| | | |
| keystone | identity | RegionOne |
| | | public: http://192.168.1.224/identity |
| | | RegionOne |
| | | admin: http://192.168.1.224/identity |
| | | |
| cinderv2 | volumev2 | RegionOne |
| | | public: http://192.168.1.224/volume/v2/07357339f79e4a208f17c6bcd9bfa63d |
| | | |
| glance | image | RegionOne |
| | | public: http://192.168.1.224/image |
| | | |
| nova_legacy | compute_legacy | RegionOne |
| | | public: http://192.168.1.224/compute/v2/07357339f79e4a208f17c6bcd9bfa63d |
| | | |
| nova | compute | RegionOne |
| | | public: http://192.168.1.224/compute/v2.1 |
| | | |
+-------------+----------------+----------------------------------------------------------------------------+
root@edge:~/rally-openstack/samples/deployments# openstack region list
+-----------+---------------+-------------+
| Region | Parent Region | Description |
+-----------+---------------+-------------+
| RegionOne | None | |
+-----------+---------------+-------------+
root@edge:~/rally-openstack/samples/deployments# openstack domain list
+---------+---------+---------+--------------------+
| ID | Name | Enabled | Description |
+---------+---------+---------+--------------------+
| default | Default | True | The default domain |
+---------+---------+---------+--------------------+
root@edge:~/rally-openstack/samples/deployments# openstack user list
+----------------------------------+-----------+
| ID | Name |
+----------------------------------+-----------+
| 01774c32baaf44818106874f8b80c1e0 | admin |
| 12c5e437541b4dccb783ba9fdb3c162d | demo |
| 9e2bcbd3ff92421998fc51bb0af70e0b | alt_demo |
| 7800c499c1ef46c8a9dac3b7c52b37d6 | nova |
| 0327b977e39e4b9b926b31d598201070 | glance |
| 941a7256d56845529f425a7933c493c3 | cinder |
| ed93ca9251674209b43e79aca9d612bd | neutron |
| 9d83a235ce064a40bcf15498d6599b7f | placement |
| ec13b2631fb24907b163a55125946ae0 | test_user |
+----------------------------------+-----------+
root@edge:~/rally-openstack/samples/deployments# openstack project list
+----------------------------------+--------------------+
| ID | Name |
+----------------------------------+--------------------+
| 07357339f79e4a208f17c6bcd9bfa63d | admin |
| 0c85469fe03a4c2ba702bbabb0a3984c | alt_demo |
| 8854e3bfb460439e86e45b91ddfc98f5 | demo |
| b5fac1da3d004c8ab3d1aad2067827b1 | General |
| e0c772ad9bcd47349eb2ea1580801105 | service |
| e4b666c6cadc49afa51b39f8c4bc5f6a | invisible_to_admin |
+----------------------------------+--------------------+
2、修改openstack rally配置文件
将IP地址替换为openstack 集群keystone IP
root@edge:~/rally-openstack/samples/deployments# vi existing-keystone-v3.json
{
"openstack": {
"auth_url": "http://192.168.1.224/identity",
"region_name": "RegionOne",
"endpoint_type": "public",
"admin": {
"username": "admin",
"password": "admin",
"user_domain_name": "Default",
"project_name": "admin",
"project_domain_name": "Default"
},
"https_insecure": false,
"https_cacert": ""
}
}
3、注册openstack集群
root@edge:~/rally-openstack/samples/deployments# rally deployment create --file=existing-keystone-v3.json --name=test
+--------------------------------------+----------------------------+------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+----------------------------+------+------------------+--------+
| cf8942ea-7bec-4cdf-9d2a-ec428f75343a | 2021-01-06T01:58:03.019306 | test | deploy->finished | |
+--------------------------------------+----------------------------+------+------------------+--------+
Using deployment: cf8942ea-7bec-4cdf-9d2a-ec428f75343a
~/.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
3.1 查看~/.rally/openrc
root@edge:~/rally-openstack/samples/deployments# cat ~/.rally/openrc
export OS_AUTH_URL='http://192.168.1.224/identity'
export OS_USERNAME='admin'
export OS_PASSWORD='admin'
export OS_TENANT_NAME='admin'
export OS_PROJECT_NAME='admin'
export OS_REGION_NAME='RegionOne'
export OS_ENDPOINT_TYPE='publicURL'
export OS_INTERFACE='public'
export OS_IDENTITY_API_VERSION=3
export OS_USER_DOMAIN_NAME='Default'
export OS_PROJECT_DOMAIN_NAME='Default'
3.2 执行~/.rally/openrc
root@edge:~/rally-openstack/samples/deployments# source ~/.rally/openrc
3.3 检查集群
root@edge:~/rally-openstack/samples/deployments# rally deployment check
2021-01-06 02:05:39.452 26510 INFO keyring.backend [-] Loading Gnome
2021-01-06 02:05:39.463 26510 INFO keyring.backend [-] Loading Google
2021-01-06 02:05:39.465 26510 INFO keyring.backend [-] Loading Windows (alt)
2021-01-06 02:05:39.466 26510 INFO keyring.backend [-] Loading file
2021-01-06 02:05:39.467 26510 INFO keyring.backend [-] Loading keyczar
2021-01-06 02:05:39.467 26510 INFO keyring.backend [-] Loading multi
2021-01-06 02:05:39.467 26510 INFO keyring.backend [-] Loading pyfs
--------------------------------------------------------------------------------
Platform openstack:
--------------------------------------------------------------------------------
Available services:
+-------------+----------------+-----------+
| Service | Service Type | Status |
+-------------+----------------+-----------+
| __unknown__ | compute_legacy | Available |
| __unknown__ | placement | Available |
| cinder | block-storage | Available |
| cinder | volumev2 | Available |
| cinder | volumev3 | Available |
| glance | image | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
+-------------+----------------+-----------+
4、执行测试
rally task start xxx.json