One time setup for use in Grid’5000#
Website: https://discovery.gitlabpages.inria.fr/enoslib/index.html
Instant chat: https://framateam.org/enoslib
Source code: https://gitlab.inria.fr/discovery/enoslib
Prerequisites:
Connect to this Jupyter lab instance https://intranet.grid5000.fr/notebooks
Host the instance on the frontend or a node
Clone the enoslib tutorias source:
git clone https://gitlab.inria.fr/msimonin/enoslib-tutorials
somewhere in your home directoryOpen this notebook at
enoslib-tutorials/
Software dependencies#
First things first, you’ll need EnOSlib library to go through this tutorial. - EnOSlib is installed by default, but might not be the latest version - If you want to install the latest version, follow the steps below
Installing the latest version of EnOSlib (might be wild :) )#
This installs EnOSlib from the latest version (+ some extra libs) in a virtual environment and install a new Jupyter kernel.
[ ]:
%%bash
virtualenv -p python3 my_venv
source my_venv/bin/activate
python3 -m pip install -U git+https://gitlab.inria.fr/discovery/enoslib
python3 -m pip install matplotlib seaborn pandas scapy
python3 -m pip install ipykernel
python3 -m ipykernel install --user --name my_venv
Optional setup if jupyter is hosted on a node#
Regarding the access to the REST API, a node on G5k is considered to belong to the external world. So you need to set your credentials to be able to connect to the REST API.
Do this if your jupyter instance is hosted in a dedicated node
[ ]:
from grid5000.cli import auth
# CHANGE THE LOGIN!
auth("msimonin")
Checking the library#
The following must succeed after switching to the new kernel my_venv
[ ]:
# This must not fail (restart the kernel after installing the library)
import enoslib as en
en.check()