everlab workshop, june 7-8, 2006, jerusalem working with planetlab/everlab danny bickson

Post on 19-Jan-2016

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

EverLab Workshop, June 7-8, 2006, Jerusalem

Working with PlanetLab/EverLab

Danny Bickson

EverLab Workshop, June 7-8, 2006, Jerusalem

Lecture outline

• Working with ssh– Online/batch modes

• Copying file to/from an EverLab machine

• Running experiments

EverLab Workshop, June 7-8, 2006, Jerusalem

Connecting

• Connecting to an EverLab machine:

• ssh –l <username> <machine name>

• Disconnecting: exit

EverLab Workshop, June 7-8, 2006, Jerusalem

Executing a remote command

• ssh –l <slice name> <machine name> <command>

• Problem: passphrase is needed for each command!

EverLab Workshop, June 7-8, 2006, Jerusalem

Avoiding passphrase

>eval `ssh-agent`

>ssh-add

EverLab Workshop, June 7-8, 2006, Jerusalem

Debugging ssh

• Remote host public key has changed• Either the node was reinstalled or it is an attack

EverLab Workshop, June 7-8, 2006, Jerusalem

.ssh file structure

EverLab Workshop, June 7-8, 2006, Jerusalem

• Solution 1: edit known_hosts file

Remove old entry

EverLab Workshop, June 7-8, 2006, Jerusalem

• Solution 2: edit .ssh/config file:

• StrictHostKeyChecking – verifies other host public key in the known_hosts file

• BatchMode – answers affirmatively yes/no questions

EverLab Workshop, June 7-8, 2006, Jerusalem

Installing software

• Interactive mode

EverLab Workshop, June 7-8, 2006, Jerusalem

• You may also want:• yum –y install <module name>

– jdk (java)– gcc-c++ (c++), gcc-g77 (fortran)– make, gcc, binutils, tar, zip, ethereal, bison,

flex

• yum list "*ssh*" # lists packages that have "ssh" in the name

EverLab Workshop, June 7-8, 2006, Jerusalem

Installing software (2)

• Using ssh batch mode

• From a script use “ssh –n –t”

EverLab Workshop, June 7-8, 2006, Jerusalem

Copying files

• Using scp

EverLab Workshop, June 7-8, 2006, Jerusalem

Copying files (2)

• Using rsync

EverLab Workshop, June 7-8, 2006, Jerusalem

Running experiment• Stupid C++ program

• Makefile

• Compile

EverLab Workshop, June 7-8, 2006, Jerusalem

EverLab Workshop, June 7-8, 2006, Jerusalem

Running experiments

• Simple sh script

EverLab Workshop, June 7-8, 2006, Jerusalem

1) Edit config.sh file

EverLab Workshop, June 7-8, 2006, Jerusalem

2) Create a node file (list of all the machines that you like to deploy)

EverLab Workshop, June 7-8, 2006, Jerusalem

• Deploy your program

EverLab Workshop, June 7-8, 2006, Jerusalem

• Let’s verify the remote files:

EverLab Workshop, June 7-8, 2006, Jerusalem

Running your experiment

• <optional> In the config.sh file, set DEBUG=1 to get the output to the screen

EverLab Workshop, June 7-8, 2006, Jerusalem

• The result is directed to the log file

• Collect the results

EverLab Workshop, June 7-8, 2006, Jerusalem

EverLab Workshop, June 7-8, 2006, Jerusalem

Java example

EverLab Workshop, June 7-8, 2006, Jerusalem

EverLab Workshop, June 7-8, 2006, Jerusalem

EverLab Workshop, June 7-8, 2006, Jerusalem

• Run the java program

EverLab Workshop, June 7-8, 2006, Jerusalem

Advanced topics

• Using strace

EverLab Workshop, June 7-8, 2006, Jerusalem

Advanced options

EverLab Workshop, June 7-8, 2006, Jerusalem

More resources

More detailed document:

• http://www.cs.huji.ac.il/labs/danss/planetlab/PlanetlabProjectHowto.pdf

EverLab support:

everlab@gmail.com

EverLab Workshop, June 7-8, 2006, Jerusalem

THE END

• Thank you!

top related