OpenStack Shaker 安装

Shaker安装

# git clone https://github.com/openstack/shaker.git 

根据版本进行切换,最新版本不支持直接安装

OpenStack Shaker 安装

# cd shaker

(apt-get install python-pip)    //若第三步报错则安装pip

#pip install -r ./requirements.txt

#python ./setup.py install

 

创建shaker要使用的image

这里会连接到客户的openstack,自动生成shaker-flavor以及通过heat模板创建一个shaker会使用到的image(通过创建虚拟机, 执行下载/安装脚本, 然后创建快照方式生成image),image中会下载iperf/netperf工具, 以及通过pip安装pyshaker-agent代理。

Shaker提供了三种制作“shaker-image”镜像的模板:centos、debian、ubutnu,默认使用ubuntu,可以使用“--image-builder-template ”参数指定使用哪个镜像,使用哪个镜像对Shaker来说都一样,Shaker在乎的是镜像中的pyshaker-agent、iperf、netperf、flent工具。

# source admin-openrc.sh

 #shaker-image-builder

测试:

shaker --output output.json --server-endpoint 168.16.1.77:4000 --scenario openstack/full_l2 --report ./shaker_report.html

参数:

--output 指定把Raw格式的报告存放到哪个文件

--server-endpoint 这个IP地址和端口,是运行Shaker命令的本机的IP地址和端口,端口随意,不冲突即可,虚拟机中的“shaker-agent”会连接到这个Socket上,跟Shaker命令通讯,由Shaker告知需要测试的项目以及相关节点信息(如IP)

--scenario Shaker项目提供多种场景的模板进行测试,详细可以查看

https://github.com/openstack/shaker/tree/master/shaker/scenarios/openstack

 

参考文档:

http://www.99cloud.net/html/2016/jiuzhouyuanchuang_0520/161.html

http://pyshaker.readthedocs.io/en/latest/

https://github.com/openstack/shaker/