PlanetLab Labs
Network Simulation and Testing
- Lab 1. Getting Start with PlanetLab
- Create and upload your public key to your team account in PlanetLab
- The username is 'netsim_team#@nslab.ee.ntu.edu.tw'
- The password for PlanetLab website is emailed to each team
- The slice 'ntuee_team#' is associated with the user 'netsim_team#@nslab.ee.ntu.edu.tw'.
- Login to the adam.ee.ntu.edu.tw/eve.ee.ntu.edu.tw by slice name and the passphrase of public key.
- ssh -l slice_name -i /path/to/your/private/key adam.ee.ntu.edu.tw
- Download two test program, compile and run:
- Server Program
- Client Program
- To compile the code, you need su as root and install gcc by yum. (hint: man sudo and man yum)
- Compile Server Program: gcc -o server svc_socket.c
- Compile Client Program: gcc -o client clnt_socket.c
- Run Server Program: ./server assigned_port
- Run Client Program: ./client localhost assigned_port
- Lab 2. Adding Nodes to Your Slice
- Retrieve nodes list from CoMon
- Retrieve alive nodes list with select='resptime > 0'
- Save the nodes list as nodes.txt
- Add all alive nodes to your slice by XMLRPC
- Sample Code
- Please note that : 1hr~2hr is needed for Planetlab distributing the authentication info into nodes
- You may view which nodes currently associated with your slice at PlanetLab
- Lab 3. Deploying the Client Program to Your Nodes
- Cache passphrase by ssh-agent (optional)
- Doing this for avoiding typing in your passprase each time when you login a node.
This is optional but sometimes necessary, especially when you are logging in hundreds of nodes.
- To run ssh-agent, run this command (assuming your shell is bash)
$ eval `/usr/bin/ssh-agent -s`
- Then you will need to add your key to the running agent. To do this, run:
$ ssh-add /path/to/your/private/key
- Disable Host Key Checking:
echo "StrictHostKeyChecking no" >> ~/.ssh/config
- Install CoDeploy
- Download codeploy.tar.gz
- Unzip source code tar zxvf codeploy.tar.gz
- Install gcc and make by yum sudo yum install gcc make
- cd codeploy; make
- Set environment variable for CoDeploy (assuming bash)
- export PATH=${PATH}:/home/your_slice_name/codeploy
- export MQ_SLICE=your_slice_name
- export MQ_NODES=/path/to/nodes.txt
- hash -r
- Distribute code by "multicopy" in CoDeploy
- ./multicopy filename @:client
- Run the program
- First, run your server on adam.ee.ntu.edu.tw/eve.ee.ntu.edu.tw
- Then, run your client program on each node by:
- ./multiquery './client adam.ee.ntu.edu.tw your_assigned_port'
- The client program will send a message to the server program
- Show the messages on the server side to Polly
Reference:
- PlanetLab official site
- PlanetLab Tutorial (pdf)
- Using PlanetLab for Network Research: Myths, Realities, and Best Practices (pdf)