Skip to content

tng bench (osm driver) setup

Haydar Qarawlus edited this page Nov 26, 2019 · 19 revisions

This wiki page describes how to install tng-bench and run an demo examples with osm pdriver

Setup Openstack for OSM+TNG-Bench connection:

Please follow this guide https://github.com/CN-UPB/tng-sdk-benchmark/wiki/Setting-up-Openstack-for-OSM-TNG-Bench

Preparing the server for osm tng-bench

Some preperations might be required to make the server environment ready to work with new tng-bench

1. Setup VPN Network

All the 3 should be inside a local network

  1. tng-bench
  2. OSM
  3. OpenStack

More details on how to set up VPN here

2. Make sure OSM-VIM driver pointing to correct OpenStack

Goto OSM-GUI and from VIM Accounts sections make sure that it is pointing to correct OpenStack instance.

Make sure "Use floating ip" is set to "True" in "Config Paramters" while creating a new VIM Account

3. Install some system packages

  • libcurl4-gnutls-dev python-dev python3-dev
  • libgnutls-dev for Debian systems. libgnutls28-dev for ubuntu systems.

4. Preparing OSM server

juju and lxd need to be installed for OSM


Installation

Pre requisite

Installation of tng-bench requires python 3.x installed on system, else further instructions to get python working could be found at their official website.

Also, target machine should have git installed to pull latest tng-bench source

For our purposes we have used and tested installation on ubuntu-18-xenial

Installation Steps

  1. Get the tng-bench source on target machine and make it current working directory.
git clone https://github.com/CN-UPB/tng-sdk-benchmark.git
cd tng-sdk-benchmark

# Switch to dev branch
git checkout dev
  1. Create a python virtual environment to separate tng-bench python interpreter from system python
python3 -m venv venv
  1. Activate the virtual environment
source venv/bin/activate
  1. Build tng-bench from source
# Use either one of the following commands, either with develop or install
python setup.py develop
# python setup.py install

If all dependencies are installed without fatal errors, we should be good for the next step

  1. Test installation
tng-bench --help

If this generates and output, we can assume that installation went well.

Configuration

The tng-sdk-benchmark controller now needs to know where it can find our freshly installed execution platform OSM). To achieve this, go to the home folder cd ~/ and create a .tng-bench.conf file with the following content:

#
# tng-sdk-benchmark configuration file: ~/.tng-bench.conf
#
---
# list of target platform for bench. execution
targets:
  - name: default
    description: "osm on remote host"
    pdriver: osm  # type of target (vimemu, osm)
    pdriver_config:  # structure can be pdriver specific
      osm_host: <HOST_OR_IP_OF_OSM>  # <-- change here
      osm_port: 9999
      username: <USERNAME_OF_OSM>  # <-- change here
      password: <PASSWORD_OF_OSM>  # <-- change here
      project_id: <OSM_PROJECT_ID>  # <-- change here

      main_vm_username: <USERNAME_OF_MAIN_VM>  # <-- change here
      main_vm_password: <PASSWORD_OF_MAIN_VM>  # <-- change here
      probe_username: <USERNAME_OF_PROBE_VM>  # <-- change here
      probe_password: <PASSWORD_OF_PROBE_VM>  # <-- change here

Executing a sample example

Currently, tng-bench comes with a sample ped file which instantiates a minimal network service on OpenStack using dummy probes.

As of now dummy probes should work fine and we will refine them and update wiki as we make progress.

Make sure all steps from Installation section are followed and virtual environment is activated

From command-line

tng-bench --ped examples-osm/peds/ped_example_vnf.yml --generator osm

Setup vscode to run tng-bench

...

Later ..

During Execution

During execution tng-bench will evaluate the number of experiment configuration based on provided PED file and then try to instantiate those experiments configurations as separated network services one after another in a sequential manner.

If tng-bench execution reaches the Experiment execution stage, we should be able to see the new VNF and NS getting created and destroyed from either OSM or OpenStack GUI.

Post execution, all logs and monitoring data collected by prometheus should be captured in results directory


Happy Benchmarking :)


Side notes

  • Using ubuntu xenial 1604 images for VNFs prologes the experiment execution time
  • Using customized images for measurement points

ToDo

  • Post process monitoring data