Merge "Setup hugepages on SA host(sriov, ovs_dpdk)"
[yardstick.git] / docs / testing / user / userguide / 13-nsb-installation.rst
index 3e0ed0b..973d566 100644 (file)
@@ -1,14 +1,25 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International
 .. License.
 .. http://creativecommons.org/licenses/by/4.0
-.. (c) OPNFV, 2016-2017 Intel Corporation.
+.. (c) OPNFV, 2016-2018 Intel Corporation.
+
+..
+   Convention for heading levels in Yardstick documentation:
+
+   =======  Heading 0 (reserved for the title in a document)
+   -------  Heading 1
+   ~~~~~~~  Heading 2
+   +++++++  Heading 3
+   '''''''  Heading 4
+
+   Avoid deeper levels because they do not render well.
 
 =====================================
 Yardstick - NSB Testing -Installation
 =====================================
 
 Abstract
-========
+--------
 
 The Network Service Benchmarking (NSB) extends the yardstick framework to do
 VNF characterization and benchmarking in three different execution
@@ -27,7 +38,7 @@ The steps needed to run Yardstick with NSB testing are:
 
 
 Prerequisites
-=============
+-------------
 
 Refer chapter Yardstick Installation for more information on yardstick
 prerequisites
@@ -46,7 +57,7 @@ Several prerequisites are needed for Yardstick (VNF testing):
   * intel-cmt-cat
 
 Hardware & Software Ingredients
--------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 SUT requirements:
 
@@ -85,7 +96,7 @@ Boot and BIOS settings:
 
 
 Install Yardstick (NSB Testing)
-===============================
+-------------------------------
 
 Download the source code and install Yardstick from it
 
@@ -118,7 +129,7 @@ Ansible:
 
 .. code-block:: ini
 
-  cat ./ansible/yardstick-install-inventory.ini
+  cat ./ansible/install-inventory.ini
   [jumphost]
   localhost  ansible_connection=local
 
@@ -138,7 +149,7 @@ Ansible:
 .. note::
 
    SSH access without password needs to be configured for all your nodes defined in
-   ``yardstick-install-inventory.ini`` file.
+   ``install-inventory.ini`` file.
    If you want to use password authentication you need to install sshpass
 
    .. code-block:: console
@@ -168,8 +179,12 @@ It will also automatically download all the packages needed for NSB Testing
 setup. Refer chapter :doc:`04-installation` for more on docker
 **Install Yardstick using Docker (recommended)**
 
-System Topology:
-================
+Another way to execute an installation for a Bare-Metal or a Standalone context
+is to use ansible script ``install.yaml``. Refer chapter :doc:`04-installation`
+for more details.
+
+System Topology
+---------------
 
 .. code-block:: console
 
@@ -184,10 +199,10 @@ System Topology:
 
 
 Environment parameters and credentials
-======================================
+--------------------------------------
 
 Config yardstick conf
----------------------
+~~~~~~~~~~~~~~~~~~~~~
 
 If user did not run 'yardstick env influxdb' inside the container, which will
 generate correct ``yardstick.conf``, then create the config file manually (run
@@ -218,11 +233,11 @@ Add trex_path, trex_client_lib and bin_path in 'nsb' section.
   trex_client_lib=/opt/nsb_bin/trex_client/stl
 
 Run Yardstick - Network Service Testcases
-=========================================
+-----------------------------------------
 
 
 NS testing - using yardstick CLI
---------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
   See :doc:`04-installation`
 
@@ -235,13 +250,13 @@ NS testing - using yardstick CLI
   yardstick --debug task start yardstick/samples/vnf_samples/nsut/<vnf>/<test case>
 
 Network Service Benchmarking - Bare-Metal
-=========================================
+-----------------------------------------
 
 Bare-Metal Config pod.yaml describing Topology
-----------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Bare-Metal 2-Node setup
-^^^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++++
 .. code-block:: console
 
   +----------+              +----------+
@@ -254,7 +269,7 @@ Bare-Metal 2-Node setup
   trafficgen_1                   vnf
 
 Bare-Metal 3-Node setup - Correlated Traffic
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++++++++++
 .. code-block:: console
 
   +----------+              +----------+            +------------+
@@ -269,7 +284,7 @@ Bare-Metal 3-Node setup - Correlated Traffic
 
 
 Bare-Metal Config pod.yaml
---------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~
 Before executing Yardstick test cases, make sure that pod.yaml reflects the
 topology and update all the required fields.::
 
@@ -344,26 +359,61 @@ topology and update all the required fields.::
 
 
 Network Service Benchmarking - Standalone Virtualization
-========================================================
+--------------------------------------------------------
 
 SR-IOV
-------
+~~~~~~
 
 SR-IOV Pre-requisites
-^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++
+
+On Host, where VM is created:
+ a) Create and configure a bridge named ``br-int`` for VM to connect to external network.
+    Currently this can be done using VXLAN tunnel.
 
-On Host:
- a) Create a bridge for VM to connect to external network
+    Execute the following on host, where VM is created:
 
   .. code-block:: console
 
+      ip link add type vxlan remote <Jumphost IP> local <DUT IP> id <ID: 10> dstport 4789
       brctl addbr br-int
-      brctl addif br-int <interface_name>    #This interface is connected to internet
+      brctl addif br-int vxlan0
+      ip link set dev vxlan0 up
+      ip addr add <IP#1, like: 172.20.2.1/24> dev br-int
+      ip link set dev br-int up
+
+  .. note:: May be needed to add extra rules to iptable to forward traffic.
+
+  .. code-block:: console
+
+    iptables -A FORWARD -i br-int -s <network ip address>/<netmask> -j ACCEPT
+    iptables -A FORWARD -o br-int -d <network ip address>/<netmask> -j ACCEPT
+
+  Execute the following on a jump host:
 
- b) Build guest image for VNF to run.
+  .. code-block:: console
+
+      ip link add type vxlan remote <DUT IP> local <Jumphost IP> id <ID: 10> dstport 4789
+      ip addr add <IP#2, like: 172.20.2.2/24> dev vxlan0
+      ip link set dev vxlan0 up
+
+  .. note:: Host and jump host are different baremetal servers.
+
+ b) Modify test case management CIDR.
+    IP addresses IP#1, IP#2 and CIDR must be in the same network.
+
+  .. code-block:: YAML
+
+    servers:
+      vnf:
+        network_ports:
+          mgmt:
+            cidr: '1.1.1.7/24'
+
+ c) Build guest image for VNF to run.
     Most of the sample test cases in Yardstick are using a guest image called
-    ``yardstick-image`` which deviates from an Ubuntu Cloud Server image
-    Yardstick has a tool for building this custom image with samplevnf.
+    ``yardstick-nsb-image`` which deviates from an Ubuntu Cloud Server image
+    Yardstick has a tool for building this custom image with SampleVNF.
     It is necessary to have ``sudo`` rights to use this tool.
 
     Also you may need to install several additional packages to use this tool, by
@@ -386,10 +436,10 @@ On Host:
 
 
 SR-IOV Config pod.yaml describing Topology
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++++++++
 
-SR-IOV 2-Node setup:
-^^^^^^^^^^^^^^^^^^^^
+SR-IOV 2-Node setup
++++++++++++++++++++
 .. code-block:: console
 
                                +--------------------+
@@ -417,7 +467,7 @@ SR-IOV 2-Node setup:
 
 
 SR-IOV 3-Node setup - Correlated Traffic
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++++++
 .. code-block:: console
 
                                +--------------------+
@@ -453,7 +503,7 @@ topology and update all the required fields.
 .. note:: Update all the required fields like ip, user, password, pcis, etc...
 
 SR-IOV Config pod_trex.yaml
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++++++++
 
 .. code-block:: YAML
 
@@ -482,7 +532,7 @@ SR-IOV Config pod_trex.yaml
                 local_mac: "00:00.00:00:00:02"
 
 SR-IOV Config host_sriov.yaml
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++++++++++
 
 .. code-block:: YAML
 
@@ -498,7 +548,7 @@ SR-IOV testcase update:
 ``<yardstick>/samples/vnf_samples/nsut/vfw/tc_sriov_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
 
 Update "contexts" section
-"""""""""""""""""""""""""
+'''''''''''''''''''''''''
 
 .. code-block:: YAML
 
@@ -543,23 +593,58 @@ Update "contexts" section
 
 
 OVS-DPDK
---------
+~~~~~~~~
 
 OVS-DPDK Pre-requisites
-^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~
+
+On Host, where VM is created:
+ a) Create and configure a bridge named ``br-int`` for VM to connect to external network.
+    Currently this can be done using VXLAN tunnel.
 
-On Host:
- a) Create a bridge for VM to connect to external network
+    Execute the following on host, where VM is created:
 
   .. code-block:: console
 
+      ip link add type vxlan remote <Jumphost IP> local <DUT IP> id <ID: 10> dstport 4789
       brctl addbr br-int
-      brctl addif br-int <interface_name>    #This interface is connected to internet
+      brctl addif br-int vxlan0
+      ip link set dev vxlan0 up
+      ip addr add <IP#1, like: 172.20.2.1/24> dev br-int
+      ip link set dev br-int up
+
+  .. note:: May be needed to add extra rules to iptable to forward traffic.
+
+  .. code-block:: console
+
+    iptables -A FORWARD -i br-int -s <network ip address>/<netmask> -j ACCEPT
+    iptables -A FORWARD -o br-int -d <network ip address>/<netmask> -j ACCEPT
 
- b) Build guest image for VNF to run.
+  Execute the following on a jump host:
+
+  .. code-block:: console
+
+      ip link add type vxlan remote <DUT IP> local <Jumphost IP> id <ID: 10> dstport 4789
+      ip addr add <IP#2, like: 172.20.2.2/24> dev vxlan0
+      ip link set dev vxlan0 up
+
+  .. note:: Host and jump host are different baremetal servers.
+
+ b) Modify test case management CIDR.
+    IP addresses IP#1, IP#2 and CIDR must be in the same network.
+
+  .. code-block:: YAML
+
+    servers:
+      vnf:
+        network_ports:
+          mgmt:
+            cidr: '1.1.1.7/24'
+
+ c) Build guest image for VNF to run.
     Most of the sample test cases in Yardstick are using a guest image called
-    ``yardstick-image`` which deviates from an Ubuntu Cloud Server image
-    Yardstick has a tool for building this custom image with samplevnf.
+    ``yardstick-nsb-image`` which deviates from an Ubuntu Cloud Server image
+    Yardstick has a tool for building this custom image with SampleVNF.
     It is necessary to have ``sudo`` rights to use this tool.
 
     Also you may need to install several additional packages to use this tool, by
@@ -585,11 +670,10 @@ On Host:
 
 
 OVS-DPDK Config pod.yaml describing Topology
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++++++++++
 
 OVS-DPDK 2-Node setup
-^^^^^^^^^^^^^^^^^^^^^
-
++++++++++++++++++++++
 
 .. code-block:: console
 
@@ -619,7 +703,7 @@ OVS-DPDK 2-Node setup
 
 
 OVS-DPDK 3-Node setup - Correlated Traffic
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++++++++
 
 .. code-block:: console
 
@@ -659,7 +743,7 @@ topology and update all the required fields.
 .. note:: Update all the required fields like ip, user, password, pcis, etc...
 
 OVS-DPDK Config pod_trex.yaml
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++++++++++
 
 .. code-block:: YAML
 
@@ -687,7 +771,7 @@ OVS-DPDK Config pod_trex.yaml
               local_mac: "00:00.00:00:00:02"
 
 OVS-DPDK Config host_ovs.yaml
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++++++++++
 
 .. code-block:: YAML
 
@@ -703,7 +787,7 @@ ovs_dpdk testcase update:
 ``<yardstick>/samples/vnf_samples/nsut/vfw/tc_ovs_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
 
 Update "contexts" section
-"""""""""""""""""""""""""
+'''''''''''''''''''''''''
 
 .. code-block:: YAML
 
@@ -758,7 +842,7 @@ Update "contexts" section
 
 
 Network Service Benchmarking - OpenStack with SR-IOV support
-============================================================
+------------------------------------------------------------
 
 This section describes how to run a Sample VNF test case, using Heat context,
 with SR-IOV. It also covers how to install OpenStack in Ubuntu 16.04, using
@@ -766,7 +850,7 @@ DevStack, with SR-IOV support.
 
 
 Single node OpenStack setup with external TG
---------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code-block:: console
 
@@ -797,7 +881,7 @@ Single node OpenStack setup with external TG
 
 
 Host pre-configuration
-^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++
 
 .. warning:: The following configuration requires sudo access to the system. Make
   sure that your user have the access.
@@ -852,7 +936,7 @@ Setup system proxy (if needed). Add the following configuration into the
 ``/etc/environment`` file:
 
 .. note:: The proxy server name/port and IPs should be changed according to
-  actuall/current proxy configuration in the lab.
+  actual/current proxy configuration in the lab.
 
 .. code:: bash
 
@@ -880,7 +964,7 @@ Install dependencies needed for the DevStack
 
 Setup SR-IOV ports on the host:
 
-.. note:: The ``enp24s0f0``, ``enp24s0f0`` are physical function (PF) interfaces
+.. note:: The ``enp24s0f0``, ``enp24s0f1`` are physical function (PF) interfaces
   on a host and ``enp24s0f3`` is a public interface used in OpenStack, so the
   interface names should be changed according to the HW environment used for
   testing.
@@ -897,7 +981,7 @@ Setup SR-IOV ports on the host:
 
 
 DevStack installation
-^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++
 
 Use official `Devstack <https://docs.openstack.org/devstack/pike/>`_
 documentation to install OpenStack on a host. Please note, that stable
@@ -919,7 +1003,7 @@ Start the devstack installation on a host.
 
 
 TG host configuration
-^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++
 
 Yardstick automatically install and configure Trex traffic generator on TG
 host based on provided POD file (see below). Anyway, it's recommended to check
@@ -928,7 +1012,7 @@ the manual at https://trex-tgn.cisco.com/trex/doc/trex_manual.html.
 
 
 Run the Sample VNF test case
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++
 
 There is an example of Sample VNF test case ready to be executed in an
 OpenStack environment with SR-IOV support: ``samples/vnf_samples/nsut/vfw/
@@ -953,7 +1037,7 @@ context using steps described in `NS testing - using yardstick CLI`_ section.
 
 
 Multi node OpenStack TG and VNF setup (two nodes)
--------------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code-block:: console
 
@@ -984,14 +1068,14 @@ Multi node OpenStack TG and VNF setup (two nodes)
 
 
 Controller/Compute pre-configuration
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++++++++++++++++
 
 Pre-configuration of the controller and compute hosts are the same as
 described in `Host pre-configuration`_ section. Follow the steps in the section.
 
 
 DevStack configuration
-^^^^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++++
 
 Use official `Devstack <https://docs.openstack.org/devstack/pike/>`_
 documentation to install OpenStack on a host. Please note, that stable
@@ -1018,7 +1102,7 @@ Start the devstack installation on the controller and compute hosts.
 
 
 Run the sample vFW TC
-^^^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++++
 
 Install yardstick using `Install Yardstick (NSB Testing)`_ steps for OpenStack
 context.
@@ -1035,10 +1119,10 @@ and the following yardtick command line arguments:
 
 
 Enabling other Traffic generator
-================================
+--------------------------------
 
 IxLoad
-^^^^^^
+~~~~~~
 
 1. Software needed: IxLoadAPI ``<IxLoadTclApi verson>Linux64.bin.tgz`` and
    ``<IxOS version>Linux64.bin.tar.gz`` (Download from ixia support site)
@@ -1079,7 +1163,7 @@ IxLoad
    ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml``
 
 IxNetwork
----------
+~~~~~~~~~
 
 IxNetwork testcases use IxNetwork API Python Bindings module, which is
 installed as part of the requirements of the project.
@@ -1108,3 +1192,52 @@ installed as part of the requirements of the project.
 
 3. Execute testcase in samplevnf folder e.g.
    ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml``
+
+Spirent Landslide
+-----------------
+
+In order to use Spirent Landslide for vEPC testcases, some dependencies have
+to be preinstalled and properly configured.
+
+- Java
+
+    32-bit Java installation is required for the Spirent Landslide TCL API.
+
+    | ``$ sudo apt-get install openjdk-8-jdk:i386``
+
+    .. important::
+      Make sure ``LD_LIBRARY_PATH`` is pointing to 32-bit JRE. For more details
+      check `Linux Troubleshooting <http://TAS_HOST_IP/tclapiinstall.html#trouble>`
+      section of installation instructions.
+
+- LsApi (Tcl API module)
+
+    Follow Landslide documentation for detailed instructions on Linux
+    installation of Tcl API and its dependencies
+    ``http://TAS_HOST_IP/tclapiinstall.html``.
+    For working with LsApi Python wrapper only steps 1-5 are required.
+
+    .. note:: After installation make sure your API home path is included in
+      ``PYTHONPATH`` environment variable.
+
+    .. important::
+    The current version of LsApi module has an issue with reading LD_LIBRARY_PATH.
+    For LsApi module to initialize correctly following lines (184-186) in
+    lsapi.py
+
+    .. code-block:: python
+
+        ldpath = os.environ.get('LD_LIBRARY_PATH', '')
+        if ldpath == '':
+         environ['LD_LIBRARY_PATH'] = environ['LD_LIBRARY_PATH'] + ':' + ldpath
+
+    should be changed to:
+
+    .. code-block:: python
+
+        ldpath = os.environ.get('LD_LIBRARY_PATH', '')
+        if not ldpath == '':
+               environ['LD_LIBRARY_PATH'] = environ['LD_LIBRARY_PATH'] + ':' + ldpath
+
+.. note:: The Spirent landslide TCL software package needs to be updated in case
+  the user upgrades to a new version of Spirent landslide software.