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 Yardstick supports installation on Ubuntu 14.04 or via a Docker image. The
13 installation procedure on Ubuntu 14.04 or via the docker image are detailed in
16 The Network Service Benchmarking (NSB) extends the yardstick framework to do
17 VNF characterization and benchmarking in three different execution
18 environments viz., bare metal i.e. native Linux environment, standalone virtual
19 environment and managed virtualized environment (e.g. Open stack etc.).
20 It also brings in the capability to interact with external traffic generators
21 both hardware & software based for triggering and validating the traffic
22 according to user defined profiles.
24 The steps needed to run Yardstick with NSB testing are:
26 * Install Yardstick (NSB Testing).
27 * Setup pod.yaml describing Test topology
28 * Create the test configuration yaml file.
35 Refer chapter 08-instalaltion.rst for more information on yardstick
38 Several prerequisites are needed for Yardstick(VNF testing):
39 * Python Modules: pyzmq, pika.
50 Installing Yardstick on Ubuntu 14.04
51 ------------------------------------
53 .. _install-framework:
55 You can install Yardstick framework directly on Ubuntu 14.04 or in an Ubuntu
56 14.04 Docker image. No matter which way you choose to install Yardstick
57 framework, the following installation steps are identical.
59 If you choose to use the Ubuntu 14.04 Docker image, You can pull the Ubuntu
60 14.04 Docker image from Docker hub:
64 docker pull ubuntu:14.04
66 Installing Yardstick framework
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 Download source code and install python dependencies:
72 git clone https://gerrit.opnfv.org/gerrit/yardstick
76 It will automatically download all the packages needed for NSB Testing setup.
81 .. code-block:: console
83 +----------+ +----------+
85 | | (0)----->(0) | Ping/ |
89 +----------+ +----------+
93 OpenStack parameters and credentials
94 ------------------------------------
98 Before running Yardstick (NSB Testing) it is necessary to export traffic
102 source ~/.bash_profile
104 Config yardstick conf
105 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106 cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
108 vi /etc/yardstick/yardstick.conf
110 Config yardstick.conf
115 dispatcher = influxdb
117 [dispatcher_influxdb]
119 target = http://{YOUR_IP_HERE}:8086
125 trex_path=/opt/nsb_bin/trex/scripts
126 bin_path=/opt/nsb_bin
129 Config pod.yaml describing Topology
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 Before executing Yardstick test cases, make sure that pod.yaml reflects the
132 topology and update all the required fields.
134 copy /etc/yardstick/nodes/pod.yaml.nsb.example to /etc/yardstick/nodes/pod.yaml
146 xe0: # logical name from topology.yaml and vnfd.yaml
148 driver: i40e # default kernel driver
150 local_ip: "152.16.100.20"
151 netmask: "255.255.255.0"
152 local_mac: "00:00:00:00:00:01"
153 xe1: # logical name from topology.yaml and vnfd.yaml
155 driver: i40e # default kernel driver
157 local_ip: "152.16.40.20"
158 netmask: "255.255.255.0"
159 local_mac: "00:00.00:00:00:02"
167 host: 1.1.1.2 #BM - host == ip, virtualized env - Host - compute node
169 xe0: # logical name from topology.yaml and vnfd.yaml
171 driver: i40e # default kernel driver
173 local_ip: "152.16.100.19"
174 netmask: "255.255.255.0"
175 local_mac: "00:00:00:00:00:03"
177 xe1: # logical name from topology.yaml and vnfd.yaml
179 driver: i40e # default kernel driver
181 local_ip: "152.16.40.19"
182 netmask: "255.255.255.0"
183 local_mac: "00:00:00:00:00:04"
185 - network: "152.16.100.20"
186 netmask: "255.255.255.0"
187 gateway: "152.16.100.20"
189 - network: "152.16.40.20"
190 netmask: "255.255.255.0"
191 gateway: "152.16.40.20"
194 - network: "0064:ff9b:0:0:0:0:9810:6414"
196 gateway: "0064:ff9b:0:0:0:0:9810:6414"
198 - network: "0064:ff9b:0:0:0:0:9810:2814"
200 gateway: "0064:ff9b:0:0:0:0:9810:2814"
203 Enable yardstick virtual environment
204 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
205 Before executing yardstick test cases, make sure to activate yardstick
206 python virtual environment
209 source /opt/nsb_bin/yardstick_venv/bin/activate
212 Examples and verifying the install
213 ----------------------------------
215 It is recommended to verify that Yardstick was installed successfully
216 by executing some simple commands and test samples. Before executing yardstick
217 test cases make sure yardstick flavor and building yardstick-trusty-server
218 image can be found in glance and openrc file is sourced. Below is an example
219 invocation of yardstick help command and ping.py test sample:
223 yardstick task start samples/ping.yaml
225 Each testing tool supported by Yardstick has a sample configuration file.
226 These configuration files can be found in the **samples** directory.
228 Default location for the output is ``/tmp/yardstick.out``.
231 Run Yardstick - Network Service Testcases
232 -----------------------------------------
234 NS testing - using NSBperf CLI
235 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238 source /opt/nsb_setup/yardstick_venv/bin/activate
239 PYTHONPATH: ". ~/.bash_profile"
240 cd <yardstick_repo>/yardstick/cmd
241 Execute command: ./NSPerf.py -h
242 ./NSBperf.py --vnf <selected vnf> --test <rfc test>
243 eg: ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
245 NS testing - using yardstick CLI
246 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
249 source /opt/nsb_setup/yardstick_venv/bin/activate
250 PYTHONPATH: ". ~/.bash_profile"
251 Go to test case forlder type we want to execute.
252 e.g. <yardstick repo>/samples/vnf_samples/nsut/<vnf>/
253 run: yardstick --debug task start <test_case.yaml>