One time setup for use in Grid’5000#
Website: https://discovery.gitlabpages.inria.fr/enoslib/index.html
Support channel: https://framateam.org/enoslib
Source code: https://gitlab.inria.fr/discovery/enoslib
Overview#
In this notebook we’ll install EnOSlib in a dedicated virtual environment and use it in the subsequent notebook.
Before we proceed, please keep in min the following representation - Every single cell of the various notebooks will be applied on the frontend node of the chosen site (or a dedicated node if it applies) - Each site frontend host a dedicated scheduler instance (so you can reserve, delete, view you resources from this node) - By default you can’t reach nodes inside the Grid’5000 network from the internet (Various options exist to overcome this but are out-of-the scope of this notebook)

Installing the latest version of EnOSlib#
This installs EnOSlib (+ some extra libs) in a virtual environment and install a new Jupyter kernel to be used in all the notebooks
[ ]:
%%bash
virtualenv -p python3 my_venv
source my_venv/bin/activate
# install a specific major version
python3 -m pip install -U 'enoslib[jupyter]>=10,<11'
# install the latest development version
# python3 -m pip install -U 'enoslib[jupyter] @ git+https://gitlab.inria.fr/discovery/enoslib'
# install some extra dependencies
python3 -m pip install matplotlib seaborn pandas scapy
# make sure we can use the python interpreter of the venv as a jupyter kernel
python3 -m pip install ipykernel
python3 -m ipykernel install --user --name my_venv
Activate this environment#
Goal: Make sure we’re using the library installed in the previous virtual environment.
Switch the kernel to
my_venv
: in the notebook interface, go toKernel > Change kernel
and selectmy_venv
Refresh the browser (optional but sometime required)
Re-execute this notebook
Checking the library#
The following must succeed after switching to the new kernel my_venv
[ ]:
import enoslib as en
# check the version
en.check()
Special case if you are running this notebook on a dedicated 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.
[ ]:
from grid5000.cli import auth
# CHANGE THE LOGIN!
auth("msimonin")