To get access to PlanetLab, you must do the following:
-
Go to the site https://planet-lab.eu/ and choose <Create an account> Note: the URL ends in .eu, not .org.
-
Fill in the important fields and choose "University of Copenhagen, DIKU" as site. THIS IS IMPORTANT!
-
You have to wait for verification of your account before it can be used. If the verification takes more than a few days, try prodding ericbj@ifi.uio.no ;-)
When everything is ok and your account has been verified, you can check out User's Guide: https://www.planet-lab.org/doc/guides/user
Working with PlanetLab means connecting to various servers using SSH. This requires you to do the following:
- Create an RSA SSH key (if you don't already have one) and add it to your account.
The key MUST be an RSA key, and we recommend a 4096-bit, password-protected key. You can use the following command to generate a 4096-bit RSA key interactively from your shell:
ssh-keygen -t rsa -b 4096
- You will find an upload form under <Keys> under <My Account> on PlanetLab. Upload your public key (i.e., the .pub file). Please note, it may take some time for your key to propagate to all the machines in your slice.
Slices and Users
Roughly, a "slice" is a set of virtual machines (nodes) distributed across the PlanetLab network. A slice exists for a fixed period of time, and the virtual machines are shut down after this expiration date. Our slice is called diku_IN5570, and at the time of writing, it has 553 nodes. However, not all of those are alive and well. See below for a list of nodes we know work (at the time of writing).
Everyone with a user, created as specified above, logs in with the same user, diku_IN5570, and can execute code on these machines.
To login on a node, type in the following command:
ssh -i <private-key> -l <slicename> <hostname>
For example,
ssh -i ~/.ssh/id_rsa -l diku_IN5570
planetlab-2.ing.unimo.it
Hint: You are very likely to find it useful to add the key ~/.ssh/id_rsa to your SSH agent. An SSH agent is a background process that can safely store and feed your SSH password to SSH for some fixed amount of time (e.g., 1 hour). This way, you can avoid having to type your password for that amount of time.
ssh-add ~/.ssh/id_rsa
Executing Emerald Code
Please be aware that everyone is using the same user on these machines - diku_IN5570. This means that you should show consideration for your fellow students, and NOT upload your source code to these machines. Instead, you should use your local Emerald installation to compile Emerald code, and transfer binary code to the servers, as needed. Also, it can be a good idea to create a working directory for you and your files.
To copy compiled Emerald binaries to a server, you can use SCP:
scp -i ~/.ssh/id_rsa <your_code>.x diku_IN5570@planetlab-2.ing.unimo.it:/home/diku_IN5570/<your_dir>
Prepared Nodes (anno 2022)
We have pre-installed the Emerald compiler and runtime as ec
and emx
, respectively, on the following machines (as of 2022-02-08):
- planetlab-2.ing.unimo.it (Italy)
- planetlab2.xeno.cl.cam.ac.uk (United Kingdom)
- planetlab3.cs.ubc.ca (Canada)
For further documentation on how we gauged PlanetLab status, see https://github.com/emerald/IN5570v22/tree/master/planet-lab.
Good Nodes (anno 2022)
These are the nodes reachable from UiO within a 5-second timeout, but where Emerald is not necessarily installed.
See the current list here.
Installing Emerald on a new node
If you have to install the Emerald compiler on another node, follow this guide:
Login at nodename:
$ ssh -l diku_IN5570 nodename
To install an Emerald compiler at that node:
$ wget http://www.uio.no/studier/emner/matnat/ifi/INF5510/v15/emerald-0.99-linux.tar.gz $ tar xvf emerald-0.99-linux.tar.gz $ mv emerald-0.99-linux emerald $ sudo dnf install glibc.i686
Create a directory, emerald/bin32 and copy the files in the bin32 directory from course GitHub repository there, and mark all downloaded files as executable:
~/emerald/bin32$ wget https://github.com/emerald/in5570v22/raw/master/planet-lab/bin32/bind_public.so ~/emerald/bin32$ wget https://github.com/emerald/in5570v22/raw/master/planet-lab/bin32/ec ~/emerald/bin32$ wget https://github.com/emerald/in5570v22/raw/master/planet-lab/bin32/emx ~/emerald/bin32$ wget https://github.com/emerald/in5570v22/raw/master/planet-lab/bin32/emc ~/emerald/bin32$ chmod +x *
Let .profile file in the home directory have the following contents:
[ -f /etc/planetlab.profile ] && source /etc/planetlab.profile export EMERALDROOT=/home/diku_IN5570/emerald/ export EMERALDARCH='i686mt' export PATH="$EMERALDROOT/bin32:$PATH" export TERM=xterm-256color
Note how bin32/ec
and bin32/emx
overload the system LD_PRELOAD. This is because the one bind_public.so provisioned on PlanetLab only works for 64-bit binaries, while our Emerald compiler is mere 32-bit software.