Tutorial or Teaching Labs HowTo

From Grid5000
Revision as of 13:56, 5 September 2020 by Pneyron (talk | contribs)
Jump to navigation Jump to search

This page explains how to use Grid'5000 for tutorials/labs, for instance in a teaching course or project at the university, or in thematic schools.

Forewords about organizing a tutorial or a teaching lab in Grid5000

Note.png Note

Although the Grid5000 charter does not explicitly mention tutorials, the use Grid5000 for educational purposes is allowed.
However, some rules applies, and some steps must be carefully followed.

First of all, using a single account shared between the multiple students is not allowed. Every student must have her own account.

Also, accounts have to be nominative (see below for the required informations). Generic accounts are not allowed.

To that purpose, to ease the account creation phase for a large group of students, Grid'5000 provides a special procedure for a mass account creation.

Second, the teacher may consider reserving resources in the platform to insure students will be able to have access to some of them during the lab.

Third, the teacher may consider helping students with their first access to the platform, as a basic technical knowledge is required for the access setup.

Students accounts creation

The workflow for the students accounts creation is the following:

  1. Send an email to the Grid5000 technical team at support-staff@lists.grid5000.fr, with the subject Tutorial Accounts Creation, to inform about your wish to create a group of accounts for students. It this email, some information have to be provided, see the next section.
  2. Prepare a file containing the list of your students first names, last names and e-mail address. See below for an example of such a CSV file.
  3. The answer you will receive from support staff will provide an engine name. Connect to a Grid'5000 frontend and use the g5k-create-tutorial-accounts to launch the actual creation of the accounts, using the provided engine name and the students CSV file your prepared as parameters.
  4. Upon the execution of the script, the students will receive emails containing the instructions to setup their passwords and ssh keys.

Please note that once a student will have set her password and ssh key, her account will be immediately active. No other action will be required.

NOTE: it may take a few minutes for the passwords and the ssh keys to be synchronized to all Grid'5000 sites and servers.

Information to send by e-mail to the technical team

The mass creation of tutorial accounts requires a first manual step by the technical team, to setup in the User Management Service of Grid'5000 an account creation automation engine as well as a dedicated group of users for the tutorial students.

To that purpose, the technical team needs some information from you. Please send an e-mail to support-staff@lists.grid5000.fr with the following content :

Engine/Group information
- Name:
- Description:
- Owner:
- Expires_at:
User Information
- Extra groups:
Affiliation Information
- Country:
- University:
- Academic department / Faculty:
- Course name:
- Year :
- Employee Type:

Where:

  • Engine/Group information
    • Name is the name of the engine and the name group. It has to follow the pattern: lab-YYYY-name (where YYYY is the current year date).
    • Description is the short description of what the student will do on the platform.
    • Owner is the person who is to be authorized to create the account with the g5k-create-tutorial-accounts script (see bellow).
    • Expires_at is the date from which the student account has to expired.
  • User Information
    • Extra groups is not mandatory. It can give extra access to the student (e.g., be able to access a group storage sto-*).
  • Affiliation Information
    • Country is the country which the user will use G5K from (e.g., for a french university the country is France).
    • University is the name of the university which the student are registered in (e.g., Univ. Grenoble Alpes)
    • Academic department / Faculty is the division on the university which the student are registered in (e.g., Polytech Grenoble INFO, Grenoble INP - Ensimag, ...)
    • Course name is the short name of the tutorial/lecture.
    • Year is the year when the tutorial is done.
    • Employee Type will probably be bachelor/master student (other possibilities are Phd student, Post-doc, Research/professor, Engineer, Unknown)

Format of the students list CSV file

You need to create a CSV file containing the information about the students. Such a file must be structured as follows:

  • one line per student
  • lines formatted as first name, last name, email address

For example, if you want to create two student accounts for John Doe and Carrie Mathison, a valid CSV file list.csv contains:

John, Doe, john.doe@student.unix-lambda.fr
Carrie, Mathison, carrie.mathison@students.univ-lambda.fr

We remind that the use of academic e-mail address is to be strongly preferred to gmail or other non-professional services.

That CSV file will have to be uploaded to a Grid'5000 frontend for the next step.

Use g5k-create-tutorial-accounts on the frontend to create accounts

Lets say that your are connected to grenoble frontend and you have a CSV file named list.csv. To create your user account just do the following:

Terminal.png fgrenoble:
g5k-create-tutorial-accounts -f list.csv -e myEngineName

Note: g5k-create-tutorial-accounts automatically creates active accounts. This operation cannot be undone (i.e., accounts cannot be deleted and any modification needs to be done manually on each account). Therefore, before executing the script, be sure that all the information contained in the CSV file is correct.

Resource reservation

Depending on your needs, you can reserve Grid'5000 resources in advance.

You probably don't need to reserve resources if:

  • Your tutorial occurs during charter restriction period (daytime in Paris timezone)
  • and/or it does not require many resources
  • and/or it does not have many participants

If you still want to reserve your resources in advance, the best strategy is to reserve them as usual in Grid'5000, and kill your reservation just before the beginning of your tutorial. If the tutorial duration is important, you can use several reservations and kill them as the tutorial progress.

If you plan to use more resources than allowed by charter, you have to make a request for a special usage permission. The procedure is detailed on Grid5000:SpecialUsage.

Access to Grid'5000, connection using SSH

Past experiences show that many problems are related to some difficulties with the connection to Grid'5000 with SSH keys.

To use Grid'5000, students must have basic knowledge of SSH, and especially know how to generate SSH private and public keys and use them to connect to a remote machines. Don't hesitate to spend time at the beginning of the tutorial to explain it. More information on this topic is available at SSH and Getting_Started#Connect_to_a_Grid.275000_access_machine.

FAQ

If this FAQ does not cover one of your question, do not hesitate to ask it by mail to support-staff@lists.grid5000.fr.

Does the account need to be validated before the student can use them?

Contrary to what is done with the normal workflow using the account creation form, no validation is required when the engine is used. The script g5k-create-tutorial-accounts creates active accounts.

What do the students need to do to get their account ready to use?

Created accounts are active right after the initial procedure, but the students have to create their password and SSH keys before being able to connect for the first time. Otherwise, they are not able to connect to any of the grid5000 services.

To do so they received an URL by email, that they must open in a web browser. Then each student must fill the form with a personal password and ssh key.

My students told me that they have not received any email

In that case, you should do the following:

  • Check that the email addresses you put in the CSV file are the correct.
  • Ask the students to check their spam box.
  • Ask the students to reset their password using Special:G5KChangePassword. This will send a new email to them, with the instruction to reset their password.

One of my student is not able to log in

Some possible causes:

  • The student is not using a correct login. The login is not an email address. He should have received it by email.
  • The student did not set up their password using the link they received by email. They just need to check their mailbox and retrieve the email which was sent to them.
  • The student does not remember their password. In that case they can reset their password using Special:G5KChangePassword.

One of my student is not able to ssh the frontend

Possible causes:

  • The student is not using a correct login. The Grid'5000 login may differ from their usual login when using a workstation or another platform. In that case, the student can use the -l G5K_USERNAME option in the SSH command.
  • The student did not set their SSH private key in the machine (workstation) the connection to Grid'5000 is made from.
  • The student did not set up any SSH key when they used the link to set up their password. To fix this, the student can connect to UMS, click on the left panel SSH keys, and then copy/past their public SSH key.

Note that one cannot connect to the G5K frontends directly. One first needs first to connect to a access machine: access.grid5000.fr.

To avoid the two-steps connection (access machine, then frontend) but connect directly to frontends, one can configure the SSH config file ~/.ssh/config as follows:

Host g5k
  User G5K_USERNAME
  Hostname access.grid5000.fr
  ForwardAgent no
Host *.g5k
  User G5K_USERNAME
  ProxyCommand ssh g5k -W "$(basename %h .g5k):%p"
  ForwardAgent no

Then,

  • Accessing the frontend (here, grenoble) can be done with:
ssh grenoble.g5k

From their, resources access is managed with the Grid'5000 tools (OAR commands and so on). See the Getting Started tutorial.

What happen if one of my students already has a Grid5000 account?

This case is covered by the procedure: You have to specify in the CSV file the email address the student is using in the existing account. Several cases then:

  • If the existing account is active, the account is added in the groups specified in the engine.
  • If the existing account is expiring (not in any Granting Access group anymore), the account is added in the Granting Access groups of the tutorial (set in the engine) and therefore will become active.
  • If the existing account is retired, the account is automatically reactived.
  • If the existing account is locked, this needs a manual intervention from support-staff. For the record, an account can be locked for one of these two reasons: its email address bounces (mostly because invalid) or the user was sanctioned for a misuse the platform.

The g5k-create-tutorial-accounts script returned an error for one of student

If you get an error, please contact support-staff.

Previous tutorials organized on Grid5000

Note.png Note

If you indeed organize a tutorial which uses Grid5000, we kindly ask it to be added in the list below.

The following list contains the tutorials already organized on Grid'5000
  • Un TP en Master 1 Informatique à l'Université de Lille, depuis 2010. Initiation à un environnement et des paradigmes de calcul distribué: réservation de machines et déploiement (oar/kadeploy), traitement d'applications Embarrassingly parallel en mode batch, programmation MPI, expérimentation, scalabilité et mesure de performance. Un groupe d'une vingtaine d'étudiants environ. 3 séances de TP environ.
  • Un TP à Rennes, avec Nikos Parlavantzas et une intervention dans le master MRI (1 cours, 2 TP par D. Margery, années 2013-2014, 2014-2015 et 2015-2016. Repris pas Matthieu Simonin depuis))
  • Un TP au cours de http://sc-camp, en 2011
  • Un TP à l'ENS Lyon (TP OpenStack aux master 2)
  • Un TP à l'ENS Lyon (12/2013) sur OpenCL (Sujet [1])
  • TP à l'ENS Lyon (2014-2015) "Distributed Systems" M1 course
  • Un projet, sur 8 semaines, à l'Ensimag (Grenoble-INP) (automne 2015, automne 2016) "Systèmes distribués et Cloud Avancé" (enseignant: Grégory Mounié), une cinquantaine d'élèves de niveau M2, groupés en 12 équipes
  • Un projet de Licence 3 informatique à l'Université de Montpellier (semestre pair 2016) "Prise en main d’OpenStack et mise en oeuvre d'un outil de déploiement d'applications simples sur des VMs" ) groupe de 4 étudiants, encadré par Hinde Lilia Bouziane.
  • Un TP en Master 2 à l'Université de Montpellier, décembre 2016, octobre et novembre 2017, novembre 2018 dans le cadre d'un cours "E-applications". Il s'agit d'un TP d'initiation à l'utilisation d'une plateforme distribuée : réservation de machines, exécution d'une application à distance et importation des résultats. Une trentaine d'étudiants répartis en deux groupes en 2016, une cinquantaine d'étudiants en 2017 et une quarantaine en 2018. TP encadré par Hinde Lilia Bouziane.
  • Un projet de Licence 3 informatique à l'Université de Montpellier, de novembre 2017 à juin 2018 (groupe de 2 étudiants). Le projet porte sur la programmation d'un traitement parallèle et distribué d'images. Projet encadré par Hinde Lilia Bouziane.
  • Un TP à l'IMT Atlantique (campus de Nantes) de 4 étudiants encadré par Mario Südholt de octobre 2018 à janvier 2019.
  • Un projet de Master 1 informatique à l'Université de Montpellier, de janvier à juin 2019 (groupe de 3 étudiants). Résumé "Nous disposons d'un algorithme d'apprentissage de relations sémantiques basé sur les relations existantes dans le réseau lexical du JeuxDeMots (http:www.jeuxdemots.org). La table générée est de grande taille, de l'ordre de plusieurs centaines de millions de lignes. L'objectif du projet est de distribuer cette table et de mettre en ouvre un algorithme d'apprentissage et d'exploitation de manière distribuée et parallèle.". Projet encadré par Hinde Bouziane et Mathieu Lafourcade.
  • Un projet de Master 1 informatique à l'Université de Montpellier, de janvier à juin 2019 (groupe de 2 étudiants). Le projet porte sur la programmation d'un traitement parallèle et distribué d'images (photogrammétrie). Projet encadré par Hinde Lilia Bouziane.
  • Un projet "deep learning" en M2 GI et Polytech INFO4 à l'université de Grenoble, de février à avril 2019, puis 2020. Projet encadré par Georges Quénot (validé avec Pierre Neyron).
  • TP de l'UE Parallélisme, du M1 de l'UCBL (Simon Delamare)