wiki:GIMIv1.0Tutorial

Version 87 (modified by dilip.manu@gmail.com, 7 years ago) (diff)

--

GIMI Instrumentation and Measurement Tool: Tutorial Instructions

Prerequisites

  1. To prepare for the tutorial, each participant should install VirtualBox and the GENI User Workspace image on their computer. Instruction for this step can be found here: User Workspace
  1. You should have attended the ExoGENI tutorial given right before the GIMI tutorial. (Ideally, you would also have attended the OMF/OML tutorial given at GEC14.
  1. Besides OMF/OML and ExoGENI, this tutorial will make also use of iRODS and IREEL and the interested participant can find further information at the links given for both tools.
  1. Account information for all tools will be handed out on paper to the participants at the beginning of the tutorial.

Common Errors

  • Be careful cutting and pasting
    • Doesn’t work from Trac
    • Sometimes even txt file inserts hidden characters
    • Some lines require edits; don’t cut and paste the newline
  • Make terminal windows big
    • Sometimes terminal gets corrupted when pasting a line that runs to the next line (especially when backspacing)

Getting Ready

  • Bring up tutorial VM and log in.
  • Open Firefox web browser
  • Open a terminal window
  • Required SW is already installed in VM: OMF (AM, RC, EC), OML, OMLified Iperf, Nmetrics, iRODS client.
  • Download GIMI tutorial specific configuration files by issuing the following command in a user workspace terminal:
    DILIP TO ADD!!
    
  • The iRODS client uses a configuration file (~/.irods/.irodsEnv) that sets certain parameter for the icommands. Here is and example:
    # iRODS personal configuration file.
    #
    # This file was automatically created during iRODS installation.
    #   Created Thu Feb 16 14:06:27 2012
    #
    # iRODS server host name:
    irodsHost 'emmy9.casa.umass.edu'
    # iRODS server port number:
    irodsPort 1247
    
    # Default storage resource name:
    irodsDefResource 'iRODSUmass1'
    # Home directory in iRODS:
    irodsHome '/geniRenci/home/rods'
    # Current directory in iRODS:
    irodsCwd '/geniRenci/home/rods'
    # Account name:
    irodsUserName 'gimi01'
    # Zone:
    irodsZone 'geniRenci'
    

  • First of all copy the template iRODS configuration file to .irodsEnv with the following command:
    cp ~/.irods/gimiIrodsEnv ~/.irods/.irodsEnv
    
  • Open ~/.irods/.irodsEnv and change gimiXX to your assigned username (e.g., gimi04).
  • Register with iRODS server by issuing the following command (more details on iRODS will be given shortly):
    iinit
    

  • You will be prompted for a password. Please type in the password you were provided with on the paper handout!!
  • Edit ~/Tutorials/GIMI/common/gec14.rdf by changing "dilip-slice6" to the slice name you specified in Flukes. (This step is obsolete if it has already been done in the ExoGENI tutorial.)
  • The image below shows the topology and the interfaces and the routing that has been set up for the measurement:

ExoGENI topology

Part 1: OMF/OML on ExoGENI

The goal of this part of the tutorial is to instrument the topology that has been created by the tutorial participants in the preceding ExoGENI tutorial. Perform Iperf and nmetrics measurement on top of that instrumented topology and analyze data from that measurement.

  • THIS STEPS ARE ONLY NECESSARY IF NOT PERFORMED IN EXOGENI TUTORIAL:
    • In the tutorial VM start Flukes and load geni14.rdf.
    • Verify settings and create slice.
  • Each node uses the same image but runs a slightly post boot script. The post boot scripts (specified in Flukes) are shown below.
    • Node A
      echo nodeA > /etc/hostname
      hostname -F /etc/hostname
      
      echo 192.168.1.10 nodeA-L1 nodeA >> /etc/hosts
      echo 192.168.3.10 nodeA-L3 >> /etc/hosts
      
      echo 192.168.1.11 nodeB-L1 nodeB >> /etc/hosts
      echo 192.168.2.11 nodeB-L2 >> /etc/hosts
      
      echo 192.168.2.12 nodeC-L2 nodeC >> /etc/hosts
      echo 192.168.3.12 nodeC-L3 >> /etc/hosts
      
      route add -net 192.168.2.0 netmask 255.255.255.0  gw 192.168.1.11
      
      curl http://emmy8.casa.umass.edu/omf-resctl.yaml -o
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:name\:/\:name\: \'nodeA\' /g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:slice\:/\:slice\: gimi01-gec14/g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      
    • Node B
      echo nodeB > /etc/hostname
      hostname -F /etc/hostname
      
      
      echo 192.168.1.10 nodeA-L1 nodeA >> /etc/hosts
      echo 192.168.3.10 nodeA-L3 >> /etc/hosts
      
      echo 192.168.1.11 nodeB-L1 nodeB >> /etc/hosts
      echo 192.168.2.11 nodeB-L2 >> /etc/hosts
      
      echo 192.168.2.12 nodeC-L2 nodeC >> /etc/hosts
      echo 192.168.3.12 nodeC-L3 >> /etc/hosts
      
      echo 1 >  /proc/sys/net/ipv4/ip_forward
      
      curl http://emmy8.casa.umass.edu/omf-resctl.yaml -o
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:name\:/\:name\: \'nodeB\' /g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:slice\:/\:slice\: gimi01-gec14/g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      
    • Node C
      echo nodeC > /etc/hostname
      hostname -F /etc/hostname
      
      echo 192.168.1.10 nodeA-L1 nodeA >> /etc/hosts
      echo 192.168.3.10 nodeA-L3 >> /etc/hosts
      
      echo 192.168.1.11 nodeB-L1 nodeB >> /etc/hosts
      echo 192.168.2.11 nodeB-L2 >> /etc/hosts
      
      echo 192.168.2.12 nodeC-L2 nodeC >> /etc/hosts
      echo 192.168.3.12 nodeC-L3 >> /etc/hosts
      
      route add -net 192.168.1.0 netmask 255.255.255.0  gw 192.168.2.11
      
      curl http://emmy8.casa.umass.edu/omf-resctl.yaml -o
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:name\:/\:name\: \'nodeC\' /g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:slice\:/\:slice\: gimi01-gec14/g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      
  • The images running on the ExoGENI nodes include the following software:
    • OMF (AM, RC, EC)
    • OML
    • OMLified Iperf, nmetrics
    • iRODS client
  • Note
    • The OMF experiment controller (EC) that controls the experiment is based on unique host name and experiment name
    • After initial boot up ExoGENI nodes host names are always initially set to "debian"
    • The node names will be automatically set to the correct names by a post boot script (defined in Flukes). The code snippet below shows the section of the post boot script that performs this step (for the case of node A) :
      echo nodeA > /etc/hostname
      hostname -F /etc/hostname
      
    • The experiment name has to be set to the unique slice name of your ExoGENI request
  • In the following, we describe the steps to verify the initial topology setup on ExoGENI:
    • Change the post boot script option to add slice name as the experiment name. Therefore change the existing experiment name "gec14-gimi01" in line five to the experiment that includes your account name. E.g., if your account name is "gimi05" the experiment name has to be changed to "gimi05-gec14"!!
      curl http://emmy8.casa.umass.edu/omf-resctl.yaml -o
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:name\:/\:name\: \'nodeA\' /g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      perl -i.bak -pe "s/\:slice\:/\:slice\: gimi01-gec14/g"
      /etc/omf-resctl-5.4/omf-resctl.yaml
      
    • Request the ExoGENI slice using Flukes
  • XMPP

The RCs and the EC communicate via an XMPP server. The GIMI XMPP is running on emmy9.casa.umass.edu.

  • First the ExoGENI instances and the experiment slice should be registered with the XMPP server. You can achieve this using the OMF AM by issuing the following command from a terminal in the user workspace.
    omf_create_psnode-5.4 "XMPP Server" mkslice "slice_name" "list_of_nodenames"
    
    E.g., omf_create_psnode-5.4 emmy9.casa.umass.edu mkslice gimi01-gec14 nodeA nodeB nodeC
    

If this succeeds you should see an output similar to the one below

DEBUG: Try to connect to Pubsub Gateway 'emmy9.casa.umass.edu'...
DEBUG: Try to connect to Pubsub Gateway 'emmy9.casa.umass.edu:5222'...
DEBUG: Connected as 'aggmgr@emmy9.casa.umass.edu' to XMPP server: 'emmy9.casa.umass.edu'
Connected to PubSub Server: 'emmy9.casa.umass.edu'

In the above command, please change "gimi01" to the user name provided to you.

  • Login to nodes A, B, and C through Flukes and start the RC deamon by issuing the following command:
    /etc/init.d/omf-resctl.5.4 restart
    
  • Finally, verify that the RC has been brought up and is listening to the XMPP server by checking the RC log.
    cat /var/log/omf-resctl.log
    

And you should see the following lines and the end of the log file:

2012-06-30 23:49:10 DEBUG nodeAgent::OMFPubSubTransport: Listening on '/OMF/dilip-testing/resources/nodeA' at 'emmy9.casa.umass.edu'
2012-06-30 23:49:10 DEBUG nodeAgent::OMFPubSubTransport: Listening on '/OMF/dilip-testing' at 'emmy9.casa.umass.edu'
  • OML Server

For this tutorial we have an OML server running on emmy9.casa.umass.edu, which collects the measurement data as an sqlite3 database and at the end of the experiment it pushes the data to IRODS.

  • Here is how you would have to start an OML server if you wanted to run this on a different machine (OML2.8) is required. DO NOT perform this task in the tutorial!!!! This is explained the [OML installation file].
oml2-server --listen=3003 --data-dir=~ --logfile=oml_server.log -H ~/oml2-2.8.0/server/oml2-server-hook.sh
  • Experiment (Finally!)

The following image gives an overview of the different OMF components and how they interact

  • The experiment will be automatically executed by the OMF EC which is defined by a experiment description file (EDF) written in ruby.
  • We have prepared the necessary ED files for the experiment described above. The file can be found in the tutorial VM under ~/Tutorials/GIMI/common/tcp_iperf.rb.

  • We start the experiment running the following command from the user workspace terminal:
    omf-5.4 exec --no-cmc -S "slice_name" "ED file name" -- -- source1 "hostname" --sink "hostname"
    
    Eg., omf-5.4 exec --no-cmc -S testing tcp_iperf.rb -- --source1 nodeA --sink nodeC
    
  • The command tries to load the topology and start the experiment and you should see XMPP messages such as below,
INFO NodeHandler: OMF Experiment Controller 5.4 (git 529a626)
 INFO NodeHandler: Slice ID: dilip-testing (default)
 INFO NodeHandler: Experiment ID: dilip-testing
 INFO NodeHandler: Message authentication is disabled
 INFO Experiment: load system:exp:stdlib
 INFO property.resetDelay: value = 210 (Fixnum)
 INFO property.resetTries: value = 1 (Fixnum)
 INFO Experiment: load system:exp:eventlib
 INFO Experiment: load tcp_iperf.rb
 INFO property.source1: value = "nodeA" (String)
 INFO property.sink: value = "nodeC" (String)
 INFO Topology: Loading topology 'nodeA'.
 INFO Topology: Loading topology 'nodeA'.
 INFO Topology: Loading topology 'nodeC'.
 INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks.
 INFO exp: Request from Experiment Script: Wait for 10s....
  • Ignore the error messages that are shown during the execution of the experiment. They are essentially warnings! If everything goes well with the experiment, you should see the XMPP messages on the screen stop at this point for few seconds,
ERROR NodeHandler:   The resource 'nodeC' reports that an error occured 
ERROR NodeHandler:   while running the application 'iperf_app#3'
ERROR NodeHandler:   The error message is 'WARN   --> OML_LONG_VALUE is deprecated and should not be used in new code'
ERROR NodeHandler: 
ERROR NodeHandler:   The resource 'nodeC' reports that an error occured 
ERROR NodeHandler:   while running the application 'iperf_app#3'
ERROR NodeHandler:   The error message is 'WARN   --> Values outside of [INT_MIN, INT_MAX] will be clamped!'
ERROR NodeHandler: 
ERROR NodeHandler:   The resource 'nodeC' reports that an error occured 
ERROR NodeHandler:   while running the application 'iperf_app#3'
ERROR NodeHandler:   The error message is 'INFO   Net_stream: connecting to host tcp://emmy9.casa.umass.edu:3003'
  • If you do not see this message, then please call for help!!
  • Once you see the above messages and the experiment ends. Please run the following bash script from the "~/Tutotrials/GIMI/common/" directory. This script starts the experiment in a loop.
./tutorial_ec_script.sh
  • Visualization
    • Once you have started the experiment in loop and is providing no errors, please open another terminal in you user workspace. Goto "~/Tutorials/GIMI/common" directory, and run the following command to create the visualization of the experiment carried out. Please change "gimi01" in the command to your username.
./tutorial_viz.sh gimi01-tutorial
  • Please open the firefox browser and type "127.0.0.1/oml.html" to view the visualization!!
  • The visualization script contains a "R" script to generate pdf/jpg based on the sqlite3 measurement database file generated by the OMLified application. The script is provided below.
library(RSQLite)
con <- dbConnect(dbDriver("SQLite"), dbname = "gec14-test6.sq3")
dbListTables(con)
dbReadTable(con,"iperf_transfer")
mydata <- dbGetQuery(con, "select begin_interval,size,end_interval from iperf_transfer")
intervals <- mydata$end_interval - mydata$begin_interval
throughput <- mydata$size/intervals/1024/1024*8
pdf("gec14-test6.pdf")
plot(throughput,type="o",col="red",xlab="Experiment Interval",ylab="Throughput (Mbps)")
title(main="Iperf_Experiment", col.main="blue", font.main=4)
dev.off()

Part 2: iRODS - GIMI's Measurement Repository

In GIMI, iRODS is used as the repository for measurement data. At the moment our iRODS data system consist of three servers (RENCI, NICTA, and UMass) and a metadata catalog (located at RENCI).

We will use part 2 of this tutorial to make the participants more familiar with iRODS and how we use it in GIMI.

  • After successful completion of part 1 of the tutorial the measurement data from the experiment has been stored in iRODS. We will now look into two options on how this data can be handled.

  1. iRODS command line tools in the user work space:
    • The GENI User Workspace comes already with the iRODS command line tools installed.
    • If you have not done so far use iinit to create a file that contains your iRODS password in a scrambled form. This will then be used automatically by the icommands for authentication with the server.
      iinit
      

You will be prompted for a password. Please enter the one given on the paper handout.

  • The iRODS client uses a configuration file (~/.irods/.irodsEnv) that sets certain parameter for the icommands. Here is and example:
    # iRODS personal configuration file.
    #
    # This file was automatically created during iRODS installation.
    #   Created Thu Feb 16 14:06:27 2012
    #
    # iRODS server host name:
    irodsHost 'emmy9.casa.umass.edu'
    # iRODS server port number:
    irodsPort 1247
    
    # Default storage resource name:
    irodsDefResource 'iRODSUmass'
    # Home directory in iRODS:
    irodsHome '/geniRenci/home/rods'
    # Current directory in iRODS:
    irodsCwd '/geniRenci/home/rods'
    # Account name:
    irodsUserName 'gimi01'
    # Zone:
    irodsZone 'geniRenci'
    
  • Retrieve file from iRODS into user workspace.
    iget
    
  • Store data in user workspace.
    iput
    
  1. iRODS web interface:

iRODS also provides a nice and easy to use web interface, which we will explore in the following.

  • Point the browser in your user workspace to the following link: https://www.irods.org/web/index.php
  • Input the following information to sign in:
    Host/IP: emmy9.casa.umass.edu
    Port: 1247
    Username: as given on printout
    Password: as given on printout
    
  1. IRODS and OML

In GIMI we have enabled an option in OML2.8 that allows the execution of script. We use this functionality to automatically save measurement results in IRODS after a measurement has successfully completed.

  1. DISCLAIMER

The iRODS service we are offering within the scope of GIMI does NOT guarantee 100% reliable data storage (i.e., we do NOT back up the data). If you are performing your own experiments and want to use iRODS you are absolutely welcome but be aware that we do NOT guarantee recovery from data loss.

Part 3: IREEL - GIMI's Measurement Portal

The web portal for GIMI is based on NICTA's Internet Remote Emulation Experiment Laboratory (IREEL). We have set up an IREEL instance for GIMI.

Attachments (8)