rally-01

openstack 测试介绍

Rally 介绍

介绍

贴图:
文字介绍

使用kolla部署rally

rally的功能介绍

rally的基本使用

rally调用tempest

rally的局限性

OpenStack,毫无疑问是各种服务联合的一个庞大的生态系统。

Rally 作为一个标准测试工具,回答了 “OpenStack 如何大规模运作?” 的问题。

为了使其成为可能,Rally 自动化并统一了多个节点的 OpenStack 部署、云的验证、标准测试和分析。Rally 使用一个通用的方法,使得我们能够检查 OpenStack 是否正常运作,也即,在高负荷下 1K 服务器的安装是否成功。因此,它可以作为 OpenStack CI/CD 系统的基本工具来使用,可以持续改进其 SLA、运作和稳定性。

Rally 的操作如下图所示:
http://coffeechou.github.io/public/imgs/rally_actions.png

在kolla中使用rally

1
2
3
4
5
6
7
8
9
10
#在配置文件打开rally
vim /etc/kolla/globals.yml
enable_rally: "yes"
#部署环境
kolla-ansible deploy
#生成openrc环境变量
kolla-ansible post-deploy

初始化rally

Registering an OpenStack deployment in Rally

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# 进入rally 容器
[root@control01 ~]# docker exec -it -u root rally bash
(rally)[root@control01 /]#
(rally)[root@control01 deployments]# vim existing-keystone-v3.json
{
"type": "ExistingCloud",
"auth_url": "http://172.16.130.210:5000/v3",
"region_name": "RegionOne",
"endpoint_type": "public",
"admin": {
"username": "admin",
"password": "99cloud",
"user_domain_name": "deault",
"project_name": "admin",
"project_domain_name": "deault"
},
"https_insecure": false,
"https_cacert": ""
}
{% qnimg test/test.png title:test alt:test %}
### 创建deployments
(rally)[root@control01 deployments]#rally deployment create --file existing-keystone-v3.json --name 99cloud-regionOne
+--------------------------------------+---------------------+-------------------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+-------------------+------------------+--------+
| e36d802c-2211-4bac-a8ea-2f3b967568b9 | 2017-05-08 03:07:46 | 99cloud-regionOne | deploy->finished | |
+--------------------------------------+---------------------+-------------------+------------------+--------+
Using deployment: e36d802c-2211-4bac-a8ea-2f3b967568b9
~/.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
(rally)[root@control01 deployments]# rally deployment list
+--------------------------------------+---------------------+-------------------+-------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+-------------------+-------------------+--------+
| af993ae9-363e-4701-b343-626063eaf715 | 2017-04-26 07:13:50 | existing | cleanup->finished | |
| e36d802c-2211-4bac-a8ea-2f3b967568b9 | 2017-05-08 03:07:46 | 99cloud-regionOne | deploy->finished | * |
+--------------------------------------+---------------------+-------------------+-------------------+--
### 还有一种创建方法,就是使用环境变量去创建
### 我们先删除之前创建的
(rally)[root@control01 deployments]# rally deployment destroy 99cloud-regionOne
(rally)[root@control01 deployments]# rally deployment list
+--------------------------------------+---------------------+----------+-------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+----------+-------------------+--------+
| af993ae9-363e-4701-b343-626063eaf715 | 2017-04-26 07:13:50 | existing | cleanup->finished | |
+--------------------------------------+---------------------+----------+-------------------+--------+
### (rally)[root@control01 /]# cat openrc
export OS_REGION_NAME=RegionOne
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=99cloud
export OS_AUTH_URL=http://172.16.130.210:35357/v3
export OS_INTERFACE=internal
export OS_IDENTITY_API_VERSION=3
(rally)[root@control01 /]# source openrc
## 测试下环境变量是否可用
(rally)[root@control01 deployments]# openstack image list
+--------------------------------------+-----------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+-----------------------------------+--------+
| 83dc79c8-c6df-4e23-808c-0209778be1b2 | 123 | active |
| 9d4cc662-bdfb-46cb-996d-3b773ee161d5 | a1 | active |
| 255cc63c-f635-4bbb-850c-e319d2e4c17d | cenos-raw | active |
| 63c5d475-e96a-4c1f-985b-12685aa2a95b | centos6.5 | active |
| 15ed4618-4b3b-4cc3-a9ef-6967e3a3091d | centos7 | active |
| 15f04241-38cc-482d-b6a3-42ba9d29f47a | cirros | active |
| 6491747b-2fea-4d7c-b034-b3fe5089df2c | d1 | active |
| 4f99d882-04af-47bc-9e2d-a12aaecbf753 | s_rally_e4dbf0c1_LdpjrVlZ-shelved | active |
| 6a45e590-08fc-471f-b4d8-9a6195e88d07 | s_rally_e4dbf0c1_f3TP5nP4-shelved | active |
| a166585b-fb88-4c0a-a0c9-47443e9ca8be | s_rally_e4dbf0c1_lEthjCi9-shelved | active |
| fa680415-4448-4564-9b22-bdf2b86b6cd2 | s_rally_e4dbf0c1_nuqTKzuQ-shelved | active |
| 6eec3597-ee52-436c-9970-ec11415cbb4e | sdf1 | active |
| 1e84937a-a700-447b-8ffc-3f162127300d | snap1 | active |
+--------------------------------------+-----------------------------------+--------+
(rally)[root@control01 deployments]# rally deployment create --fromenv --name regiOne-99cloud
+--------------------------------------+---------------------+-----------------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+-----------------+------------------+--------+
| 6682d272-5d99-400b-9de9-c4d46a705ba6 | 2017-05-08 03:21:46 | regiOne-99cloud | deploy->finished | |
+--------------------------------------+---------------------+-----------------+------------------+--------+
Using deployment: 6682d272-5d99-400b-9de9-c4d46a705ba6
~/.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
(rally)[root@control01 deployments]# source ~/.rally/openrc
### 测试deployments是否可用
(rally)[root@control01 deployments]# openstack image list
+--------------------------------------+-----------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+-----------------------------------+--------+
| 83dc79c8-c6df-4e23-808c-0209778be1b2 | 123 | active |
| 9d4cc662-bdfb-46cb-996d-3b773ee161d5 | a1 | active |
| 255cc63c-f635-4bbb-850c-e319d2e4c17d | cenos-raw | active |
| 63c5d475-e96a-4c1f-985b-12685aa2a95b | centos6.5 | active |
| 15ed4618-4b3b-4cc3-a9ef-6967e3a3091d | centos7 | active |
| 15f04241-38cc-482d-b6a3-42ba9d29f47a | cirros | active |
| 6491747b-2fea-4d7c-b034-b3fe5089df2c | d1 | active |
| 4f99d882-04af-47bc-9e2d-a12aaecbf753 | s_rally_e4dbf0c1_LdpjrVlZ-shelved | active |
| 6a45e590-08fc-471f-b4d8-9a6195e88d07 | s_rally_e4dbf0c1_f3TP5nP4-shelved | active |
| a166585b-fb88-4c0a-a0c9-47443e9ca8be | s_rally_e4dbf0c1_lEthjCi9-shelved | active |
| fa680415-4448-4564-9b22-bdf2b86b6cd2 | s_rally_e4dbf0c1_nuqTKzuQ-shelved | active |
| 6eec3597-ee52-436c-9970-ec11415cbb4e | sdf1 | active |
| 1e84937a-a700-447b-8ffc-3f162127300d | snap1 | active |
+--------------------------------------+-----------------------------------+--------+
(rally)[root@control01 deployments]# rally deployment list
+--------------------------------------+---------------------+-----------------+-------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+-----------------+-------------------+--------+
| af993ae9-363e-4701-b343-626063eaf715 | 2017-04-26 07:13:50 | existing | cleanup->finished | |
| 6682d272-5d99-400b-9de9-c4d46a705ba6 | 2017-05-08 03:21:46 | regiOne-99cloud | deploy->finished | * |
+--------------------------------------+---------------------+-----------------+-------------------+--------+
坚持原创技术分享,您的支持将鼓励我继续创作!