PlanetLab is a project initialized by tens of universities (mainly are universities in USA and Europe) to build a globally distributed testbed. Currently there are totally about one hundred sites and more than two hundred PlanetLab hosts. The hosts in the PlanetLab testbed are connected through normal Internet connections which makes PlanetLab much attractive in the meaning of providing a real network environment. The details information about PlanetLab can be found at the following websites:
The PlanetLab toolkit is a set of Expect scripts which can be used to access PlanetLab hosts and run your program on remote machines. These scripts can automatically finish the interactions between the user and a remote host when you access a PlanetLab host using SSH, so that makes it possible to access multiple remote machines with one command or script.
Setup your account
Before accessing PlanetLab hosts, you should establish your account and accept authentication from your local administrator. The following steps are needed to set up your account:
Go to PlanetLab homepage, click "Users" which is at the left side of the page. On the displayed page, click "new account" and follow the instruction to fill the registration form. Click "register" and finish the registration. Don't forget the passphrass you typed while generating your private-public key pair.
Note: The following command is used to create a public/private key pair:
ssh-keygen -t rsa -f ~/.ssh/identity
It will ask you to type a passphrase, DON'T FORGET IT! It is needed when accessing a PlanetLab machine. If the directory HOME-DIRECTORY/.ssh doesn't exist, please create one. Here HOME-DIRECTORY is the home directory when you login to a local machine using your account. The ssh-keygen command creates two files, identity and identity.pub, under directory HOME-DIRECTORY/.ssh. Please make a backup for your old identity and identity.pub file since they will be overwritten by the above command.
Note: Make sure the public key file consists of a single line. On some operating systems (e.g., Windows, Solaris), the ssh-keygen program generates public keys that contain newlines and causes a problem. We recommend you to create the public/private key pair on a Linux host.
Send e-mail to local administrator, including your name and E-mail address you typed in the registration form, to tell that your PlanetLab account has been created and needs to be enabled. The local administrator will enable your account and assign a login name (for example uv3) to your account, and inform you through e-mail. It usually takes one or two hours for the login name to become available for you to use after your PlanetLab account is enabled.
Note: cs757 students please indicate "it is for cs757 class project" in the body of the e-mail.
Make sure that your private key (it is the file identity) in the local directory: HOME-DIRECTORY/.ssh. It is usually done by the key generate command.
Install PlanetLab toolkit
tar zxvf planetLabtools.tar.gz
A sudirectory named planetLabtools will be created under the directory DIR. The directory DIR/planetLabtools is your working directory.
Note: The scripts in the PlanetLab toolkit have been tested on Redhat7.1, Redhat7.3 and Redhat8.0.
Prepare working environment
The contents of the file planetLab.conf look like:
You need to replace my_login with your actually login name (e.g. uv3) assigned by the local administrator, and replace my_passphrase with the passphrase you typed when creating private/public key pair. For security reason, we recommend you to type in your passpgrase in the file planetLab.conf before starting your experiments and delete it from the file planetLab.conf when the experiments are finished.
The Working_directory is used for all commands with prefix scp. When specifying my_working_dir as the working directory, the actual remote directory is REMOTE_HOME_DIR/my_working_dir. For example, if set Working_directory=widearea-test, then the command scp_command_unify host-list.txt 0 10 /home/hypercast/tmp/test.txt will copy the local file /home/hypercast/tmp/test.txt to the directory REMOTE_HOME_DIR/widearea-test on the remote hosts specified by host-list 0 10 (explained in the User Manual).
Note: The status of PlanetLab testbed is not very stable due to the dynamics of Internet. Before starting your experiment, you need to test PlanetLab hosts (using ssh_test_alive or ssh_test_alive_unify command) and make sure the hosts you used are alive. A failed host should be commented by inserting "#" at the beginning of the line.
When you want to run your program on remote PlanetLab hosts, you need to prepare the working environment first, including installing needed software, such as JAVA, and setting PATH environment variable on remote hosts. When multiple persons share a login name, each one should create and work in his/her own working directory.
For more information contact:
Department of Computer Science
University of Virginia
Please email any comments or questions to email@example.com