Installation - JuliaOli/SDN-Monitor GitHub Wiki
Getting your monitor started with Mininet + Onos + Influx + Grafana
First step is to make sure that you are running with python 3, therefor we can simply run a python virtual environment. Virtualenv, a simple and powerful tool that allows you to create isolated Python development environments, that is, makes it possible to use multiple libraries in the same environment without conflicts between them.
Install Pipenv
$ sudo pip install virtualenv
To create a new environment containing the version of Python of your choice (Python 2.x or Python 3.x), we must inform virtualenv, when creating a new environment, the location of the Python binary.
If you do not know the path of the Python binary you are looking for, use the which command.
For example, to find out where the Python 3 binary was on my machine, I ran the command which python3 which answered me with / usr / local / bin / python3.
This allows us to create our new environment using python3 as follows:
$ virtualenv --python='/usr/local/bin/python3' ENV
Initialize a virtual environment
$ virtualenv [opções] <nome_da_pasta>
Virtual Environment Activation Script
$ source ENV/bin/activate
How to Disable Your Virtual Environment
$ deactivate
If you want to remove everything that was done and installed, returning to the previous system state (without virtualenv) just run:
$ deactivate
Install Mininet
Mininet creates a realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native).
$ sudo pip install mininet
Then test i by running the command:
$ sudo mn -- test pingall
If it doesn't work your can install native from Source. Follow the tutorial in the Mininet website.
Install ONOS
This Quick Start describes a simple "local" workflow where you build and run ONOS on a single development machine. You can find the full tutorial in the Onos page. First of all, you should install Bazel, we will use Bazel to build and run ONOS.Make sure you are using the minimum required version of Bazel, at the time of writing is 1.0.
Some other dependencies are required as well.
git
zip
curl
unzip
python # 2.7 required by some development scripts
python3 # Required by Bazel
bzip2 # Needed by legacy GUI build
Get ONOS code
git clone https://gerrit.onosproject.org/onos
cd onos
bazel build onos
The above command will create a local installation from the onos.tar.gz file (re-building it if necessary) and will start the ONOS server in the background.
Code Time!
Run ONOS
bazel run onos-local -- clean debug
# 'clean' to delete all previous running status
# 'debug' to enable remote debugging
Once the ONOS server start running attach to the ONOS CLI console, run:
$ tools/test/bin/onos localhost
Once connected, you can run various ONOS CLI and Apache Karaf commands:
onos> app activate org.onosproject.openflow
onos> app activate org.onosproject.fwd
Next step is to start up a Mininet network controlled by an ONOS instance that is already running on your development machine. Choose the best topology for your network (check the example in the repository ).