1 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, 2016-2017 Intel Corporation.
6 Yardstick - NSB Testing -Installation
7 =====================================
12 The Network Service Benchmarking (NSB) extends the yardstick framework to do
13 VNF characterization and benchmarking in three different execution
14 environments viz., bare metal i.e. native Linux environment, standalone virtual
15 environment and managed virtualized environment (e.g. Open stack etc.).
16 It also brings in the capability to interact with external traffic generators
17 both hardware & software based for triggering and validating the traffic
18 according to user defined profiles.
20 The steps needed to run Yardstick with NSB testing are:
22 * Install Yardstick (NSB Testing).
23 * Setup pod.yaml describing Test topology
24 * Create the test configuration yaml file.
31 Refer chapter Yardstick Instalaltion for more information on yardstick
34 Several prerequisites are needed for Yardstick(VNF testing):
36 - Python Modules: pyzmq, pika.
56 Installing Yardstick on Ubuntu 14.04
57 ------------------------------------
59 .. _install-framework:
61 You can install Yardstick framework directly on Ubuntu 14.04 or in an Ubuntu
62 14.04 Docker image. No matter which way you choose to install Yardstick
63 framework, the following installation steps are identical.
65 If you choose to use the Ubuntu 14.04 Docker image, You can pull the Ubuntu
66 14.04 Docker image from Docker hub:
70 docker pull ubuntu:14.04
72 Installing Yardstick framework
73 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 Download source code and install Yardstick framework:
78 git clone https://gerrit.opnfv.org/gerrit/yardstick
82 It will also automatically download all the packages needed for NSB Testing setup.
87 .. code-block:: console
89 +----------+ +----------+
91 | | (0)----->(0) | Ping/ |
95 +----------+ +----------+
99 OpenStack parameters and credentials
100 ------------------------------------
102 Environment variables
103 ^^^^^^^^^^^^^^^^^^^^^
105 Before running Yardstick (NSB Testing) it is necessary to export traffic
110 source ~/.bash_profile
112 Config yardstick conf
113 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117 cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
118 vi /etc/yardstick/yardstick.conf
120 Add trex_path and bin_path in 'nsb' section.
126 dispatcher = influxdb
128 [dispatcher_influxdb]
130 target = http://{YOUR_IP_HERE}:8086
136 trex_path=/opt/nsb_bin/trex/scripts
137 bin_path=/opt/nsb_bin
140 Config pod.yaml describing Topology
141 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143 Before executing Yardstick test cases, make sure that pod.yaml reflects the
144 topology and update all the required fields.
148 cp /etc/yardstick/nodes/pod.yaml.nsb.sample /etc/yardstick/nodes/pod.yaml
160 xe0: # logical name from topology.yaml and vnfd.yaml
162 driver: i40e # default kernel driver
164 local_ip: "152.16.100.20"
165 netmask: "255.255.255.0"
166 local_mac: "00:00:00:00:00:01"
167 xe1: # logical name from topology.yaml and vnfd.yaml
169 driver: i40e # default kernel driver
171 local_ip: "152.16.40.20"
172 netmask: "255.255.255.0"
173 local_mac: "00:00.00:00:00:02"
181 host: 1.1.1.2 #BM - host == ip, virtualized env - Host - compute node
183 xe0: # logical name from topology.yaml and vnfd.yaml
185 driver: i40e # default kernel driver
187 local_ip: "152.16.100.19"
188 netmask: "255.255.255.0"
189 local_mac: "00:00:00:00:00:03"
191 xe1: # logical name from topology.yaml and vnfd.yaml
193 driver: i40e # default kernel driver
195 local_ip: "152.16.40.19"
196 netmask: "255.255.255.0"
197 local_mac: "00:00:00:00:00:04"
199 - network: "152.16.100.20"
200 netmask: "255.255.255.0"
201 gateway: "152.16.100.20"
203 - network: "152.16.40.20"
204 netmask: "255.255.255.0"
205 gateway: "152.16.40.20"
208 - network: "0064:ff9b:0:0:0:0:9810:6414"
210 gateway: "0064:ff9b:0:0:0:0:9810:6414"
212 - network: "0064:ff9b:0:0:0:0:9810:2814"
214 gateway: "0064:ff9b:0:0:0:0:9810:2814"
217 Enable yardstick virtual environment
218 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 Before executing yardstick test cases, make sure to activate yardstick
221 python virtual environment
224 source /opt/nsb_bin/yardstick_venv/bin/activate
227 Examples and verifying the install
228 ----------------------------------
230 It is recommended to verify that Yardstick was installed successfully
231 by executing some simple commands and test samples. Before executing yardstick
232 test cases make sure yardstick flavor and building yardstick-trusty-server
233 image can be found in glance and openrc file is sourced. Below is an example
234 invocation of yardstick help command and ping.py test sample:
238 yardstick task start samples/ping.yaml
240 Each testing tool supported by Yardstick has a sample configuration file.
241 These configuration files can be found in the **samples** directory.
243 Default location for the output is ``/tmp/yardstick.out``.
246 Run Yardstick - Network Service Testcases
247 -----------------------------------------
249 NS testing - using NSBperf CLI
250 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
253 source /opt/nsb_setup/yardstick_venv/bin/activate
254 PYTHONPATH: ". ~/.bash_profile"
255 cd <yardstick_repo>/yardstick/cmd
256 Execute command: ./NSPerf.py -h
257 ./NSBperf.py --vnf <selected vnf> --test <rfc test>
258 eg: ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
260 NS testing - using yardstick CLI
261 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264 source /opt/nsb_setup/yardstick_venv/bin/activate
265 PYTHONPATH: ". ~/.bash_profile"
266 Go to test case forlder type we want to execute.
267 e.g. <yardstick repo>/samples/vnf_samples/nsut/<vnf>/
268 run: yardstick --debug task start <test_case.yaml>