Practical session

This session will provide a practical illustration of the experimental workflow introduced during the presentation. It will cover the steps of the experimental workflow, namely:

  • Account creation and first steps
  • Resource allocation
  • Deployment of an experimental environment
  • Launching an experiment
  • Gathering results

During this session, users will be asked to get a resource allocation, and then they will develop a python script that will interact with Grid'5000 API to:

  • Find information about a resource allocations, whose ID would be given as an argument
  • List the nodes of the reservation
  • Deploy an environment on them
  • Upload a local bash script
  • Execute the local bash script
  • Collect its results

I- Account creation and first steps

A- Creating a G5K account

Firstly, create a Grid'5000 account by visiting this link : Get_an_account.

B- Generating a SSH key pair

Run the following code in a terminal to generate a SSH key :

display the content of the generated public key :

Now we will add some configuration to ssh to ease connection to Grid'5000. Add the following lines to the .ssh/config file located in your home folder :


and upload it in the Grid'5000 user management system

II- Resource allocation

First let see what are the resources that are available. It can be done in two ways:

We will now make a reservation of two nodes of the econome cluster, during one hour. To do so, we will use funk as follow :

Now connect to nantes:

III- Deployment of an experimental environment

Wait until your reservation is running. Once it is the case, connect to a frontend :

And connect to the OAR job :


And run the kadeploy command to deploy an operating system (debian) on the nodes you got with the reservation :

Now, wait until the deployment is finished (it takes approximately 2 minutes).

IV- Launching an experiment

As the nodes of the reservation are deployed, we will now run some software on them.

Create a local bash script that contains the following instructions :

and upload it on nodes of the reservation :

and run the script on nodes of the reservation :

V- Gathering results

VI- Automatization using Execo

It is possible to automate the execution of these steps by python and the Execo library.

First install python and PIP (a dependency manager for Python). Once it is done, install Execo :

Once Execo is installed, create a ~/ file in your home folder, with the following content :


And try to run the following script :


VII - Conclusion