Code Monkey home page Code Monkey logo

tng-sdk-benchmark's Introduction

Join the chat at https://gitter.im/sonata-nfv/Lobby Build Status

5GTANGO VNF/NS Benchmarking Framework

This repository contains the tng-sdk-benchmark component that is part of the European H2020 project 5GTANGO NFV SDK. This component is responsible to automatically execute performance benchmarks of NFV network services and functions.

The seed code of this component is based on the son-cli toolbox, specifically the son-profile tool, which was developed as part of the European H2020 project SONATA.

Cite this Work

If you use this tool for your research, publications, or NFV projects, please consider to cite the following paper:

@inproceedings{peuster2017chainprofiling,
	Author = {Peuster, Manuel and Karl, Holger},
	Booktitle = {2017 IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN)},
	Month = {Nov},
	Pages = {1-6},
	Title = {Profile your chains, not functions: Automated network service profiling in DevOps environments},
	Year = {2017}}

References

Installation

Please follow this guide to install and setup tng-sdk-benchmark and a corresponding execution environment.

OSM Client requirements

The OSM Client built into tng-bench requires the following packages, which can be installed as follows:

apt-get install libcurl4-gnutls-dev libgnutls28-dev 

Usage

tng-bench --ped examples-osm/peds/ped_example_vnf.yml \
	--ibbd /tmp/bds --generator osm \
	--config .tng-bench.conf

Run a benchmarking experiment

Before you can run your first benchmarking experiment, you need to install tng-bench and an execution platform following this guide.

tng-bench -p examples/peds/ped_suricata_tp_small.yml

Manually re-run the result processing

Runs the result processing module using existing results. This step is also automatically performed once at the end of an experiment execution.

# manually trigger result processing of generated results (to create *.csv files)
tng-bench-result -rd results/  

Development

To contribute to the development of this 5GTANGO component, you may use the very same development workflow as for any other 5GTANGO Github project. That is, you have to fork the repository and create pull requests.

Setup development environment

$ python setup.py develop

CI Integration

All pull requests are automatically tested by Jenkins and will only be accepted if no test is broken.

Run tests manually

You can also run the test manually on your local machine. To do so, you need to do:

$ pytest -v

License

This 5GTANGO component is published under Apache 2.0 license. Please see the LICENSE file for more details.


Lead Developers

The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.

Feedback-Chanel

  • Please use the GitHub issues to report bugs.
  • You may use the mailing list [email protected]

tng-sdk-benchmark's People

Contributors

avimehenwal avatar bsharma021 avatar harshita-puri avatar qarawlus avatar suganthijagan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tng-sdk-benchmark's Issues

Research tng-bench source code

Research and experiment with the tng-bench source code and write ideas on how a development with OSM can take place and which functionality should be added.

Integration and Bug Fixes

From now we should monitor the integration process with the benchmarking team.

This issue is designed to track bug fixes and updates done to the tng-bench tool. Major bugs should have their own issues.

Modify experiment class to handle and generate OSM experiments

This issue is pending on #10
Main task: Update Experiment classes to handle OSM PED file.
Another thing to do is to make sure that the experiment that is generated is exactly the same as OSM VNFD and NSD formats.

Initial Deadline (hopefully not broken): 23.09.2019

Modify cloud VMs to install packages

To provide better documentation of the benchmarking process using VMs, we should try and preinstall software on Openstack images before they are deployed. This should considerably speed up the experiment times since the images are deployed with the required software, and not installed during the execution of the cloudinit script.

The process of the modification with regards to our scenario should also be well documented.

Move osmclient outside of tngsdk folder

It was a technical mistake to add the osmclient files under the tngsdk folder.

For correctness and to make pytests run correctly as well, we must move the folder outside the tngsdk folder and put it in the same directory tree level as the tng sdk folder.

Create OSM NSD file generator

Handle existing NSD files and add the probe connection points to the NSD.

Example from PED file:

 - function: "mp.input"
        # loop longer than experiment lasts
        cmd_start: ["tcpreplay -i data -tK --loop 1000 --preload-pcap /pcaps/smallFlows.pcap"]
        cmd_stop: "./stop.sh"
        # cpu_bw: null  # float: fraction of CPU time in vim-emu (In OSM no need for this)
        cpu_cores: 1  # string: this is "cpuset_cpu" in vim-emu e.g. ["0, 1"] -> 2 CPUs
        mem_max: 1024  # int: Memory in MByte
        # mem_swap_max: null
        # io_bw: null
      - function: "mp.output"
        cmd_start: null
        cmd_stop: "./stop.sh"  # dump packet counters to logs
        # cpu_bw: null  # float: fraction of CPU time in vim-emu (In Openstack no need for this)
        cpu_cores: 1  # string: this is "cpuset_cpu" in vim-emu e.g. ["0, 1"] -> 2 CPUs
        mem_max: 1024  # int: Memory in MByte
        # mem_swap_max: null
        # io_bw: null

This would require that a probe is added to the input of the NSD (i.e. before the first VNF) and a probe to be added to the end of the NSD.

constituent-vnfd:
        -   vnfd-id-ref: hackfest-simplecharm-vnf
            member-vnf-index: '1'
        -   vnfd-id-ref: hackfest-simplecharm-vnf
            member-vnf-index: '2'

DEADLINE: Mon. 14.10.2019 - 08:00

Modify probe (mp) VNFDs in addition to the main VNFD

The OSM generator should also modify the VNFD for the measurement points (probes) according to the parameters provided in the PED file.

The VNFD file is passed already to the generator and is stored in the experiment class. The next task is to pass it to the modifier function to correctly handle the file and modify it.

Write OSM driver design document

After writing initial ideas is finished, the driver design document should be written.

It should contain the following (list can be updated):

  • Expected technical architecture to be used
  • Style of development
  • Expected API calls
  • Flow diagrams

@team Feel free to add more items if you think I missed something.

Fix Openstack!

Openstack on VM-2 is not working. Issue with OpenVSwitch and q-agent.

Fix is needed ASAP.

Added VNFD Generator using the OSM format

Tng-bench is using a tango descriptor generator to modify VNFD and NSD files, we will have to create a new generator to allow for the creation of OSM format files.

This is currently in backlog! Let's focus on working with static VNFD and NSD for now. No one is assigned for this task as of 23.09.2019

Deploy a fixed test network in OSM

Deploy a test network in OSM so that we can know the right configuration.
The network should consist of the following:

  • One VNF: Any VNF should do here. Perhaps Suricata as it will be the one we will use for testing our code and driver connection to OSM.
  • Two probes: One probe should be on the input side of the VNF, the other should be on the output side. A simple probe here will do more than fine. Any container or VM having TCPreplay or iperf that dumps traffic through the main VNF. The source VNF should be the originator of traffic, and the sink should collect the information that gets passed through.

The purpose of this issue is to be familiar with creating a valid and correct OSM topology that we can then later use to create a correct topology using tng-bench that allows the probes to correctly connect to the main VNF or VNF chain and generate correct benchmarking results.

DEADLINE: 13.09.2019
Please finish the issue before the deadline.

Deploy VNFs in OSM from the processed PED file

Depends on #10 and #11
Deploy the VNFs after the PED file is processed and the experiment is generated.

Right now just focus on deploying and deleting the experiment. No need to SSH into the VNF images and run commands.

Initial Deadline: 26.09.2019

Run tng-bench from docker

Make it easy for user to install and run tng-bench from any linux based machine with just one command as a container.

Update PED file for OSM deployment requirements

Update the tng-bench ped files and create a version that provides the correct parameters to deploy a benchmarking experiment in OSM.

Initial thoughts:
The file should have the following main sections:

  • VNFD identifier: the filename or the OSM VNFD identifier. This is the part where the virtual network function is defined.
  • NSD Identifier (optional): If left blank, tng-bench should generate this based on the information from the probes section in the ped. The NSD provides information on how the VNF or VNF chain is connected internally, and possibly to the probes.
  • Type of experiment.
  • Probes: How many probes to connect to the VNF and how.

This list might be updated later on. Updates will be clearly marked.

DEADLINE: 15.09.2019

Correct osmclient library output to be inline with tng-bench logging

The OsmClient library that we integrated into our repo uses print statements to output the status of the operations that it is doing. This is not in line with the output standard used by tng-bench. The library should be modified to produce a logging output instead of simple print statements.

Research OSM API connection

Research and experiment with the OSM API connection and write ideas on how a possible connection can be created with tng-bench

Deploy a static VNF/NS using tng-bench

Deploy a static VNF/NS using tng-bench. We do not need to create and run any benchmarking tests now, deploying a static VNFD and NSD file and destroying the VNF after tng-bench finishes running.

Experiment with unit tests

Now that we have our initial connection ready, we should also start considering unit tests. For this reasons, we should try and see which part of the code can be unit tested.

ImportError: cannot import name 'cached_property'

(venv) avi@fgcn-backflip2:~/tng-sdk-benchmark$ cat error_chached_property.log 
(venv) avi@fgcn-backflip2:~/tng-sdk-benchmark$ tng-bench --help
Traceback (most recent call last):
  File "/home/avi/tng-sdk-benchmark/venv/bin/tng-bench", line 11, in <module>
    load_entry_point('tngsdk.benchmark==5.0.0', 'console_scripts', 'tng-bench')()
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/tngsdk.benchmark-5.0.0-py3.6.egg/tngsdk/benchmark/__init__.py", line 45, in <module>
    from tngsdk.benchmark.generator.tango \
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/tngsdk.benchmark-5.0.0-py3.6.egg/tngsdk/benchmark/generator/tango.py", line 39, in <module>
    import tngsdk.package as tngpkg
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/tngsdk.package-5.1-py3.6.egg/tngsdk/package/__init__.py", line 36, in <module>
    from tngsdk.package import rest, cli
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/tngsdk.package-5.1-py3.6.egg/tngsdk/package/rest.py", line 38, in <module>
    from flask_restplus import Resource, Api, Namespace
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/flask_restplus-0.13.0-py3.6.egg/flask_restplus/__init__.py", line 4, in <module>
    from . import fields, reqparse, apidoc, inputs, cors
  File "/home/avi/tng-sdk-benchmark/venv/lib/python3.6/site-packages/flask_restplus-0.13.0-py3.6.egg/flask_restplus/fields.py", line 17, in <module>
    from werkzeug import cached_property
ImportError: cannot import name 'cached_property'

(venv) avi@fgcn-backflip2:~/tng-sdk-benchmark$ 

Delete VNFD and NSD file on KeyboardInterrupt

Tng-bench should try and delete the files it uploaded when it senses a keyboard interrupt before the experiment finishes. This is to reduce the annoyance of having to go to OSM and deleting the VNFD and NSD from there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.