1,下载

git clone git://git.openstack.org/openstack/rally
或者
git clone https://git.openstack.org/openstack/rally

2,安装虚拟机环境

备注:必须是python2.7或者python3.4

pip install  virtualenv
virtualenv rally_env
source rally_env/bin/activate

3,配置豆瓣源

[root@control01 ~]# mkdir -p ~/.pip
[root@control01 ~]# vi ~/.pip/pip.conf
[root@control01 ~]# cat ~/.pip/pip.conf
[global]
timeout=600
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
[root@control01 ~]#

4,安装

curl https://raw.githubusercontent.com/openstack/rally/master/install_rally.sh | bash

ERROR: Package 'more-itertools' requires a different Python: 2.7.5 not in '>=3.4'

解决办法:

pip install more-itertools==5.0.0

安装成功

==============================
Installation of Rally is done!
============================== Rally is now installed in your system. Information about your Rally
installation: * Method: system
* Database at: /var/lib/rally/database
* Configuration file at: /etc/rally
* Samples at: /usr/share/rally/samples
(rally_env) [root@control01 rally]#

5,查看版本

(rally_env) [root@control01 rally]#  rally --version
Rally version: 2.0.1~dev5

6, 安装 rally-openstack 插件

 pip install rally-openstack

7,加载openstack的环境变量

(rally_env) [root@control01 rally]# source  /etc/kolla/admin-openrc.sh

8,重建数据库:

rally db recreate

9, 根据openstack的环境,创建一个deployment

(rally_env) [root@control01 rally]# rally deployment create --fromenv --name=openstack_p
+--------------------------------------+----------------------------+-------------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+----------------------------+-------------+------------------+--------+
| 504bcca4-7244-4420-b4a1-009aac216a11 | 2019-11-20T09:19:49.143418 | openstack_p | deploy->finished | |
+--------------------------------------+----------------------------+-------------+------------------+--------+
Using deployment: 504bcca4-7244-4420-b4a1-009aac216a11
~/.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 查看创建的deployent:
(rally_env) [root@control01 rally]# rally deployment list
+--------------------------------------+----------------------------+-------------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+----------------------------+-------------+------------------+--------+
| 504bcca4-7244-4420-b4a1-009aac216a11 | 2019-11-20T09:19:49.143418 | openstack_p | deploy->finished | * |
+--------------------------------------+----------------------------+-------------+------------------+--------+
(rally_env) [root@control01 rally]# 检查一下deployment (rally_env) [root@control01 rally]# rally deployment check
--------------------------------------------------------------------------------
Platform openstack:
--------------------------------------------------------------------------------
Available services:
+-------------+----------------+-----------+
| Service | Service Type | Status |
+-------------+----------------+-----------+
| __unknown__ | compute_legacy | Available |
| __unknown__ | placement | Available |
| cinder | volume | Available |
| cinder | volumev2 | Available |
| cinder | volumev3 | Available |
| glance | image | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
+-------------+----------------+-----------+
(rally_env) [root@control01 rally]#

10 简单验证

(rally_env) [root@control01 rally]# rally task start /usr/share/rally/samples/tasks/contexts/dummy-context.json

--------------------------------------------------------------------------------
Task b68be4ff-e2d8-4aac-9b5d-f013a599551e has 0 error(s)
-------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------------------------+
| Response Times (sec) |
+-------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| Action | Min (sec) | Median (sec) | 90%ile (sec) | 95%ile (sec) | Max (sec) | Avg (sec) | Success | Count |
+-------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| foo | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 100.0% | 4 |
| -> bar | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 100.0% | 4 |
| total | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 100.0% | 4 |
| -> duration | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 100.0% | 4 |
| -> idle_duration | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0% | 4 |
+-------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+ Load duration: 0.206922
Full duration: 0.274496 HINTS:
* To plot HTML graphics with this data, run:
rally task report b68be4ff-e2d8-4aac-9b5d-f013a599551e --out output.html * To generate a JUnit report, run:
rally task export b68be4ff-e2d8-4aac-9b5d-f013a599551e --type junit-xml --to output.xml * To get raw JSON output of task results, run:
rally task report b68be4ff-e2d8-4aac-9b5d-f013a599551e --json --out output.json

11 下载 rally-openstack 插件,查看相关的sample

(rally_env) [root@control01 ~]# git clone https://github.com/openstack/rally-openstack.git
Cloning into 'rally-openstack'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 34627 (delta 28), reused 60 (delta 0), pack-reused 34539
Receiving objects: 100% (34627/34627), 11.23 MiB | 255.00 KiB/s, done.
Resolving deltas: 100% (24402/24402), done. [root@control01 tasks]# cd scenarios/
[root@control01 scenarios]# ls
authenticate ceilometer designate ec2 glance grafana ironic magnum mistral murano nova quotas requests senlin vm workload
barbican cinder dummy elasticsearch gnocchi heat keystone manila monasca neutron octavia README.rst sahara swift watcher zaqar
[root@control01 scenarios]# pwd
/root/rally-openstack/samples/tasks/scenarios
[root@control01 scenarios]# cd ec2/
[root@control01 ec2]# ls
boot.json boot.yaml list-servers.json list-servers.yaml
[root@control01 ec2]#

12 镜像测试

---
GlanceImages.create_and_delete_image:
-
args:
image_location: "/root/rally-openstack/cirros-dianxin.vmdk"
container_format: "bare"
disk_format: "vmdk"
runner:
type: "constant"
times: 10
concurrency: 2
context:
users:
tenants: 2
users_per_tenant: 3
sla:
failure_rate:
max: 0

运行测试

(rally_env) [root@control01 glance]# rally task start  create-and-delete-image.yaml
--------------------------------------------------------------------------------
Preparing input task
-------------------------------------------------------------------------------- Task is:
---
GlanceImages.create_and_delete_image:
-
args:
image_location: "/root/rally-openstack/cirros-dianxin.vmdk"
container_format: "bare"
disk_format: "vmdk"
runner:
type: "constant"
times: 10
concurrency: 2
context:
users:
tenants: 2
users_per_tenant: 3
sla:
failure_rate:
max: 0 Task syntax is correct :)

测试结果

Task 5fcf233d-b92a-4783-8298-c6f172836207 has 0 error(s)
-------------------------------------------------------------------------------- +---------------------------------------------------------------------------------------------------------------------------------+
| Response Times (sec) |
+------------------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| Action | Min (sec) | Median (sec) | 90%ile (sec) | 95%ile (sec) | Max (sec) | Avg (sec) | Success | Count |
+------------------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| glance_v2.create_image | 2.514 | 2.609 | 3.209 | 3.228 | 3.247 | 2.779 | 100.0% | 10 |
| -> glance_v2.get_image (x2) | 0.059 | 0.061 | 0.067 | 0.067 | 0.067 | 0.062 | 100.0% | 10 |
| -> glance_v2.upload_data | 0.255 | 0.285 | 0.32 | 0.325 | 0.33 | 0.286 | 100.0% | 10 |
| glance_v2.delete_image | 0.117 | 0.143 | 0.174 | 0.212 | 0.249 | 0.151 | 100.0% | 10 |
| total | 2.66 | 2.747 | 3.366 | 3.431 | 3.496 | 2.93 | 100.0% | 10 |
| -> duration | 2.66 | 2.747 | 3.366 | 3.431 | 3.496 | 2.93 | 100.0% | 10 |
| -> idle_duration | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0% | 10 |
+------------------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+------

rally测试opentack------安装部署和简单实践的更多相关文章

  1. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一)

    环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输: xftp 1.在本地创建asp.net core应用发布 1.1 使用Vs2017 新建 ...

  2. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践

    原文:Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践 环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输 ...

  3. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(二)

    Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一) 接上一篇 3. Nginx配置反向代理 3.1 cnetos 安装nginx 首先,我们需要在服务器上安装N ...

  4. saltstack安装部署以及简单实用

    一,saltstack简介:     SaltStack是一种新的基础设施管理方法开发软件,简单易部署,可伸缩的足以管理成千上万的服务器,和足够快的速度控制,与他们交流,以毫秒为单位. SaltSta ...

  5. dubbo-admin管理控制台的安装部署(最简单)

    Dubbo-admin最简单的安装部署,十分钟就能搞定! 网上找的安装教程虽说详细,但是就是因为详细操作起来而显得繁琐.今天,我帮大家跳过这些繁琐的步骤,简单快捷的安装部署dubbo-admin. 1 ...

  6. 02_ Flume的安装部署及其简单使用

    一.Flume的安装部署: Flume的安装非常简单,只需要解压即可,当然,前提是已有hadoop环境 安装包的下载地址为:http://www-us.apache.org/dist/flume/1. ...

  7. elasticsearch kibana的安装部署与简单使用(一)

    1.先说说es 我早两年使用过es5.x的版本,记得当时部署还是很麻烦,因为es是java写的,要先在机器上部署java环境jvm之类的一堆东西,然后才能安装es 但是现在我使用的是目前最新的7.6版 ...

  8. Hive安装部署及简单测试 网页《一》

    1.首先关闭机器上之前配置的分布式Hadoop 命令: (在hadoop的安装目录中)  sbin/stop-dfs.sh              关闭: yarn   命令:  sbin/stop ...

  9. ansible的安装部署及简单应用

    Ansible 是一个配置管理和应用部署工具,功能类似于目前业界的配置管理工具 Chef,Puppet,Saltstack.Ansible 是通过 Python 语言开发.Ansible 平台由 Mi ...

随机推荐

  1. 将windows当做linux/Mac来用 scoop强大的包管理工具

    在Linux中有apt-get.yum这些包安装管理 安装相当方便:如ubuntu安装一个mysql5.7,只需要一个简单的命令: apt-get 而在windows中需要在MySQL官网下载对应版本 ...

  2. 《Python数据科学手册》

    <Python数据科学手册>[美]Jake VanderPlas著 陶俊杰译 Absorb what is useful, discard what is not, and  add wh ...

  3. Windows&Appium&Python自动化测试-环境搭建之安卓SDK

    一.摘要 本博文将详细讲述在Windows环境下的jdk安装.配置以及环境校验:安卓sdk安装.配置以及环境校验 二.安装包工具准备: jdk1.8.0(64 位) installer_r24.4.1 ...

  4. bind9+dlz+mysql连接断开问题

    前言 关于bind-dlz介绍:http://bind-dlz.sourceforge.net/ DLZ(Dynamically Loadable Zones)与传统的BIND9不同,BIND的不足之 ...

  5. 使用expect登录批量拷贝本地文件到多个目标主机

    #!/bin/bash # #******************************************************************** #encoding -*-utf ...

  6. CF1037H Security——SAM+线段树合并

    又是一道\(SAM\)维护\(endpos\)集合的题,我直接把CF700E的板子粘过来了QwQ 思路 如果我们有\([l,r]\)对应的\(SAM\),只需要在上面贪心就可以了.因为要求的是字典序比 ...

  7. 干物妹小埋 (离散化 + 线段树 + DP)

    链接:https://ac.nowcoder.com/acm/contest/992/B来源:牛客网 题目描述 在之前很火的一个动漫<干物妹小埋>中,大家对小埋打游戏喝可乐的印象十分的深刻 ...

  8. shell编程expr表达式----传智播客的书linux编程基础中出现的问题

    首先声明:本人是传智播客的粉丝,拥有他出的多本编程书籍,此文绝无诋毁抹黑之意. 但在linux系统编程第88页给出的while循环范例中,代码运行无法得到预期结果 原代码如下 #!/bin/sh su ...

  9. log4j.properties通用配置

    一.Log4j的配置文件分类Log4j支持两种配置文件格式,一种是XML格式的文件,一种是properties(key=value)文件,其中properties格式的配置文件最为常用,其有一个固定的 ...

  10. Luogu P4198 楼房重建 分块 or 线段树

    思路:分块 提交:2次(第一次的求解有问题) 题解: 设块长为$T$,我们开$N/T$个单调栈,维护每一块的上升斜率. 修改时暴力重构整个块,$O(T)$ 求解时记录一个最大斜率$lst$,然后块内二 ...