This section explains, step by step, how to connect to the cluster and how to
setup a friendly environment. Still, it supposes that you are familiar with the
command line.
To connect to Dalek, you first need to connect to one of the two dedicated
gateways (ssh1.dalek.proj.lip6.fr or ssh2.dalek.proj.lip6.fr). In the
following subsections we suppose that a Dalek account have been created for
you. The following placeholders are used for your credentials:
[USER_DALEK] is your personal given login,
[PASSWD_DALEK] is your personal given password (you will have to change it
for obvious security reasons).
Warning
If you don't know your [USER_DALEK]/[PASSWD_DALEK] credentials already,
you cannot connect to the cluster. Please contact an administrator to ask
for accounts creation (see the contact page).
This will ask you to enter your password. Type [PASSWD_LIP6] to enter.
Next, we strongly recommend you to add your SSH public key to your account.
First, disconnect from the gateway to come back to your local account:
on the gateway
exit
To get your public key, do:
on your laptop/desktop
cat~/.ssh/id_*.pub
If you don't have any ~/.ssh/id_*.pub file, the previous command will return
an error message (No such file or directory). In this case, you need to create
a pair of public/private SSH keys:
on your laptop/desktop
ssh-keygen
Press the [Enter] key until the previous command is completed.
Then retry to following command, it should work this time:
on your laptop/desktop
cat~/.ssh/id_*.pub
You can then copy the output of the cat command to your clipboard and connect
to the gateway:
on your laptop/desktop
ssh[USER_DALEK]@ssh1.dalek.proj.lip6.fr
on the gateway
mkdir-p~/.ssh
chmod700~/.ssh
touch~/.ssh/authorized_keys
echo"PASTE YOUR PUBLIC KEY HERE">>~/.ssh/authorized_keys
chmod600~/.ssh/authorized_keys
exit
Now, if you redo :
on your laptop/desktop
ssh[USER_DALEK]@ssh1.dalek.proj.lip6.fr
It shouldn't ask you for a password any more, great you've passed step 1 :-)!
Step 2 - Connect to Dalek Frontend Manually via the Gateway¶
We're now going to connect to Dalek via the gateway, but manually (we'll
automate this later to make it less tedious). From your laptop, do:
on your laptop/desktop
ssh[USER_DALEK]@ssh1.dalek.proj.lip6.fr
You are now on the gateway and we are going to "jump" on the Dalek frontend node
by doing:
on the gateway
ssh[USER_DALEK]@front.dalek.proj.lip6.fr
When your are connected to the frontend node please change your password!
To do so, run the following command and follow the instructions (it will ask
you to enter your current password first and then to enter twice the new
password):
on the Dalek frontend
passwd
Then type exit twice to disconnect 1) from the Dalek frontend and 2) from the
gateway:
As you may have noticed, it's quite cumbersome to connect to Dalek because you
have to bounce to the gateway first. We're going to automate this to make it
more user-friendly.
On your local account, if you don't have a ~/.ssh/config file, create it:
on your laptop/desktop
touch~/.ssh/config
Then copy the contents of the following config script and replace
[USER_DALEK] with your given username:
Be careful, you need to replace [USER_DALEK] twice, line 12 and line 30.
# ========================= -------------------- ============================# ========================= | LIP6 DALEK CLUSTER | ============================# ========================= -------------------- ============================# =============================================================================# Gateway ---------------------------------------------------------------------# =============================================================================# ********************************************************************* gateway# -----------------------------------------------------------------------------# LIP6 gateway/proxy to jump on the Dalek frontendHostgateway.lip6
User[USER_DALEK]HostNamessh1.dalek.proj.lip6.fr
# /!\ `!localnetwork` requires OpenSSH >= 7.3 to work, if this configuration# /!\ does not work on your computer, you can replace the following line by# /!\ `Host *.dalek.lip6 *.dalek.lip6.srun *.dalek.lip6.srex`. The only drawback# /!\ is that in the LIP6 local network there will always be a useless proxy# /!\ jump, and, thus the connection speed will be slower than expected.# wired LIP6 net wireless LIP6 netMatchhost*.dalek.lip6,*.dalek.lip6.srun,*.dalek.lip6.srex!localnetwork132.227.102.0/24,132.227.92.0/24
ProxyJumpgateway.lip6
# =============================================================================# Dalek (frontend) ------------------------------------------------------------# =============================================================================# *********************************************************************** front# -----------------------------------------------------------------------------Hostfront.dalek.lip6
HostNamefront.dalek.proj.lip6.fr
# =============================================================================# Configuration ---------------------------------------------------------------# =============================================================================Host*.dalek.lip6*.dalek.lip6.srun*.dalek.lip6.srex
User[USER_DALEK]HostNamefront.dalek.proj.lip6.fr
The only difference with external users is that there is a match rule line
21 that may or may not use the gateway depending if you are connected to
the LIP6 local network.
Save the ~/.ssh/config file.
You can now connect to the Dalek frontend by doing:
on your laptop/desktop
sshfront.dalek.lip6
You can now connect to the Dalek frontend by doing:
on your laptop/desktop
sshfront.dalek.lip6
Danger
On OpenSSH < 7.3, line 23 of the ~/.ssh/config file may fail. To fix
it, replace L23:
Match host *.dalek.lip6,*.dalek.lip6.srun,*.dalek.lip6.srex !localnetwork 132.227.102.0/24,132.227.92.0/24
As a result, when operating within the local LIP6 network, connections
will systematically route through a proxy jump via the gateway. While
this generally has minimal impact, it may become a limitation for
high-throughput file transfers.
Step 4 - Simplified Connection to Dalek Compute Nodes¶
On Dalek, users generally want to connect to a specific compute not to run
experiments on it. You can do this manually from the frontend node using SLURM
commands but we also setup a dedicated set of rules to simply the procedure
into the ~/.ssh/config file.
Info
If you're not familiar with SLURM, you can check out the dedicated
page.
Here is the set of rules to copy-paste just after the lines given in the
previous section (be careful, once again, you need to replace [USER_DALEK]
line 6 with your given username, at the end, in the ~/.ssh/config file your
Dalek username should be repeated 3 times):
As you can see, SLURM commands (RemoteCommand srun ...) are bundled in this
previous rules to make it quite simple and convenient to use.
Now, you should be able to connect to any of the Dalek compute nodes directly
from your laptop. For example, if you want to connect to the az4-a7900-2 node,
simply do:
on your laptop/desktop
sshaz4-a7900-2.dalek.lip6.srun
The previous command will connect to the frontend and then launch the SLURM
reservation of node az4-a7900-2. This may take some time, depending on the
sleep mode the node is in (between 30 sec if suspend and 2 minutes if
hibernate or poweroff).
To connect to a compute node, there are three possible suffixes supported in the
previous SSH configuration file. The philosophy is to encapsulate, first the
connection to the Dalek frontend (with the proxy jump via the gateway if needed)
and then, do the following depending on the suffix:
.srun: Allocates a node via SLURM srun command (in interactive mode):
Reserves one CPU (= 1 CPU HW thread in SLURM) and no GPU.
Here is an example of use:
on your laptop/desktop
sshaz4-a7900-2.dalek.lip6.srun
.srex: Allocates a node via SLURM srun command (in interactive mode) and
in exclusive mode: Reserves all the available resources (= all the
available CPU HW threads + all the available GPUs).
Here is an example of use:
on your laptop/desktop
sshaz4-a7900-2.dalek.lip6.srex
.ssh: Connects to a node via SSH, this requires the node to be firstly
reserved in exclusively mode via SLURM. This is convenient to open
additional TTYs on a node.
Here is an example of use: