sonata-nfv / tng-sdk-benchmark

5GTANGO SDK tool for fully automated VNF and network service benchmarking and profiling.
https://5gtango.eu
Apache License 2.0
7 stars 10 forks source link

Difficulty at installing tng-sdk-benchmark #57

Closed efotopoulou closed 5 years ago

efotopoulou commented 5 years ago

Hi @all,

First of all congratulations for the tng-sdk-benchmark component and for the detailed documentation you provide. I am trying to install locally the "Setup execution platform (vim emu) tutorial".

Seems i get no problems until step 5. (https://github.com/sonata-nfv/tng-sdk-benchmark/wiki/Setup-execution-platform-(vim-emu)#5-verify-your-installation)

machine 1 returns me the following result after running the Ansible installer (step 4) and the response seems ok as seen at following file. ansibleresult.txt

When i try to verify my installation at step 5 i get the following error: machine2

it also seems that "Requirements and Assumptions" section (https://github.com/sonata-nfv/tng-sdk-benchmark/wiki/Setup-execution-platform-(vim-emu)#requirements-and-assumptions) misses the installation link for tng-sdk-benchmark at machine 1. Is it possible to have the exact commands or ansible playbook for installing the tng-sdk-benchmark at machine 1??

Thanks a lot in advance for your time, Eleni.

mpeuster commented 5 years ago

Hi Eleni, I have a look (tomorrow) and will come back to you.

Just one clarification to let me better understand your "local" setup: You run a VirtualBox VM (Ubuntu 18.04) on your laptop against which you executed the ansible script, right?

efotopoulou commented 5 years ago

Mi Manuel, Many thanks a lot for the prompt response! I run two virtual box VMs both with Ubuntu 16:04 LTS. First VM (Machine1) has ssh access to second VM (Machine2) using user tngbench. :-)

mpeuster commented 5 years ago

Ok, having those two VMs is great, because this follows exactly the intended setup for the tool 👍


On the second VM (the one with vim-emu) where the screen -r command fails. It seems that the ansible script, as described here, didn't start the vim-emu server correctly.

Can you try to start the server manually (as user tngbench) on VM2:

sudo tng-bench-emusrv

What is the output?


To install tng-sdk-bench on the first machine (VM1), you can do:

# cd into the tng-sdk-benchmark folder (cloned from here)
cd tng-sdk-benchmark
# create a Python virtualenv (to not collide with other installed Python tools)
which python3  # find out the path to your python3
# create a fresh virtualenv
virtualenv -p <path_to_python3> venv
# activate the virtualenv
source venv/bin/activate
# finally install tng-sdk-bench
python setup.py install

Remeber: You always have to activate the virtualenv if you want to use the tng-sdk-bench commandline tool: source venv/bin/activate.

After that you can try the installation using:

tng-bench -h

Once this work we can proceed with configuring the installation.

efotopoulou commented 5 years ago

Thanks a lot for your help! I was able to install successfully the sdk, tng-bench and vim-emu. Everything seems prepared according with the available wiki tutorial. Still, when executing a first benchmarking experiment , after executing the command:
tng-bench -p examples/peds/ped_suricata_tp_small.yml i get the following error: FileNotFoundError: [Errno 2] No such file or directory: '/home/5gtango/venv/lib/python3.5/site-packages/tngsdk.benchmark-0.1-py3.5.egg/tngsdk/benchmark/generator/template/tango_vnfd_mp.yml'

I checked the /home/5gtango/venv/lib/python3.5/site-packages/tngsdk.benchmark-0.1-py3.5.egg/tngsdk/benchmark/generator/ path and there is no template folder inside there.

Do i miss any installation command? Thanks a lot in advance! :-)

mpeuster commented 5 years ago

Good morning. Thanks for reporting. This may point to an actual bug. I will investigate this.

As a workaround, you can re-install tng-sdk-benchmark as follows:

(venv) python setup.py develop

This should solve the problem for now.

efotopoulou commented 5 years ago

Good morning! Thank you for your quick response! By executing the setup.py i faced some new error messages. Firstly i faced an importerror no module named numpy which i skipped by installing again numpy package as follows sudo apt-get update; sudo apt-get install python-pip python3-pip sudo pip install numpy; sudo pip3 install numpy After that i repeated the sudo python setup.py develop command and come up with the following output: Some warnings: (by the way the numpy package version is 1.16.1) numpy

And finally the following errror: numpy1

Hope above feedback helps you to solve the issue!

mpeuster commented 5 years ago

Ups, thats my fault.

Of course the python setup.py develop needs to be executed with the active venv not as sudo:

# cd into the tng-sdk-benchmark folder (cloned from here)
cd tng-sdk-benchmark
# create a Python virtualenv (to not collide with other installed Python tools)
which python3  # find out the path to your python3
# create a fresh virtualenv
virtualenv -p <path_to_python3> venv
# activate the virtualenv
source venv/bin/activate
# finally install tng-sdk-bench
python setup.py develop
efotopoulou commented 5 years ago

Thanks again for the quick response! Seems i was able to run a first benchmark report. You have done a great job!! :-):-):-)

tngbench i got the results folder generated with result_ec_metrics.csv and results_ts_metrics.csv

what exactly does it means the below error logs?

2019-02-15 11:39:30 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[27985] INFO Processing experiment metrics 1/2
2019-02-15 11:39:30 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[27985] ERROR Result corrupted: [Errno 2] No such file or directory: 'results/suricata_performance_00000/mn.mp.input.vdu01/tngbench_share/result.yml'                                                                                              
2019-02-15 11:39:30 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[27985] INFO Processing experiment metrics 2/2
2019-02-15 11:39:30 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[27985] ERROR Result corrupted: [Errno 2] No such file or directory: 'results/suricata_performance_00001/mn.mp.input.vdu01/tngbench_share/result.yml'      

Last but not least, do you see viable for next period to get the timeseries data exported at prometheus?? In such case we can bind them directly with the tng-profiler that also serves sp and V&V!

mpeuster commented 5 years ago

Hey! Great! So your principle setup works. The errors indicate that there was a problem when some of the results should be collected. Maybe some of the latest changes is missing. But let me investigate a bit further before I suggest a fix.

Just one question: When were both of the machines installed? One after each other or was the executor already installed 1-2 weeks ago? This might be a cause of the problem.

Regarding Prometheus: I don't think an adaptor to push data to Prometheus is too hard to build. So we might be able to do something until the April meeting :-) Do you have any information for me in which format you would expect the TS data in Prometheus? Examples?

mpeuster commented 5 years ago

One option to solve the above error could be: https://github.com/sonata-nfv/tng-sdk-benchmark/issues/66

I will work on a patch later. If this does not help, the problem is most probably a version problem as mention in my previous comment. Let me know.

efotopoulou commented 5 years ago

Hi Manuel! i installed both machines 5 days ago at two fresh virtual machines in our infrastructures. I also removed manually the results folder as mentioned at issue #66 before running a new benchmarking experiment. However the --rd results was not recognized as argument:

(venv) 5gtango@SSDK:~/tng-sdk-benchmark$ tng-bench -p examples/peds/ped_suricata_tp_small_ubi.yml --rd results
usage: tng-bench [-h] [-v] [--loglevel LOG_LEVEL] [--logjson] -p PED
                 [-c CONFIGFILE] [--work-dir WORK_DIR] [-rd RESULT_DIR]
                 [--no-generation] [--no-population] [--no-execution]
                 [--no-result] [--hold] [--max-experiments MAX_EXPERIMENTS]
                 [--no-display] [--generator SERVICE_GENERATOR]
                 [--ibbd IBBD_DIR]
tng-bench: error: unrecognized arguments: --rd results

i executed again a benchmarking test and got the same error. (the results folder is generated succesfully with the timeseries data)

2019-02-19 09:46:34 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[12508] INFO Processing experiment metrics 1/2
2019-02-19 09:46:34 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[12508] ERROR Result corrupted: [Errno 2] No such file or directory: 'results/suricata_performance_00000/mn.mp.input.vdu01/tngbench_share/result.yml'                                        
2019-02-19 09:46:34 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[12508] INFO Processing experiment metrics 2/2
2019-02-19 09:46:34 SSDK tngbench.tngsdk.benchmark.resultprocessor.vimemu[12508] ERROR Result corrupted: [Errno 2] No such file or directory: 'results/suricata_performance_00001/mn.mp.input.vdu01/tngbench_share/result.yml'    

if you need some more logs info or and ad-hoc call so as to give you more details, you are more than welcome! I provide some extra info about prometheus at the relevant issue #56

mpeuster commented 5 years ago

Super many thanks for the detailed feedback in #56. Will work on it soon.

Regarding: --rd it was a typo. Needs to be -rd RESULT_DIR (one dash).

Regarding versions, I am heavily working on both tools tng-sdk-benchmark and vim-emu these days (there are even some other guys working on vim-emu right now), so there will be many updates that might fix (or break smaller things :-P). However, I am also preparing some test experiments which will help to get a more stable version of the tools soon.

If you want to update to the latest master, you can follow this wiki page (which i finalise in the next hour).

The errors you see should not affect the TS data collection as you correctly noticed. They come from the probe result collector.

I keep you updated.

mpeuster commented 5 years ago

Ok, wiki page that explains how to update without full re-installation is ready: https://github.com/sonata-nfv/tng-sdk-benchmark/wiki/Update-tng-sdk-benchmark-installations

efotopoulou commented 5 years ago

great and very useful documentation @mpeuster ! i close the current issue since i think is fully addressed. Thanks a lot for your support and time!