These scripts make it easy to deploy and run a distributed Emerald program on many PlanetLab nodes. Here is what you have to do to start using them:
Edit the file config.sh
and change the variable wd
to a personal working dir under /tmp
.
The directory you specify here will be used to put all needed data in on the PlanetLab nodes.
For example:
wd=/tmp/yourname
Copy or link the program you want to run on the PlanetLab nodes to node-data/main.x
.
For example:
cd node-data
ln -s /home/user/uni/distobj/kilroy.x main.x
Edit the file nodes.txt
and insert the nodes, on which your program is to be executed. Note the following:
- The first node in the file will be the one, on which the Emerald program is launched. It will be started, when all other nodes are online.
- The second node in the file will be the first one to start up. All other nodes will connect to it.
Now you are ready to install your program on the nodes. Note that the user you use to run the script needs to have already SSH access to the nodes specified in nodes.txt.
./install.sh
This will start all nodes and run the Emerald program on the last one to start up (the first one in nodes.txt). Note that the emerald VMs will continue running after the program finished. But if you run start.sh
for the next time, the previously started VMs will be killed.
For subsequent starts you can use the -f
switch. It will only restart the main node.
./start.sh [OPTIONS]
-f
Fast Start. Only starts the main node and connects to the reference node, which is still running from the previous launch.
To watch the output, a specific node is producing, you can watch the file output.log
in your working directory. There is a script, that takes the address of a node and opens the program less
there, which allows watching the outputs of that file:
./output.sh address.of.node.tdl
If you have made changes to your program, you have to update the file on the nodes.
./update.sh [OPTIONS]
-f
Fast Start. Only updates the main node.
If you want to stop all running Emerald VMs, you can do so by executing
./stop.sh
You can delete all data on all nodes you were using by executing
./clean.sh
If you have a text file which contains the addresses of nodes, on in each line, you can test, to which of them you have access, by executing:
./test-nodes.sh all-known-nodes.txt
This will print the address of a node, if it is accessible via SSH. You can for example use it, to generate a new nodes.txt:
./test-nodes.sh all-known-nodes.txt > nodes.txt