Difference between revisions of "Getting Started"

From Grid5000
Jump to: navigation, search
Line 5: Line 5:
 
(Cloud, Grid, HPC, P2P systems).
 
(Cloud, Grid, HPC, P2P systems).
  
This tutorial will guide you through your first steps on Grid'5000. Before proceeding, make sure you have a Grid'5000 account (if not, use [[Grid'5000:Get an account|this form]]), and an SSH client.
+
This tutorial will guide you through your first steps on Grid'5000. Before proceeding, make sure you have a Grid'5000 account (if not, use [[Grid5000:Get an account|this form]]), and an SSH client.
  
 
== Getting support ==
 
== Getting support ==
 
The [[Support]] page describes how to get help during your Grid'5000 usage.
 
The [[Support]] page describes how to get help during your Grid'5000 usage.
  
== Connecting for the first time ==
+
== Connecting for the first time and preparing your SSH environment ==
  
 
'''(1) Connect to Grid'5000:'''
 
'''(1) Connect to Grid'5000:'''
 
{{Term|location=outside|cmd=<code class="command">ssh </code><code class="replace">login</code><code class="command">@access.grid5000.fr</code>}}
 
{{Term|location=outside|cmd=<code class="command">ssh </code><code class="replace">login</code><code class="command">@access.grid5000.fr</code>}}
Your will get authenticated using the SSH public key you provided in the account creation form.
+
You will get authenticated using the SSH public key you provided in the account creation form.
  
 
The <code class="host">access.grid5000.fr</code> address points to two actual machines: <code class="host">access-south</code> in Sophia  and <code class="host">access-north</code> in Lille. Those machines provide SSH access to Grid'5000 from Internet.
 
The <code class="host">access.grid5000.fr</code> address points to two actual machines: <code class="host">access-south</code> in Sophia  and <code class="host">access-north</code> in Lille. Those machines provide SSH access to Grid'5000 from Internet.
  
If you prefer, you might also be able to connect directly to your local Grid'5000 site, but per-site access restrictions are applied, so using <code class="host">access.grid5000.fr</code> is usually a safer choice. See [[External_access]] for details.
+
{{Note|text=If you prefer, you might also be able to connect directly to your local Grid'5000 site, but per-site access restrictions are applied, so using <code class="host">access.grid5000.fr</code> is usually a safer choice. See [[External_access]] for details about local access machines.}}
  
 +
Grid'5000 is structured in '''sites''' (Grenoble, Rennes, Nancy, ...). Each site hosts one or more clusters.
 +
The primary way to move around Grid'5000 is using SSH. It is recommended that you use a second SSH, created without a passphrase, and that you use it inside Grid'5000.
  
 +
'''(2) Create an new SSH key with ssh-keygen:'''
 +
{{Term|location=access|cmd=<code class="command">ssh-keygen</code><br>
 +
<code>Generating public/private rsa key pair.<br>
 +
Enter file in which to save the key (/home/login/.ssh/id_rsa):</code><code class="replace">(press Enter)</code><br>
 +
<code>Enter passphrase (empty for no passphrase):</code><code class="replace">(press Enter)</code><br>
 +
<code>Enter same passphrase again:</code><code class="replace">(press Enter)</code><br>
 +
<code>Your identification has been saved in /home/login/.ssh/id_rsa.</code><br>
 +
<code>Your public key has been saved in /home/login/.ssh/id_rsa.pub.</code>
 +
}}
 +
 +
You have a '''different home directory on each Grid'5000 site''', so you will usually use [[Rsync]] or <code>scp</code> to move data around. However, on <code class="host">access</code> machines, you have direct access to each of those home directory (through NFS mounts). We will use that feature to propagate your SSH key to each site.
 +
 +
'''(3) Copy your SSH key to your <code>.ssh</code> directory in bordeaux:
 +
{{Term|location=access|cmd=<code class="command">cp .ssh/id_rsa* bordeaux/.ssh/</code>}}
 +
 +
'''(4) Add your new SSH key to bordeaux's <code>authorized_keys</code> file:'''
 +
{{Term|location=access|cmd=<code class="command">cat .ssh/id_rsa.pub >> bordeaux/.ssh/authorized_keys</code>}}
 +
 +
'''(5) Now, synchronize all sites:'''
 +
{{Term|location=access|cmd=<code class="command">for site in $(ls); do cp bordeaux/.ssh/* $site/.ssh/; done</code>}}
 +
 +
'''(6) At this point, you should be able to connect to another site:'''
 +
{{Term|location=access|cmd=<code class="command">ssh nancy</code>}}
 +
 +
The figure below shows how you just connected from <code class="host">access</code> to the site frontend in <code class="host">nancy</code>. Site frontends (named <code class="host">frontend.</code><code class="replace">site</code><code class="host">.grid5000.fr</code> or simply <code class="replace">site</code><code class="host">.grid5000.fr</code> are the machines you will use to interact with Grid'5000 tools such as OAR and Kadeploy. Those machines are virtual machines, and must not be used for CPU or I/O intensive tasks.
 +
 +
[[Image:Grid5000_SSH_access.png|1000px]]
 +
 +
{{Note|text=Unless you are using Putty on Windows, it is recommended to configure your SSH client to enable shortcuts. Once done, you will be able to connect to any machine inside Grid'5000 in one shot, using <code class="command">ssh </code><code class="replace">machine</code><code class="command">.g5k</code>. See [[SSH#Using_SSH_with_ssh_proxycommand_setup_to_access_hosts_inside_Grid.275000|this page]] for details.}}
  
 
== Firsts steps ==
 
== Firsts steps ==

Revision as of 22:46, 22 October 2012

Warning.png Warning

Work in progress

Grid'5000 is a scientific instrument (a testbed) that supports large-scale, reproducible experiments in the context of research on distributed systems (Cloud, Grid, HPC, P2P systems).

This tutorial will guide you through your first steps on Grid'5000. Before proceeding, make sure you have a Grid'5000 account (if not, use this form), and an SSH client.

Getting support

The Support page describes how to get help during your Grid'5000 usage.

Connecting for the first time and preparing your SSH environment

(1) Connect to Grid'5000:

Terminal.png outside:
ssh login@access.grid5000.fr

You will get authenticated using the SSH public key you provided in the account creation form.

The access.grid5000.fr address points to two actual machines: access-south in Sophia and access-north in Lille. Those machines provide SSH access to Grid'5000 from Internet.

Note.png Note

If you prefer, you might also be able to connect directly to your local Grid'5000 site, but per-site access restrictions are applied, so using access.grid5000.fr is usually a safer choice. See External_access for details about local access machines.

Grid'5000 is structured in sites (Grenoble, Rennes, Nancy, ...). Each site hosts one or more clusters. The primary way to move around Grid'5000 is using SSH. It is recommended that you use a second SSH, created without a passphrase, and that you use it inside Grid'5000.

(2) Create an new SSH key with ssh-keygen:

Terminal.png access:
ssh-keygen

Generating public/private rsa key pair.
Enter file in which to save the key (/home/login/.ssh/id_rsa):
(press Enter)
Enter passphrase (empty for no passphrase):(press Enter)
Enter same passphrase again:(press Enter)
Your identification has been saved in /home/login/.ssh/id_rsa.

Your public key has been saved in /home/login/.ssh/id_rsa.pub.

You have a different home directory on each Grid'5000 site, so you will usually use Rsync or scp to move data around. However, on access machines, you have direct access to each of those home directory (through NFS mounts). We will use that feature to propagate your SSH key to each site.

(3) Copy your SSH key to your .ssh directory in bordeaux:

Terminal.png access:
cp .ssh/id_rsa* bordeaux/.ssh/

(4) Add your new SSH key to bordeaux's authorized_keys file:

Terminal.png access:
cat .ssh/id_rsa.pub >> bordeaux/.ssh/authorized_keys

(5) Now, synchronize all sites:

Terminal.png access:
for site in $(ls); do cp bordeaux/.ssh/* $site/.ssh/; done

(6) At this point, you should be able to connect to another site:

Terminal.png access:
ssh nancy

The figure below shows how you just connected from access to the site frontend in nancy. Site frontends (named frontend.site.grid5000.fr or simply site.grid5000.fr are the machines you will use to interact with Grid'5000 tools such as OAR and Kadeploy. Those machines are virtual machines, and must not be used for CPU or I/O intensive tasks.

Grid5000 SSH access.png

Note.png Note

Unless you are using Putty on Windows, it is recommended to configure your SSH client to enable shortcuts. Once done, you will be able to connect to any machine inside Grid'5000 in one shot, using ssh machine.g5k. See this page for details.

Firsts steps

  1. G5K general goals and admin context + orga + get support
  2. ssh access.grid5000.fr
    1. you are now connected to Grid'5000 from here you can
      1. see the contents of your homedir on each site (these are different, and not backed-up)
      2. connect to a site
  3. ssh-keygen + installer les clés sur les sites. See the FAQ on how to allow direct access from your machine to a site.
  4. connect to a site
  5. run oarsub -I -> you are now connected to a node, reserved for your usage for an hour
    1. exit -> you are now disconnected
    2. oarsub 'sleep 3600'  , oarsub -C <jobid>
  6. visualize resources: MOTD, Gantt, Monika, API selector
    1. complex oarsub (-p cluster, -l nodes/walltime, -r)
    2. list resources, connect to them using oarsh, or use -t classic-ssh if you want to keep to pure ssh (pointeur vers advanced)
  7. your software environment on nodes is the production environment, you can use for MPI, JAVA applications or to start VMs using KVM. You might want more control (to be root)
  8. oarsub -t deploy
  9. kadeploy3 
  10. installer un paquet
    1. http_proxy (whitelisting)
    2. save for furture usage or script installation
  11. Kaconsole et Kareboot ou kapower3
  12. parler de g5k-checks, du focus XP de G5K, expliquer que g5k-checks compare ses données avec l'API de réference, et donc introduire l'API