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 Install Yardstick (NSB Testing)
57 -------------------------------
59 Refer chapter :doc:`04-installation` for more information on installing *Yardstick*
61 After *Yardstick* is installed, executing the "nsb_setup.sh" script to setup
68 It will also automatically download all the packages needed for NSB Testing setup.
73 .. code-block:: console
75 +----------+ +----------+
77 | | (0)----->(0) | Ping/ |
81 +----------+ +----------+
85 OpenStack parameters and credentials
86 ------------------------------------
91 Before running Yardstick (NSB Testing) it is necessary to export traffic
96 source ~/.bash_profile
99 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
104 vi /etc/yardstick/yardstick.conf
106 Add trex_path, trex_client_lib and bin_path in 'nsb' section.
112 dispatcher = influxdb
114 [dispatcher_influxdb]
116 target = http://{YOUR_IP_HERE}:8086
122 trex_path=/opt/nsb_bin/trex/scripts
123 bin_path=/opt/nsb_bin
124 trex_client_lib=/opt/nsb_bin/trex_client/stl
127 Config pod.yaml describing Topology
128 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130 Before executing Yardstick test cases, make sure that pod.yaml reflects the
131 topology and update all the required fields.
135 cp /etc/yardstick/nodes/pod.yaml.nsb.sample /etc/yardstick/nodes/pod.yaml
147 xe0: # logical name from topology.yaml and vnfd.yaml
149 driver: i40e # default kernel driver
151 local_ip: "152.16.100.20"
152 netmask: "255.255.255.0"
153 local_mac: "00:00:00:00:00:01"
154 xe1: # logical name from topology.yaml and vnfd.yaml
156 driver: i40e # default kernel driver
158 local_ip: "152.16.40.20"
159 netmask: "255.255.255.0"
160 local_mac: "00:00.00:00:00:02"
168 host: 1.1.1.2 #BM - host == ip, virtualized env - Host - compute node
170 xe0: # logical name from topology.yaml and vnfd.yaml
172 driver: i40e # default kernel driver
174 local_ip: "152.16.100.19"
175 netmask: "255.255.255.0"
176 local_mac: "00:00:00:00:00:03"
178 xe1: # logical name from topology.yaml and vnfd.yaml
180 driver: i40e # default kernel driver
182 local_ip: "152.16.40.19"
183 netmask: "255.255.255.0"
184 local_mac: "00:00:00:00:00:04"
186 - network: "152.16.100.20"
187 netmask: "255.255.255.0"
188 gateway: "152.16.100.20"
190 - network: "152.16.40.20"
191 netmask: "255.255.255.0"
192 gateway: "152.16.40.20"
195 - network: "0064:ff9b:0:0:0:0:9810:6414"
197 gateway: "0064:ff9b:0:0:0:0:9810:6414"
199 - network: "0064:ff9b:0:0:0:0:9810:2814"
201 gateway: "0064:ff9b:0:0:0:0:9810:2814"
204 Enable yardstick virtual environment
205 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207 Before executing yardstick test cases, make sure to activate yardstick
208 python virtual environment
212 source /opt/nsb_bin/yardstick_venv/bin/activate
215 Run Yardstick - Network Service Testcases
216 -----------------------------------------
218 NS testing - using NSBperf CLI
219 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 source /opt/nsb_setup/yardstick_venv/bin/activate
223 PYTHONPATH: ". ~/.bash_profile"
224 cd <yardstick_repo>/yardstick/cmd
226 Execute command: ./NSPerf.py -h
227 ./NSBperf.py --vnf <selected vnf> --test <rfc test>
228 eg: ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
230 NS testing - using yardstick CLI
231 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
234 source /opt/nsb_setup/yardstick_venv/bin/activate
235 PYTHONPATH: ". ~/.bash_profile"
237 Go to test case forlder type we want to execute.
238 e.g. <yardstick repo>/samples/vnf_samples/nsut/<vnf>/
239 run: yardstick --debug task start <test_case.yaml>