Changes between Initial Version and Version 1 of GEC12OmniTutorial/Tutorial


Ignore:
Timestamp:
11/04/11 08:50:17 (12 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC12OmniTutorial/Tutorial

    v1 v1  
     1[[PageOutline]]
     2= Advanced Topics in Networking Experiments using GENI =
     3[[br]]
     4= Prework =
     5   1. Download and install [http://www.virtualbox.org/ VirtualBox] on your machine, we have tested versions 4.0.8, 4.0.10, 4.0.12.
     6      * If you run Ubuntu 10.04, it comes with !VirtualBox 3.1.6_OSE, which will not work, please download the latest version. 
     7   2. [https://www.planet-lab.org/GEC11/ Download] the VM image
     8   3. Run !VirtualBox and Import Appliance (File->Import Ampliance), accept the default settings for the VM.
     9      * If you are using a FAT32 filesystem you will NOT be able to load the image.
     10   4. Start the VM and log in
     11   5. Change the default password, click on the getversiontask bar on the top, on the right on the user 'geni', and choose the Change Password button.
     12   6. Verify that the VM has connectivity. Start Firefox (shortcut on the top bar) and try to load Google. If you can't reach any website, restore VM's Network connection.
     13      * On the far right on the top bar, there is the network icon (two opposite facing arrows).
     14      * Click that icon and choose 'Auto eth0'.
     15      * Try loading the webpage again.
     16
     17= Useful Tips =
     18   * You '''can copy-paste''' between the host and the guest VM.
     19   * In the terminal within the VM, use '''Ctrl-Shift-C to copy''' and '''Ctrl-Shift-V to paste'''.
     20   * vim and emacs editors are installed on the VM, so feel free to use them for editing your files
     21      * If you are using vim, while in command mode to replace a pattern in the file type
     22      {{{
     23      %s/pattern/replace_text/gc
     24      }}}
     25      And press 'y' for the instances of the pattern you want replaced, 'n' otherwise.
     26      * If you are using emacs, press Alt-x and then type
     27      {{{
     28query-replace
     29      }}}
     30      and press ENTER. Enter the pattern to be replaced, press ENTER, enter the text you want to replace it with and press ENTER. Press 'y' for the instances of the pattern you want replaced, 'n' otherwise.
     31   * If you want to have a shared folder between your machine and the VM so that it's easier to transfer files during the tutorial, you have to do this before starting the VM. Follow [http://ozz314.wordpress.com/2008/05/08/virtualbox-shared-folders-between-ubuntu-guest-and-mac-host/ these instructions]   
     32   * If you get an error running Omni, look at the [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot troubleshoot page] for help.
     33
     34= Overview of Alice's Experiment =
     35Alice and Bob, two GENI experimenters, have volunteered to help us write these instructions. They are going to reserve separate hosts but they will be sharing the network infrastructure.
     36
     37[[Image(alice-bob-setup.png, 60%)]]
     38
     39Alice's information for the tutorial is :
     40|| '''<USERNAME>''' || alice || The user name for the tutorial's GPO ProtoGENI account ||
     41||'''ProtoGENI host''' || pg46.emulab.net (@clemson)|| Node controlled by Utah's ProtoGENI AM ||
     42||'''<PCNAME>''' || pg46 || For PG rspec ||
     43||'''MyPLC host''' || of-planet1.stanford.edu || Node controlled by Stanford's MyPLC AM ||
     44||'''Backup MyPLC host''' || navis.gpolab.bbn.com || Node controlled by GPO's MyPLC AM, if you run into problems with the first MyPLC host, you can try again with this host||
     45||'''<SUBNET>''' || 10.42.122.0/24 || The subnet to use for Layer3 ping ||
     46||'''<SUBNET-OCT>''' || 122 || For the OF rspec ||
     47||'''<ETH-TYPE>''' || 10122 || The ethernet type for Layer2 ping, for the OF rspec||
     48||'''<PORT>''' || 10122 || The port that the OpenFlow controller is listening on ||
     49
     50And after Alice and Bob completed the tutorial, Alice's scratchpad is :
     51
     52|| '''SCRATCHPAD''' ||'''Complete this info'''  || ||
     53||'''My MyPLC host IP(131)''' || 10.42.131. '''90'''  || IP address of your MyPLC host on the pre-configured subnet ||
     54||'''MyPLC login name''' ||'''pgenigpolabbbncom_aliceslice '''|| Your login name to the MyPLC hosts ||
     55||'''Neighbor's MyPLC host IP(131)''' || 10.42.131. '''52'''|| IP address of your neighbor's MyPLC host on the pre-configured subnet ||
     56||'''My MyPLC host IP(your subnet)''' || 10.42 . '''122''' . '''90'''|| The IP address of your MyPLC host on your subnet ||
     57||'''Neighbor's MyPLC host IP(your subnet)''' || 10.42 . '''122''' . '''52'''|| IP address of your neighbor's MyPLC host on the your subnet ||
     58
     59= I. Getting Started =
     60== 1. Configure Omni ==
     61The purpose of this first exercise is to setup [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] to use your credentials and keys.
     62
     63=== 1a. Setup omni ===
     64Omni uses as input a configuration file, where you can specify information such as which clearinghouse to use, where your certificate and keys are located, etc. Under the ''Tutorials/Omni/<username>'' directory (where <username> is your username on the piece of paper you were given upon entering the room), there is a configuration file, ''omni_config''.
     65
     66   * '''Open a terminal''' (there is a shortcut on the top bar).
     67   * First lets update the files that are on the VM:
     68      {{{
     69cd Tutorials/Omni/
     70downloadRSpecs.sh
     71      }}}
     72   
     73   * The rest of the tutorial assumes that you are under the ''Tutorials/Omni/<username>'' directory :
     74      {{{
     75cd <username>
     76      }}}
     77   * '''Remove the passphrase''' from your certificate. For security best practices you should keep a passphrase on your certificate. To avoid typing the passphrase throughout the tutorial, we will temporarily remove the passphrase. Run
     78   {{{
     79   clear_cert.sh <username>
     80   }}}
     81   It will prompt you for the passphrase which should be included on the slip that was given to you.
     82   * Verify that you have the necessary credential and key files
     83     {{{
     84     ls ssh |grep <username>
     85     }}}
     86     For gpousr21 the output looks like :
     87     {{{
     88geni@geni-vm:~/omni_tutorial$ ls ssh | grep gpousr21
     89gpousr21_cert_ct.pem
     90gpousr21_cert.pem
     91gpousr21_key
     92gpousr21_key.pub
     93     }}}
     94
     95   || gpousr21_cert_ct.pem || Cleartext certificate for gpousr21, i.e. does not require any passphrase ||
     96   || gpousr21_cert.pem || Encrypted certificate for gpousr21 ||
     97   || gpousr21_key || The private key that gpousr21 would use to login to the nodes ||
     98   || gpousr21_key.pub || The corresponding public key that gpousr21 will ask to be loaded to the nodes ||
     99
     100   * '''Look at the  omni_config'''. Open omni_config. For the tutorial you should use the cleartext certificate, but when running your own experiments, for security best practices always use your encrypted certificate.
     101
     102   For ''gpousr21'' using a cleartext certificate the omni_config file looks like :
     103
     104   {{{
     105# This file is the omni_config for GEC 12 tutorial
     106# Experimental topologies on the GENI Mesoscale network with Omni
     107
     108# General section of omni config
     109[omni]
     110default_cf = pgeni
     111users = gpousr21
     112
     113# ---------- Users ----------
     114[gpousr21]
     115# Make sure the urn matches the URN of the credential
     116urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21
     117
     118# Public key to be installed in compute resources. For multiple
     119# keys use a comma separated file
     120keys = ~/Tutorials/Omni/gpousr20/ssh/gpousr21_key.pub
     121
     122# If -a option is not specified the omni command will by run against all
     123# the following AMs
     124aggregates =  http://emulab.net/protogeni/xmlrpc/am, https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am, http://myplc.gpolab.bbn.com:12346/, http://myplc.clemson.edu:12346/, https://myplc.stanford.edu:12346/, https://wings-openflow-1.wail.wisc.edu:12346/, https://of.cs.washington.edu:12346/, https://plc.orbit-lab.org:12346/, https://myplc.grnoc.iu.edu:12346/, https://myplc.cip.gatech.edu:12346/, https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi
     125
     126# ---------- Frameworks ----------
     127[pgeni]
     128type = pg
     129ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
     130sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa
     131
     132# Use the following two lines if you are using
     133# a certificate with a passphrase
     134#cert = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert.pem
     135#key = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert.pem
     136
     137# Use the following two lines if you are using
     138# a cleartext cert.
     139cert = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert_ct.pem
     140key = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert_ct.pem
     141
     142#------AM nicknames----------------
     143# Instead of typing the whole url of an AM in the -a option you can
     144# specify a nickname in this section and use the nickname instead
     145
     146# Format :
     147# Nickname=URN, URL
     148# URN is optional
     149[aggregate_nicknames]
     150# ProtoGENI AMs and PlanetLab central
     151pg-gpo=urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+am,https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am
     152pg-utah=,https://www.emulab.net/protogeni/xmlrpc/am
     153pg-ky=urn:publicid:IDN+uky.emulab.net+authority+am,https://www.uky.emulab.net/protogeni/xmlrpc/am
     154plc=,https://www.planet-lab.org:12346
     155
     156# Private myplc installations
     157pl-gpo=,http://myplc.gpolab.bbn.com:12346/
     158pl-clemson=,http://myplc.clemson.edu:12346/
     159pl-stanford=,https://myplc.stanford.edu:12346/
     160pl-wisconsin=,https://wings-openflow-1.wail.wisc.edu:12346/
     161pl-washington=,https://of.cs.washington.edu:12346/
     162pl-rutgers=,https://plc.orbit-lab.org:12346/
     163pl-indiana=,https://localhost:1234/
     164pl-gatech=,https://localhost:2346/
     165
     166
     167# Tutorial OpenFlow AM
     168of-tut=,https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi
     169
     170# Other OpenFlow AMs
     171of-gpo=,https://foam.gpolab.bbn.com:3626/foam/gapi
     172   }}}
     173
     174   Note, the pgeni framework definition includes the Utah Emulab clearinghouse, which is the only clearinghouse for ProtoGENI aggregates. For additional configuration details please see the [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] page for more details.  The omni_configuration parameters shown define the following:  [[BR]]
     175   || '''Parameter'''   || ''' Use'''  ||
     176   || default_cf||  Default Clearinghouse and credentials used if not specified on the command line.  ||
     177   || users||  users setting used when reserving slices. ||
     178   || urn||  The username URN ||
     179   || keys|| A comma separated list of public ssh key files to be uploaded to the Clearinghouse and to your resources ||
     180   || type||  Clearinghouse/credentials type "pg" indicates ProtoGENI, see the [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] page. ||
     181   || ch||  ProtoGENI Clearinghouse URL. ||
     182   || sa|| Slice Authority URL. ||
     183   || cert||  Location of your SSL encrypted certificate (contains both a certificate and a key). ||
     184   || key||  Location of your SSL encrypted key (contains both a certificate and a key). ||
     185   || <AM nickname>|| Optional URN, required URL of an Aggregate Manager. ||
     186
     187   * Verify that the user URN is correct.
     188     Get the URN from your omni config
     189     {{{
     190     grep urn omni_config
     191     }}}
     192     Verify that it matches the urn in your cert (disregard the leading URI:)
     193     {{{
     194     openssl x509 -noout -text -in ./ssh/<username>_cert_ct.pem | grep 'urn:publicid'
     195     }}}
     196     For gpousr21 the output looks like
     197     {{{
     198geni@geni-vm:~/omni_tutorial$ grep urn omni_config
     199urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21
     200geni@geni-vm:~/omni_tutorial$ openssl x509 -noout -text -in ./ssh/gpousr21_cert_ct.pem | grep 'urn:publicid'
     201                URI:urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21, email:gpousr21@pgeni.gpolab.bbn.com
     202     }}}
     203
     204=== 1b. Test configuration ===
     205In order to test that our configuration is correct, you can issue a getversion command. For this step we have used !PlanetLab's AM, but you can use any Aggregate Manager(AM).
     206{{{
     207omni.py getversion -a http://www.planet-lab.org:12346
     208}}}
     209
     210Or equivalently using the !PlanetLab nickname:
     211{{{
     212omni.py getversion -a plc
     213}}}
     214
     215gpousr21 decided to use !PlanetLab central :
     216{{{
     217#!xml
     218geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py getversion -a plc
     219INFO:omni:Loading config file omni_config
     220INFO:omni:Using control framework pgeni
     221INFO:omni:Substituting AM nickname plc with URL https://www.planet-lab.org:12346, URN unspecified_AM_URN
     222INFO:omni:AM URN: unspecified_AM_URN (url: https://www.planet-lab.org:12346) has version:
     223INFO:omni:{   'ad_rspec_versions': [   {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/gre-tunnel/1',
     224                                                   'http://www.protogeni.net/resources/rspec/ext/other-ext/3'],
     225                                 'namespace': 'http://www.protogeni.net/resources/rspec/2',
     226                                 'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd',
     227                                 'type': 'ProtoGENI',
     228                                 'version': '2'},
     229                             {   'extensions': [],
     230                                 'namespace': None,
     231                                 'schema': None,
     232                                 'type': 'SFA',
     233                                 'version': '1'}],
     234    'code_tag': '1.0-35',
     235    'code_url': 'git://git.onelab.eu/sfa.git@sfa-1.0-35',
     236    'default_ad_rspec': {   'extensions': [],
     237                            'namespace': None,
     238                            'schema': None,
     239                            'type': 'SFA',
     240                            'version': '1'},
     241    'geni_api': 1,
     242    'hostname': 'www.planet-lab.org',
     243    'hrn': 'plc',
     244    'interface': 'aggregate',
     245    'request_rspec_versions': [   {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/gre-tunnel/1',
     246                                                        'http://www.protogeni.net/resources/rspec/ext/other-ext/3'],
     247                                      'namespace': 'http://www.protogeni.net/resources/rspec/2',
     248                                      'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd',
     249                                      'type': 'ProtoGENI',
     250                                      'version': '2'},
     251                                  {   'extensions': [],
     252                                      'namespace': None,
     253                                      'schema': None,
     254                                      'type': 'SFA',
     255                                      'version': '1'}],
     256    'sfa': 1,
     257    'testbed': 'myplc'}
     258INFO:omni: ------------------------------------------------------------
     259INFO:omni: Completed getversion:
     260
     261  Options as run:
     262                aggregate: plc
     263                framework: pgeni
     264                native: True
     265
     266  Args: getversion
     267
     268  Result Summary:
     269Got version for 1 out of 1 aggregates
     270 
     271INFO:omni: ============================================================
     272}}}
     273
     274== 2. Make a slice ==
     275Before we continue with the rest of the tutorial, we need to create a slice that will contain all our slivers with the different AMs.
     276Since the omni_config specifies using GPO's ProtoGENI as the Slice Authority (SA), your slice will be created in the pgeni.gpolab.bbn.com namespace. 
     277
     278=== 2a. Createslice ===
     279For this tutorial we will create a slice named ''gposlice##'' (where ## matches your username); you should always choose a slice name that is meaningful to you. To avoid confusion, avoid creating a slice with the same name as your username (i.e. if your username is ''alice'', don't name your slice ''alice'' too).
     280{{{
     281omni.py createslice gposlice##
     282}}}
     283
     284
     285=== 2b. Renew Slice ===
     286Note in the above output that our new slice expires soon. Your slivers can not last longer then your slice, and your resources will go away when the reservation expires. For your experiments be sure to renew your slice for the duration of your experiment. For the tutorial you don't need to extend the lifetime, but if you wanted to, this is what it would look like:
     287
     288{{{
     289omni.py renewslice gposlice## 20111105T00:00:00
     290}}}
     291
     292For Alice the output would like:
     293{{{
     294geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py renewslice gposlice21 20111105T00:00:00
     295INFO:omni:Loading config file omni_config
     296INFO:omni:Using control framework pgeni
     297INFO:omni.protogeni:Requesting new slice expiration '2011-11-05T00:00:00'
     298INFO:omni:Slice gposlice21 now expires at 2011-11-05 00:00:00 UTC
     299INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21 expires on 2011-11-05 00:00:00 UTC
     300INFO:omni: ------------------------------------------------------------
     301INFO:omni: Completed renewslice:
     302
     303  Options as run:
     304                framework: pgeni
     305                native: True
     306
     307  Args: renewslice gposlice21 20111105T00:00:00
     308
     309  Result Summary: Slice gposlice21 now expires at 2011-11-05 00:00:00 UTC
     310Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21 expires on 2011-11-05 00:00:00 UTC
     311INFO:omni: ============================================================
     312
     313}}}
     314
     315'''Note:''' You can not renew the slice expiration time to an earlier time that its current expiration time. Also there is no deleteslice operation. However, you can delete all the slivers in your slice and let the slice expire.
     316
     317
     318=== 2c. List your Slices ===
     319If you want to find out what slices you currently have, you can use an Omni command to {{{listmyslices}}}.
     320{{{
     321omni.py listmyslices <username>
     322}}}
     323
     324We've pre-reserved resources in a second slice (ctrl##) in advance of the tutorial for each user.
     325
     326So for gpousr21 the output would look like :
     327{{{
     328geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py listmyslices gpousr21
     329INFO:omni:Loading config file omni_config
     330INFO:omni:Using control framework pgeni
     331INFO:omni:User 'gpousr21' has slices:
     332        urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21
     333        urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ctrl21
     334INFO:omni: ------------------------------------------------------------
     335INFO:omni: Completed listmyslices:
     336
     337  Options as run:
     338                framework: pgeni
     339                native: True
     340
     341  Args: listmyslices gpousr21
     342
     343  Result Summary: Found 2 slices for user 'gpousr21'.
     344 
     345INFO:omni: ============================================================
     346
     347}}}
     348
     349== 3. Make a ProtoGENI sliver ==
     350The first resource we are going to add to our slice is a ProtoGENI host.
     351
     352=== 3a. Createsliver ===
     353Under the ''Tutorials/Omni/<username>'' directory, there is a directory called ''rspecs'' that has all the necessary RSpecs for the tutorial. For this tutorial we are going to use ProtoGENI hosts from GPO's ProtoGENI, as well as Wide Area ProtoGENI hosts from Utah's ProtoGENI cluster.
     354   * If your ProtoGENI host is in the '''emulab.net'''(e.g. pg30.emulab.net), namespace then it belongs to Utah's cluster and you should use Utah's AM (nickname: pg-utah), and use '''rspecs/final/protogeni_utah_<username>.rspec'''
     355
     356   * If your ProtoGENI host is in the '''pgeni.gpolab.bbn.com'''(e.g. pc1.pgeni.gpolab.bbn.com), namespace then it belongs to GPO's cluster and you should use GPO's AM (nickname: pg-gpo), and use '''rspecs/final/protogeni_gpo_<username>_v02.rspec'''
     357
     358   * '''Advanced Option''': If you are interested in creating your own RSpecs follow the instructions under [#ReservingProtoGENInodeswithFlack Reserving ProtoGENI nodes with Flack].  Then skip to the [#a3b.Sliverstatus Next Step].
     359
     360   gpousr21 was assigned host pc1.pgeni.gpolab.bbn.com so she should use pg_gpo.rspec:
     361   {{{
     362#!xml
     363<!--
     364This rspec will reserve one wide-area ProtoGENI host
     365
     366AM: http://www.emulab.net/protogeni/xmlrpc/am
     367-->
     368<!--  This file is an rspec for GEC 12 tutorial
     369-->
     370
     371<rspec type="request"
     372       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd"
     373       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     374       xmlns="http://www.protogeni.net/resources/rspec/2">
     375
     376  <node client_id="pc1"
     377        component_manager_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm"
     378        component_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+node+pc1"
     379        component_name="pc1" exclusive="true">
     380    <sliver_type name="raw-pc">
     381      <disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops//UBUNTU1004-STD"/>
     382    </sliver_type>
     383    <services>
     384      <execute command="cd /home/gpousr21/config_dir;./install.sh" shell="sh " />
     385      <install install_path="/home/gpousr21" url="http://192.1.249.166:8383/gec12tutorial_ubuntu.tar.gz" file_type="tar.gz"/>
     386    </services>
     387  </node>
     388
     389</rspec>
     390
     391
     392   }}}
     393
     394   * Now you are ready to reserve your host on the '''appropriate''' AM. For easy access and to be able to copy and paste AM URLs that are used in this tutorial, we made a [#AMURLTable table]. If your node is '''pg46.emulab.net''', you are sharing your node with Alice. Alice has already created the sliver for you, so you can run the 'createsliver' command, and its ok if it fails.
     395  {{{
     396omni.py createsliver -a <AM_NICKNAME> gposlice## rspecs/final/<rspec_file>
     397}}}
     398
     399The output should look like :
     400{{{
     401#!xml
     402
     403geni@geni-vm:~/omni_tutorial$ omni.py createsliver -a http://www.emulab.net/protogeni/xmlrpc/am aliceslice rspecs/pg_utah.rspec
     404
     405FILL IN HERE
     406
     407}}}
     408
     409=== 3b. Sliverstatus ===
     410
     411We asked for an exclusive ProtoGENI host, which means that the node needs to be loaded with the right OS and booted, before our sliver is ready to use. This will take a while. We can check the status of our sliver, using the ''sliverstatus'' call.
     412
     413{{{
     414omni.py sliverstatus -a <AM_NICKNAME> gposlice##
     415}}}
     416
     417The status will probably be 'not ready', you can continue with the next steps of the tutorial, and we will come back to this node later.
     418
     419= II. Exercise 1: Using Physical Topology to Influence Your Experiment =
     420In this exercise we are going to test and see how the underlying network
     421topology can affect the topology of your experiment. For this exercise we have
     422already setup the networking portion of the exercise, so you just need to
     423reserve your compute resources.
     424
     425To avoid any firewall problems, please first login to "ops.pgeni.gpolab.bbn.com", since we might
     426need to tunnel some traffic through this connections.
     427
     428To do that run :
     429{{{
     430xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@ops &
     431}}}
     432
     433== 1. Make a MyPLC sliver ==
     434For this exercise you would need to reserve two MyPlc hosts, each in a different AM.
     435Under the final rspecs directory (Tutorials/Omni/<username>/rspecs/final) there are the two MyPLC rspecs that you should use.
     436
     437   * The name of the rspec is of the form myplc-<site>-<node>.rspec. You should take a look in your omni_config file to find out what is the
     438nickname for the AM, and try to reserve the sliver.
     439   * '''Advanced Option''': If you are interested in creating your own RSpecs follow the instructions under [##CreatingPlanetLabRequestRSpecsfromAdvertisementRSpecs Creating PL Request RSpecs from Ad. RSpecs]. Then skip to the [#a2.Logintothenodes---OmniScripting Next Step].
     440
     441   gpousr21 was assigned hosts bain.gpolab.bbn.com
     442   {{{
     443#!xml
     444<?xml version="1.0" ?>
     445<!-- Resources at AM:
     446  URN: http://myplc.gpolab.bbn.com:12346/
     447 -->
     448
     449<rspec type="request"
     450       xmlns="http://www.protogeni.net/resources/rspec/2"
     451       xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
     452       xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1"
     453       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     454       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd">
     455    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+bain.gpolab.bbn.com"
     456    component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am"
     457    component_name="bain.gpolab.bbn.com"
     458    exclusive="false"
     459    client_id="ganel">
     460        <sliver_type name="plab-vnode"/>
     461    </node>
     462</rspec>
     463   }}}
     464
     465   * Now you are ready to reserve your host on the '''appropriate''' AM. For easy access and to be able to copy and paste AM URLs and nicknames that are used in this tutorial, we made a [#AMURLTable table].
     466  {{{
     467omni.py createsliver -a <AM_NICKNAME> gposlice## rspecs/final/<rspec_file>
     468}}}
     469
     470The output should look like :
     471{{{
     472#!xml
     473
     474geni@geni-tutorial:~/Tutorials/Omni/gpousr10$ omni.py createsliver slice10 rspecs/final/myplc-gpolab-ganel.rspec -a pl-gpo
     475INFO:omni:Loading config file omni_config
     476INFO:omni:Using control framework pgeni
     477INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+slice10 expires within 1 day on 2011-11-04 06:57:31 UTC
     478INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN
     479INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN
     480INFO:omni:Creating sliver(s) from rspec file rspecs/final/myplc-gpolab-ganel.rspec for slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+slice10
     481INFO:omni:Asked http://myplc.gpolab.bbn.com:12346/ to reserve resources. Result:
     482INFO:omni:<?xml version="1.0" ?>
     483INFO:omni:<!-- Reserved resources for:
     484        Slice: slice10
     485        At AM:
     486        URL: http://myplc.gpolab.bbn.com:12346/
     487 -->
     488INFO:omni:<rspec expires="2011-11-04T01:58:07Z" generated="2011-11-04T00:58:07Z" type="manifest" xmlns="http://www.protogeni.net/resources/rspec/2" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/manifest.xsd"> 
     489    <node client_id="ganel.gpolab.bbn.com" component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+ganel.gpolab.bbn.com" component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" component_name="ganel.gpolab.bbn.com" exclusive="false" sliver_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+slice10:291:4:0">   
     490        <hardware_type name="plab-pc"/>   
     491        <hardware_type name="pc"/>   
     492        <location country="us" latitude="42.3897" longitude="-71.1475"/>   
     493        <sliver_type name="plab-vnode"/>   
     494    </node> 
     495</rspec>
     496INFO:omni: ------------------------------------------------------------
     497INFO:omni: Completed createsliver:
     498
     499  Options as run:
     500                aggregate: pl-gpo
     501                framework: pgeni
     502                native: True
     503
     504  Args: createsliver slice10 rspecs/final/myplc-gpolab-ganel.rspec
     505
     506  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+slice10 expires within 1 day(s) on 2011-11-04 06:57:31 UTC
     507Reserved resources on http://myplc.gpolab.bbn.com:12346/. 
     508INFO:omni: ============================================================
     509}}}
     510
     511Follow the same procedure to reserve your second myPLC host.
     512
     513== 2. Login to the nodes --- Omni Scripting ==
     514
     515After reserving the nodes, we are ready to login. When reserving !PlanetLab resources, using a different clearinghouse, the login name that should be used to access the nodes is ''''not'''' the username. The username is listed as part of the sliverstatus call. For common functionality like this that is expected to be used often, omni gives you the capability of writing scripts and including omni as a library.
     516Under omni_tutorial there is a folder 'example_scripts' that includes example python scripts that use Omni. One script that is available is the ''getMyLogin.py'' script that will return the exact command for logging-in to your nodes.
     517{{{
     518readyToLogin -a <AM_NICKNAME> gposlice##
     519}}}
     520
     521The script will return the actual command that you would need to use for logging in.
     522
     523For gpousr21 the script would return :
     524
     525{{{
     526================================================================================
     527Aggregate [https://myplc.stanford.edu:12346] has a PlanetLab sliver.
     528of-planet1.stanford.edu's pl_boot_state is:
     529        boot
     530Login using:
     531        xterm -e ssh -i ssh/gpousr21_key pgenigpolabbbncom_gposlice21@bain.gpolab.bbn.com &
     532
     533================================================================================
     534}}}
     535
     536For user gpousr21 this would be :
     537{{{
     538xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@ops &
     539}}}
     540
     541'''Note''': If your hosts are in Georgia Tech you would need to use the connection through ops.
     542To do that run
     543{{{
     544xterm -e ssh -i ssh/gpousr##_key -F ssh/config <hostname> &
     545}}}
     546
     547For gpousr21 that would be :
     548{{{
     549xterm -e ssh -i ssh/gpousr21_key -F ssh/config bain &
     550}}}
     551
     552== 3. Test Different Topologies  ==
     553The Mesoscaly deployment can offer, different topologies even if the communication is between the same hosts. We have provisioned
     554two different subnets in the Mesoscale infrastructure, each using a different VLAN (one using 3715 and the other 3716).
     555
     556The two subnets that have been provisioned are '''10.42.131.0/24''' on 3715 and '''10.42.132.0/24''' on 3716.
     557
     558First of all let's see how we can figure out the IP of the hosts we reserved :
     559
     560   * List all the interfaces in your host. You will see that there many interfaces of the form eth1.XXXX
     561   {{{
     562   /sbin/ifconfig
     563   }}}
     564   Part of the output would look like :
     565   {{{
     566   eth1.1750:42147 Link encap:Ethernet  HWaddr 00:B0:D0:E1:6F:78 
     567          inet addr:10.42.147.90  Bcast:10.42.147.255  Mask:255.255.255.0
     568          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     569
     570   eth1.1750:42148 Link encap:Ethernet  HWaddr 00:B0:D0:E1:6F:78 
     571          inet addr:10.42.148.90  Bcast:10.42.148.255  Mask:255.255.255.0
     572          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     573   }}}
     574
     575   * Figure out the last octet of the IP address of your hosts. The way these MyPLC hosts are setup, is that they have multiple subinterfaces, each configured to be part of a different IP subnet. Almost all subnets in the hosts are in the form of 10.42.Y.0/24. You will notice that for all these subnets, your host has the same last octet.  In the example above all the subinterfaces of eth1, will have an IP address that will end in '''90''' (10.42.147.'''90''', 10.42.148.'''90''')
     576
     577   * Ping over 3715. After loging in to your hosts ping from host1 to host2. Assuming that host2 has a last octet of YYY you should:
     578
     579   {{{
     580ping 10.42.131.YYY
     581   }}}
     582   Notice the RTT on the packets.
     583
     584   * Ping over 3716. After loging in to your hosts ping from one host2 to host1. Assuming that host1 has XXX as it's last octet you should ping
     585
     586   {{{
     587ping 10.42.132.XXX
     588   }}}
     589   Notice the RTT on the packets and compare it with the above ping.
     590
     591
     592= III. Exercise 2: Using !OpenFlow to Create Your Experiment's Topology =
     593Another way to control the path that your packets are taking is with OpenFlow controllers. In this exercise we are going to use an OpenFlow controller that will deflect packets from one server to another one.  We will start first by reserving an OpenFlow sliver.
     594
     595== 1. Make an OpenFlow sliver ==
     596
     597In the previous step, we have used a pre-configured setup to run our test. In this experiment we will first reserve an OpenFlow sliver that will point to a controller to control our traffic.
     598
     599=== 1a. !OpenFlow controller ===
     600In a typical !OpenFlow experiment, the first step is to figure out where you are going to run your controller. The !OpenFlow controller should be able to accept connections from switches. To make this tutorial simpler we have already setup the controllers in separate slices for each user.
     601The name of your controller slice is "ctrlXX" and it contains one myplc host, "navis.gpolab.bbn.com", where your controller will be running on
     602port "100XX".
     603
     604In the previous example we have pointed all the traffic for subnets 10.42.131.0/24, 10.42.132.0/24 to a switch !OpenFlow controller, that's why you were able to ping between your hosts, using that subnet.
     605
     606=== 1b. !OpenFlow sliver ===
     607Until you have reserved an !OpneFlow sliver, traffic would not be forwarded between your hosts on your assigned subnet.
     608   
     609   * Personalize your rspec. There is a sample !OpenFlow rspec, under the rspecs folder ('''rspecs/openflow-tutorial-template.rspec'''), that you would need to modify in order to reserve the flowspace that has been assigned to you. In the beginning of the file there is a list of tags you would need to replace. More specifically
     610       * <USERNAME> : Your usernamer
     611       * <CTRL-PORT> : The port that your controller will be listening on on navis.gpolab.bbn.com
     612       * <VLAN> : Which core VLAN you are using for your experiment.
     613       * <IP_SUBNET_OCT> : The last octet of the subnet that has been assigned to you
     614       * <ETH_TYPE_1>, <ETH_TYPE_2>  : The ethtypes that have been assigned to you for use in this exercise
     615
     616   * Create the OpenFlow sliver. The flowspace for the tutorial is managed by an AM running at GPO :
     617   {{{
     618   omni.py createsliver gposliceXX ./rspecs/openflow-tutorial-template.rspec -a of-tut
     619   }}}
     620
     621   * Login to your controller machine :
     622   {{{
     623   xterm -e ssh -i ssh/gpousrXX_key pgenigpolabbbncom_XX@bain.gpolab.bbn.com &
     624   }}}
     625   {{{
     626   xterm -e ssh -i ssh/gpousr21_key pgenigpolabbbncom_gposlice21@bain.gpolab.bbn.com &
     627   }}}
     628
     629   * Run your controller. First of all verify that there is no other controller running. Run
     630   {{{
     631   ps -ef |grep nox_core
     632   }}}
     633   If there is one, make sure you kill it before you start the new one.
     634   In order to start your controller do the following
     635   {{{
     636   cd nox_build/src
     637   ./nox_core -i ptcp:<PORT> -d l2deflect
     638   }}}
     639
     640
     641=== 1d. Deflect layer 2 ping using your controller ===
     642For this exercise we have already reserved the hosts for you. There are two layer 2 ping servers running and one host that will be used as a client. You will need to login to the client using your key.
     643{{{
     644ssh -i ssh/gpousrXX_key inki@pg30.emulab.net
     645}}}
     646
     647After you login run :
     648{{{
     649cd pingPlus
     650}}}
     651
     652Run a layer two ping using each one of your two ethernet types. What do you notice?
     653{{{
     654sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE1>
     655sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE2>
     656}}}
     657
     658= IV. Exercise 3: Using Software Routers to Create Your Experiment Topology =
     659In this exercise we are going to use a click router to bandwidth limit our traffic. For this we are going to use the protogeni host you
     660reserved in the beginning.
     661
     662'''Note:''' If you are using one of the hosts pc1.gpolab.bbn.com, pc11.gpolab.bbn.com or pg30.emulab.net your node has already been
     663reserved. Please call us to tell you how to access it. 
     664
     665   * check that your sliver is ready
     666   {{{
     667   omni.py sliverstatus -a <AM_NICKNAME> gpousr##
     668   }}}
     669
     670   * If your sliver is ready, run readyToLogin to figure out how to login to the node. (if your host is '''pg33''' please read the notes):
     671   {{{
     672   readyToLogin -a <AM_NICKNAME> gposlice##
     673   }}}
     674
     675
     676   '''NOTE 1:''' If your node is '''pg33.emulab.net''' then run
     677   {{{
     678   xterm -e xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@pg33 & &
     679   }}}
     680   
     681   * Check to see that the software has been downloaded :
     682   {{{
     683   [alice@protogeni1 ~]$ ls
     684   config_dir  pingPlus click-2.0.1
     685   }}}
     686
     687   * Configure the node. When you login to the node, the data interface of the host is not configured.
     688   {{{
     689    [alice@protogeni1 ~]$ /sbin/ifconfig
     690   }}}
     691   This should list only two interface, the loopback and the control interface. Part of the tarball that was downloaded, is a script that will configure the node, and compile the Layer 2 ping software. Run
     692   {{{
     693    ./config_dir/configure.sh
     694   }}}
     695   The output for Alice would look like
     696   {{{
     697[alice@protogeni1 ~]$ ./config_dir/configure.sh
     698DEVICE=eth1.1750
     699 USERCTL=no
     700 VLAN=yes
     701 IPADDR=10.42.131.146
     702 NETMASK=255.255.255.0
     703 BOOTPROTO=static
     704 ONBOOT=yes
     705
     706Added VLAN with VID == 1750 to IF -:eth1:-
     707gcc    -c -o packetFunctions.o packetFunctions.c
     708gcc    -c -o pingPlusListener.o pingPlusListener.c
     709gcc  packetFunctions.o pingPlusListener.o  -o pingPlusListener
     710gcc    -c -o pingPlus.o pingPlus.c
     711gcc  packetFunctions.o pingPlus.o -o pingPlus
     712   }}}
     713   Verify that the data interface is up :
     714   {{{
     715   [alice@protogeni1 ~]$ /sbin/ifconfig
     716   }}}
     717   and note the name of the data interface, the data interface is the one that has an IP address in the 10.42.131.0/24 subnet:
     718   {{{
     719   eth1.1750 Link encap:Ethernet  HWaddr 00:1F:29:32:92:4D 
     720          inet addr:10.42.131.146  Bcast:10.42.131.255  Mask:255.255.255.0
     721          inet6 addr: fe80::21f:29ff:fe32:924d/64 Scope:Link
     722          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     723          RX packets:118 errors:0 dropped:0 overruns:0 frame:0
     724          TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
     725          collisions:0 txqueuelen:0
     726          RX bytes:5428 (5.3 KiB)  TX bytes:3482 (3.4 KiB)
     727
     728   }}}
     729   In this case the name is 'eth1.1750'.
     730
     731   * Configure the click router
     732   {{{
     733   cd click-2.0.1/conf
     734   }}}
     735   And edit the "gec12_conf.click" file to personalize it.
     736   * '''IF_NAME''' is the name of the interface that was configured in the previous step
     737   * '''MAC_ADDRESS''' is the mac address of that interface.
     738
     739   * Run the click router
     740   {{{
     741   cd ../userlevel/
     742   sudo ./click ../conf/gec12_conf.click
     743   }}}
     744
     745   * Start the new controller. First of all kill the controller that is currently
     746   {{{
     747   ps -ef |grep nox_core
     748   sudo kill -9 <PID>
     749   }}}
     750   Start the new controller
     751   {{{
     752   ./nox_core -i ptcp:<PORT> -d mbox
     753   }}}
     754
     755   * On your two PL hosts install iperf by running :
     756   {{{
     757   sudo yum install iperf
     758   }}}
     759
     760   * And then on one host run the server
     761   {{{
     762   iperf -s -i 2
     763   }}}
     764   Run the client on the other host
     765   {{{
     766   iperf -c <host> -i 2
     767   }}}
     768
     769   Look how your traffic is capped.
     770= V. Cleanup resources =
     771Although all your reservations, have expiration times, its always good practice to release the resources, after your experiment is over to make them available to other experimenters.
     772
     773=== 1. Deletesliver ===
     774For each createsliver that you have run, you will need to run deletesliver to release the resources
     775{{{
     776omni.py deletesliver -a <AM URL> <username>slice
     777}}}
     778For Alice this would look like
     779{{{
     780# Delete ProtoGENI sliver
     781omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am aliceslice
     782
     783# Delete MyPLC slivers
     784omni.py deletesliver -a https://myplc.stanford.edu:12346 aliceslice
     785
     786#Delete OpenFlow slivers
     787 omni.py deletesliver -a https://expedient-tutorial.gpolab.bbn.com:1443/openflow/gapi/ aliceslice
     788}}}
     789
     790You can not delete your slice. Although this will be cleaned up when it expires, it should be an empty container and thus does not hold up any resources.
     791
     792Congratulations, you have finished the tutorial! Now you are ready to design and run your own experiments. Don't hesitate to [mailto:help@geni.net email us] with any questions you might have.
     793
     794= VI. Get Your Own Account =
     795The accounts, that you used in the above steps, will be deactivated after the tutorial. If you do not already have an account at GPO's ProtoGENI cluster, you should get your own account so that you can further experiment with GENI.
     796
     797=== 1a. Get a temporary account ===
     798To get a temporary account that will be deactivated on August 12th 2011, apply for an account at this page https://www.pgeni.gpolab.bbn.com/joinproject.php3. For Project name use : Gec11Gpo.
     799
     800=== 1b. Get a permanent account ===
     801If you would like to run your own experiments in this infrastructure, please contact us at [mailto:help@geni.net] to get a permanent account.
     802
     803=== 2. Getting to Know Omni ===
     804Now that you have your own account, you should configure Omni to use your own personal info, instead of the pre-made accounts.
     805==== 2a. Generate and Download your ProtoGENI certificate ====
     806      a. Start Firefox within the VM and [https://www.pgeni.gpolab.bbn.com/login.php3] log in to your account.
     807      b. Select ''Generate SSL Cert'' and follow instructions.
     808      c. Select ''Download your SSL Cert'' (it's on the left of the page), and click on the 'Download it in PEM format' link.
     809      d. Copy the contents of the page (Ctrl-A, Ctrl-C)
     810      e. Open a terminal (there is a shortcut on the top bar) under the omni_tutorial directory there should be an ssh directory
     811      {{{
     812cd omni_tutorial/ssh
     813      }}}
     814      f. Open a file called <username>_cert.pem, paste your cert(Ctrl-Shift-V) and save.
     815      {{{
     816pico <username>_cert.pem>
     817Ctrl-Shift-V
     818Ctrl-X
     819      }}}
     820      g. Remove the passphrase from your certificate. For security best practices you should keep a passphrase on your certificate. If you want to avoid typing your passphrase throughout the tutorial, you might want to temporarily remove your passphrase
     821      {{{
     822openssl rsa -in ./<username>_cert.pem -out ./<username>_cert_ct.pem
     823openssl x509 -in ./<username>_cert.pem >> ./<username>_cert_ct.pem
     824chmod 400 ./<username>_cert_ct.pem
     825      }}}
     826       If you want a way to type your passphrase only once per session, look [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot#Q.WhydoesOmnipromptformyPEMpassphrasesomanytimesCantOmnipromptonlyonce here].
     827
     828==== 2b. Generate a pair of private/public keys. ====
     829In order to be able to login to the resources you will reserve will need a pair of keys. You can use any set of existing keys you might have, or you can generate a new pair. For security best practices you should  have a passphrase on your keys.
     830{{{
     831ssh-keygen -f <username>_key
     832}}}
     833
     834Now you can go back to [wiki:GEC11NetworkingExperiments/Tutorial#I.ConfigureOmni (I)] and follow the steps using your own certificate and key.
     835
     836= Creating PlanetLab Request RSpecs from Advertisement RSpecs =
     837
     838   1. Use Omni to download and save the advertised RSpec from the aggregate you care about.
     839      a. In general the command is:
     840      {{{
     841$ omni.py -a <url or nickname of aggregate> -t ProtoGENI 2 -o listresources
     842      }}}
     843      For example, to get the request RSpec from the MyPLC at the GPO Lab:
     844      {{{
     845$ omni.py -a pl-gpo -t ProtoGENI 2 -o listresources
     846      }}}
     847      (Version 2 of the AM API renames the ProtoGENI v2 RSpecs as GENI v3 RSpecs so in the near future the command will become: {{{$ omni.py <url or nickname of aggregate> -t GENI 3 -o listresources}}})
     848      b. The output of this command is:
     849      {{{
     850geni@geni-tutorial:~/Tutorials/Omni/gpousr20$ omni.py -a pl-gpo -t ProtoGENI 2 -o listresources
     851INFO:omni:Loading config file omni_config
     852INFO:omni:Using control framework pgeni
     853INFO:omni:Saving output to a file.
     854INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN
     855INFO:omni:Listed resources on 1 out of 1 possible aggregates.
     856INFO:omni:Writing to 'rspec-myplc-gpolab-bbn-com-12346-.xml'
     857INFO:omni: ------------------------------------------------------------
     858INFO:omni: Completed listresources:
     859
     860  Options as run:
     861                aggregate: pl-gpo
     862                framework: pgeni
     863                native: True
     864                output: True
     865                rspectype: ('ProtoGENI', '2')
     866
     867  Args: listresources
     868
     869  Result Summary: Retrieved resources from 1 aggregates.
     870Wrote rspecs from 1 aggregates to 1 files
     871Saved listResources RSpec at unspecified_AM_URN to file rspec-myplc-gpolab-bbn-com-12346-.xml.
     872.
     873INFO:omni: ============================================================
     874      }}}
     875
     876   2. Copy and edit the RSpec file.
     877      a. Copy the advertisement RSpec file.  The new file will become the request RSpec.  In general this would be:
     878{{{
     879cp <advertisement RSpec filename> <manifest RSpec filename>
     880}}}
     881      The value of {{{<advertisement RSpec filename>}}} appears in the Omni summary.
     882      In this case we will generate a request for the node "navis":
     883      {{{
     884cp rspec-myplc-gpolab-bbn-com-12346-.xml pl-gpo-navis.rspec
     885      }}}
     886      b. Edit the request Rspec file:
     887      {{{
     888emacs pl-gpo-navis.rspec &
     889      }}}
     890      or
     891      {{{
     892vi pl-gpo-navis.rspec
     893      }}}
     894      c. Edit the {{{<rspec>}}} tag.
     895         i. In the {{{<rspec>}}} tag, remove the {{{expires}}} and {{{generated}}} attributes.
     896         ii. In the {{{<rspec>}}} tag, change the {{{type="advertisement"}}} attribute to {{{type="request"}}}.
     897         iii. In the {{{<rspec>}}} tag, change 'ad' to 'request' in the schema location. That is, change this:
     898         {{{
     899xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/ad.xsd"
     900}}}
     901         To this:
     902         {{{
     903xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd"
     904         }}}
     905         iv. The {{{<rspec>}}} tag should now look like this (note that the whitespace has been adjusted for ease of reading):
     906         {{{
     907<rspec type="request"
     908       xmlns="http://www.protogeni.net/resources/rspec/2"
     909       xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
     910       xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1"
     911       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     912       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd">
     913         }}}
     914      d. Remove the {{{node}}} tags you do not want to request. 
     915         i. For example to only reserve the node {{{navis.gpolab.bbn.com}}} remove the following text:
     916         {{{
     917    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+bain.gpolab.bbn.com"
     918          component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am"
     919          component_name="bain.gpolab.bbn.com"
     920          exclusive="false">   
     921    ....
     922   </node> 
     923    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+sardis.gpolab.bbn.com"
     924          component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am"
     925          component_name="sardis.gpolab.bbn.com"
     926          exclusive="false">
     927    ....     
     928   </node> 
     929    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+ganel.gpolab.bbn.com"
     930          component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am"
     931          component_name="ganel.gpolab.bbn.com" exclusive="false">
     932    ....     
     933   </node> 
     934    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+gardil.gpolab.bbn.com"
     935          component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am"
     936          component_name="gardil.gpolab.bbn.com" exclusive="false">   
     937    ....
     938    </node>
     939}}}
     940         ii. At this point the entire file should look like this:
     941         {{{
     942<?xml version="1.0" ?>
     943<!-- Resources at AM:
     944        URN: unspecified_AM_URN
     945        URL: http://myplc.gpolab.bbn.com:12346/
     946 -->
     947<rspec type="request"
     948       xmlns="http://www.protogeni.net/resources/rspec/2"
     949       xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
     950       xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1"
     951       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     952       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd"> 
     953    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+navis.gpolab.bbn.com" component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" component_name="navis.gpolab.bbn.com" exclusive="false">   
     954        <hardware_type name="plab-pc"/>   
     955        <hardware_type name="pc"/>   
     956        <available now="true"/>   
     957        <sliver_type name="plab-vnode">     
     958            <planetlab:initscript name="gpolab_sirius"/>     
     959        </sliver_type>   
     960        <location country="us" latitude="42.3897" longitude="-71.1475"/>   
     961    </node> 
     962</rspec>
     963}}}
     964      d. Edit the {{{<node>}}} tag you are trying to reserve.
     965         i. Remove all {{{<hardware_type>}}}, {{{<available>}}}, {{{<location>}}}, and {{{<planetlab:initscript"/>}}} tags which exist from the {{{<node>}}} tag you are trying to reserve. 
     966         ii. Add the attribute {{{client_id}}} to the {{{<node>}}} tag you are trying to reserve.  The value is your choice, so here we will use {{{client_id="navis"}}}.
     967         iii. The final request RSpec file should look like this:
     968         {{{
     969<?xml version="1.0" ?>
     970<!-- Resources at AM:
     971        URN: unspecified_AM_URN
     972        URL: http://myplc.gpolab.bbn.com:12346/
     973 -->
     974<rspec type="request"
     975       xmlns="http://www.protogeni.net/resources/rspec/2"
     976       xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
     977       xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1"
     978       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     979       xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd"> 
     980    <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+navis.gpolab.bbn.com" component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" component_name="navis.gpolab.bbn.com" exclusive="false" client_id="navis">   
     981        <sliver_type name="plab-vnode">         
     982        </sliver_type>   
     983    </node> 
     984</rspec>
     985}}}
     986      e. Save the file.
     987 3. Run rspeclint to verify that the file is correct.  If it works, you should see no errors returned by the call.
     988 In general, this is:
     989 {{{
     990rspeclint http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd <request RSpec filename>
     991}}}
     992 For this example do:
     993 {{{
     994rspeclint http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd pl-gpo-navis.rspec
     995}}}
     996
     997= Reserving ProtoGENI nodes with Flack =
     998These instructions assume you have already created a slice using omni.
     999
     1000   1. Login to GPO's ProtoGENI instance with your tutorial credentials
     1001      a. Click on: https://www.pgeni.gpolab.bbn.com/login.php3
     1002      b. Use your GPO tutorial username and password as listed on the sheet of paper you were handed on the way into the tutorial.
     1003   2. Login to Flack.
     1004      a. Open a separate browser window or tab.
     1005      b. Click on: http://www.protogeni.net
     1006      c. Scroll down to the large map in the middle of the page.
     1007      d. Click "Login"
     1008      e. In the pull down menu in the upper right hand corner select: pgeni.gpolab.bbn.com
     1009      f. Click "Download"
     1010      g. Enter the password from the sheet of paper in the box near the bottom.
     1011      h. Click "OK" in the lower left hand corner.
     1012      i. You are now logged in.
     1013   3. Reserve the ProtoGENI node listed on your sheet of paper.
     1014      a. For a '''ProtoGENI Utah''' node, do the following:
     1015         i. In the Resources window on the right, select the button for your slice. A window will open.
     1016         ii. Click on "utahemulab.cm".
     1017         iii. Find the node listed on the sheet of paper in the list of nodes on the left.
     1018         iv. Drag your node onto the blank canvas on the right.
     1019         v. Click on the blue "i" (Information) icon on the node.
     1020         vi. Click "Add Install Service"
     1021         vii. In the two boxes, enter the following filling in your username: "/home/<username>" in "http://192.1.249.166:8383/gec12tutorial_fedora.tar.gz"
     1022         viii. Click "Add Execute Service"
     1023         ix. In the box, enter the following filling in your username: "cd /home/<username>/config_dir;./install.sh"
     1024         xi. Confirm Rspec version is set to "2" in the pull-down menu in the upper right hand corner.
     1025         xi. Click "Apply"
     1026         '''Note''' : After hitting apply, click on the blue "i" button again, if you can't see the information you entered, then :
     1027            a. Close this window.
     1028            b. On your VM open the rspec with your favorite editor, and copy the whole rspec
     1029            c. On your slice canvas on the top, there is an import button. From the list, choose the "Import from clipboard" option.
     1030            d. The node should appear on your canvas, press the blue "i" button to verify that it is loaded correctly.
     1031         xii. Click "Submit"
     1032      a. For a '''ProtoGENI GPO''' node, do the following:
     1033         i. In the Resources window on the right, select the button for your slice. A window will open.
     1034         ii. Click on "bbn-pgeni.cm" (not "bbn-pgeni1.cm", "bbn-pgeni2.cm", or "bbn-pgeni3.cm").
     1035         iii. Find the node listed on the sheet of paper in the list of nodes on the left.
     1036         iv. Drag your node onto the blank canvas on the right.
     1037         v. Click on the blue "i" (Information) icon on the node.
     1038         vi. Click "Add Install Service"
     1039         vii. In the two boxes, enter the following filling in your username: "/home/<username>" in "http://192.1.249.166:8383/gec12tutorial_ubuntu.tar.gz"
     1040         viii. Click "Add Execute Service"
     1041         ix. In the box,  enter the following filling in your username: "cd /users/<username> ;sudo /bin/sh ./config_dir/install.sh"
     1042         x. For the test image, enter: "urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops//UBUNTU1004-STD"
     1043         xi. Choose Rspec version "0.2" from the pull-down menu in the upper right hand corner.
     1044         xi. Click "Apply"
     1045         xii. Click "Submit"
     1046   4. Confirm the reserved node is visible via omni.
     1047      a. If you reserved a '''ProtoGENI Utah''' host, run:
     1048         {{{
     1049omni.py -a pg-utah -t ProtoGENI 2 listresources <slicename>
     1050         }}}
     1051      b. If you reserved a '''ProtoGENI GPO''' host, run:
     1052         {{{
     1053omni.py -a pg-gpo -t ProtoGENI 0.2 listresources <slicename>
     1054         }}}
     1055   5. Note that you can also download the request RSpec from Flack for later use in a AM API client tool like Omni.
     1056       i. In Flack, click on the magnifying glass in the upper right hand corner. 
     1057       ii.  The request RSpec will appear in the window.
     1058       iii.  You can then choose to download the RSpec in a file or copy it to the clipboard.
     1059
     1060= AM URL Table =
     1061|| AM || URL ||
     1062|| TUTORIAL AM ||||
     1063|| Clemson's MyPLC || http://myplc.clemson.edu:12346 ||
     1064|| GPO's ProtoGENI || http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am ||
     1065|| GPO's MyPLC || http://myplc.gpolab.bbn.com:12346 ||
     1066|| GPO's Tutorial OF ||https://expedient-tutorial.gpolab.bbn.com:1443/openflow/gapi/ ||
     1067|| Rutgers MyPLC || https://plc.orbit-lab.org:12346/ ||
     1068|| Stanford's MyPLC || https://myplc.stanford.edu:12346 ||
     1069|| Utah's ProtoGENI || http://www.emulab.net/protogeni/xmlrpc/am ||
     1070|| Washington's MyPLC || https://of.cs.washington.edu:12346/ ||
     1071|| Wisconsin's MyPLC || https://wings-openflow-1.wail.wisc.edu:12346/ ||
     1072|| OTHER || ||
     1073|| !PlanetLab ||http://www.planet-lab.org:12346 ||
     1074|| Kentucky's ProtoGENI || https://www.uky.emulab.net/protogeni/xmlrpc/am ||
     1075
     1076