wiki:GeniTmixTutorial

Version 32 (modified by Ben Newton, 11 years ago) (diff)

--

Using Tmix on GENI

This page describes how to run experiments with Tmix on GENI nodes. This tutorial assumes that you are already familiar with basic experimentation with GENI, and that you have access to some version of Linux/Unix running on a PC or virtual machine. We also assume basic familiarity with Linux/Unix.

1 Install Omni

This tutorial will use Omni, which is a command line interface tool for reserving GENI resources. If you do not already have Omni installed and set up, please follow Step 1 (Configuring Omni with your GENI Account) here. Please note, it may take 30-45 minutes to get Omni installed and configured. Also note when installing Omni, the ./omni-configure.py script may need to be run from your gcf/src directory, and you may need to create the .ssl subdirectory in your home directory.

2 Extra Omni Configuration

2.1 Add gcf/src to path (optional but recommended)

Although optional, it will be helpful to add the gcf/src directory to your path and python path. To do this, replace "/path/to/gcf" in the lines below with the path to your copy of gcf, and add the lines to the end of your .profile file or equivalent.

PATH="/path/to/gcf/src:$PATH"
export PYTHONPATH="/path/to/gcf/src:$PATH"

Once you have added the lines and saved the file, run

source .profile

to setup the path environment variables for this session. This will be done automatically from now on.

If you don't make this change, you may need to add python in front of all the omni commands, and call them from within the gcf/src directory.

2.2 Clear Passphrases (optional but recommended)

We recommend that you clear the passphrase from your SSL certificate and/or your SSH key that you will use to login to your nodes. This step is also optional, however, if you don't clear your passphrases some commands will require you to enter your it several times, which can become burdensome. To clear the passphrases from your certificate and key run this script:

clear-passphrases.py 

3 A Simple Tmix Experiment

3.1 Reserve Resources

The following is the request rspec for a simple two node network. It requests two raw nodes named left and right, each with a single interface named left:if0 and right:if0 respectively. A link named left-right-lan connects these interfaces.

rspec here

Think of a unique name for your slice. We recommend the slice name begin with your GENI username. Create a new slice by issuing the following command with your unique slice name in place of <sliceName>.

omni.py createslice <sliceName>

Next, create a sliver with the resources requested in the rspec by issuing the following command where <sliceName> is again replaced with the unique slice name you have chosen.

omni.py -a pg-utah <sliceName> two-nodes-tmix.rspec

Note: this and future steps assume your ~/.gcf/omni_config includes a mapping from nickname pg-utah to https://www.emulab.net:12369/protogeni/xmlrpc/am. If pg-utah causes issues, you can use the full url in the -a option.

If the resources were successfully reserved the Result Summary from Omni should say: Got Reserved resources ...

Look back further in the output and you should see two lines which include "hostname=pc???.emulab.net". These are the hostnames of the machines reserved for your experiment. Make note of these hostnames for later use.

In addition to listing desired resources, the rspec also specifies a script to be run at boot time on the host. This script configures the host for Tmix.

3.2 Login to nodes

We suggest you now open two new terminal windows, one for each node. To log into the nodes reserved in the previous step issue the following command for each node in one of the new windows.

ssh -i ~/.ssh/geni_key <username>@<hostname>

As expected, <username> should be replaced with your GENI username, and <hostname> is replaced with the hostname noted in the previous step.

It may take a few minutes for the hosts to be imaged, and boot fully. If you are unable to login keep trying for a few minutes.

3.3 Run Tmix

Make yourself root and move to the tmix directory by issuing the following commands on both nodes:

sudo -i
cd /usr/tmix/tmix

Tmix relies upon a pre-determined start time to synchronize tmix on the two noded. On both nodes run the following command to determine the time and date:

date

Note that the time may be in a different time zone. Decide on a start time about 1-2 minutes in the future, relative to the time displayed by the date command. It should be far enough in the future for you to issue the following command on both nodes with 30 seconds to spare before that start time.

Finally, execute the following command on both nodes:

./tmix -s HH:MM:SS tmix.conf

where HH:MM:SS is the chosen start time in hours minutes and seconds.

Tmix on both hosts will load the data files and then wait until the designated start time. You will see Running for ???? seconds once tmix has started.

3.3 Delete sliver

Once your experiment is complete and you have collected your results, you should return the reserved resources. To do this, execute the following command:

omni.py -a pg-utah deletesliver <sliceName>

where <sliceName> is once again replaced with your chosen unique slice name.