Changes between Version 27 and Version 28 of GEC13Agenda/ExperimenterWorkflowTutorial/Tutorial


Ignore:
Timestamp:
03/13/12 10:05:07 (7 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC13Agenda/ExperimenterWorkflowTutorial/Tutorial

    v27 v28  
    7373In this first exercise we are going to use Omni and Flack in parallel and see how you can do the same thing with either of the tools.
    7474
    75 === Configure Flack to use your account ===
     75=== Configure Flack to use your account===
    7676Flack is a web based graphical tool. Start firefox (there should be a shortcut in the top bar). On the bookmark toolbar there is an ExptWorkflow folder. Press there
    7777and "Open All in Tabs''
     
    8585[[Image(flack-login.png, 60%)]]
    8686
    87 
    88 
     87Type in your password again. Now you have configured Flack to your personal information.
     88
     89=== Listresources in Flack ===
     90After you login, you will see a pop-up window that will ask you which AMs you would like to interact with in this session. First of all unclick the All/None checkbox to uncheck all the AMs. Then make sure that you only check '''bbn-pgeni.cm''' and '''utahemulab.cm''', note that there are AMs with similar names make sure you choose these two.
     91
     92[[Image(choose-ams.png, 60%)]]
     93
     94Now Flack will go behind the scenes and invoke listresources in the selected AMs and populate the map.
     95
     96===Configure Flack to use your account ===
     97While Flack is loading the resources let's understand how the same functionality works with Omni. Omni is configured through a text file that is called omni_config. Go back to the terminal window and go under the directory that corresponds to your user
     98{{{
     99cd /home/geni/Tutorials/ExptWorkflow/gpousr##/
     100}}}
     101
     102For user gpousr25, this will look like
     103{{{
     104cd /home/geni/Tutorials/ExptWorkflow/gpousr25/
     105}}}
     106
     107Open the file called `omni_config` using either vim or emacs. Close to the top of the file you will see two parameters called `default_cf` and `users`. Your username should be at least listed in the user section. Look for the sections in the file that are named `[pgeni]` and  `[gpousr##]`. For example for user gpousr25 these section look like:
     108{{{
     109[pgeni]
     110type = pg
     111ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
     112sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa
     113# Use the following two lines if you are using
     114# a certificate with a passphrase
     115#cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem
     116#key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem
     117
     118# Use the following two lines if you are using
     119# a cleartext cert.
     120cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem
     121key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem
     122[gpousr25]
     123# Make sure the urn matches the URN of the credential
     124urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr25
     125
     126# Public key to be installed in compute resources. For multiple
     127# keys use a comma separated file
     128keys = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_key.pub
     129}}}
     130
     131In the pgeni section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from pgeni.gpolab.bbn.com. This is equivalent to the Download action of Flack.
     132
     133In the `[gpousr##]` section, the information need for logging-in to reserved compute resources are provided. It includes you unique URN and a public key that would be uploaded to the hosts that you will reserve during the tutorial.
     134
     135Another interesting section to look at is the `[aggregate-nicknames]` sections. Flack already knows the URL for all the AMs and present you a list of AMs to choose from using a short, descriptive name. In Omni a user is required to pass the URL for each call to the GENI AM API. In this section the user get a chance to provide short descriptive names to the URLs that are easier to memorize and use. This section should look like :
     136{{{
     137[aggregate_nicknames]
     138# ProtoGENI AMs and PlanetLab central
     139pg-gpo=urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+am,https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am
     140pg-utah=,https://www.emulab.net/protogeni/xmlrpc/am
     141pg-ky=urn:publicid:IDN+uky.emulab.net+authority+am,https://www.uky.emulab.net/protogeni/xmlrpc/am
     142plc=,https://www.planet-lab.org:12346
     143
     144# Private myplc installations
     145pl-gpo=,http://myplc.gpolab.bbn.com:12346/
     146pl-clemson=,http://myplc.clemson.edu:12346/
     147pl-stanford=,https://myplc.stanford.edu:12346/
     148pl-wisconsin=,https://wings-openflow-1.wail.wisc.edu:12346/
     149pl-washington=,https://of.cs.washington.edu:12346/
     150pl-rutgers=,https://plc.orbit-lab.org:12346/
     151pl-indiana=,https://localhost:12346/
     152pl-gatech=,https://localhost:2346/
     153
     154
     155# Tutorial OpenFlow AM
     156of-tut=,https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1
     157
     158# Other OpenFlow AMs
     159of-gpo=,https://foam.gpolab.bbn.com:3626/foam/gapi/1
     160of-stanford=,https://openflow4.stanford.edu:3626/foam/gapi/1
     161of-clemson=,https://foam.clemson.edu:3626/foam/gapi/1
     162of-wisconsin=,https://foam.wail.wisc.edu:3626/foam/gapi/1
     163of-rutgers=,https://foam.oflow.cip.gatech.edu:3626/foam/gapi/1
     164of-indiana=,https://foam.noc.iu.edu:3626/foam/gapi/1
     165of-gatech=,https://nox.orbit-lab.org:3626/foam/gapi/1
     166of-nlr=,https://foam.nlr.net:3626/foam/gapi/1
     167of-i2=,https://foam.net.internet2.edu:3626/foam/gapi/1
     168}}}
     169
     170==== Clearing the passphrase from your cert ====
     171When you first logged in to Flack, you had to type your passphrase (password). Flack cashes this information and re-uses it for the duration of the session. Omni will ask you for the phrase multiple times per command. To save time during the tutorial, we are going to remove the passphrase from your cert. Close the omni_config file and type :
     172{{{
     173clear_cert.sh
     174}}}
     175Use the same password as in Flack. For user gpousr25, this looks like
     176{{{
     177geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ clear_cert.sh
     178Enter pass phrase for ssh/geni_cert.pem:
     179writing RSA key
     180}}}
     181
     182'''NOTE''': If you misstype your password and get an error, make sure to remove a file before you start again:
     183{{{
     184rm -f ssh/geni_cert_ct.pem
     185}}}
     186
     187===== Test configuration ====
     188In order to test that our configuration is correct, you can issue a getversion
     189command. For this step we have used !PlanetLab's AM, but you can use any
     190Aggregate Manager(AM).
     191{{{
     192omni.py getversion -a http://www.planet-lab.org:12346
     193}}}
     194
     195Or equivalently using the !PlanetLab nickname:
     196{{{
     197omni.py getversion -a plc
     198}}}
     199
     200gpousr25 decided to use !PlanetLab central :
     201{{{
     202geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py getversion -a plc
     203INFO:omni:Loading config file omni_config
     204INFO:omni:Using control framework pgeni
     205INFO:omni:Substituting AM nickname plc with URL https://www.planet-lab.org:12346, URN unspecified_AM_URN
     206INFO:omni:AM URN: unspecified_AM_URN (url: https://www.planet-lab.org:12346) has version:
     207INFO:omni:{   'code': {   'am_code': None, 'am_type': 'sfa', 'geni_code': 0},
     208    'geni_api': 2,
     209    'output': '',
     210    'value': {   'code_tag': '2.0-9',
     211                 'code_url': 'git://git.onelab.eu/sfa.git@sfa-2.0-9',
     212                 'geni_ad_rspec_versions': [   {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/flack/1',
     213                                                                     'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'],
     214                                                   'namespace': 'http://www.protogeni.net/resources/rspec/2',
     215                                                   'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd',
     216                                                   'type': 'ProtoGENI',
     217                                                   'version': '2'},
     218                                               {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/flack/1',
     219                                                                     'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'],
     220                                                   'namespace': 'http://www.geni.net/resources/rspec/3',
     221                                                   'schema': 'http://www.geni.net/resources/rspec/3/ad.xsd',
     222                                                   'type': 'GENI',
     223                                                   'version': '3'},
     224                                               {   'extensions': [],
     225                                                   'namespace': None,
     226                                                   'schema': None,
     227                                                   'type': 'SFA',
     228                                                   'version': '1'}],
     229                 'geni_api': 2,
     230                 'geni_api_versions': {   '2': 'http://planet-lab.org:12346'},
     231                 'geni_request_rspec_versions': [   {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/flack/1',
     232                                                                          'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'],
     233                                                        'namespace': 'http://www.protogeni.net/resources/rspec/2',
     234                                                        'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd',
     235                                                        'type': 'ProtoGENI',
     236                                                        'version': '2'},
     237                                                    {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/flack/1',
     238                                                                          'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'],
     239                                                        'namespace': 'http://www.geni.net/resources/rspec/3',
     240                                                        'schema': 'http://www.geni.net/resources/rspec/3/request.xsd',
     241                                                        'type': 'GENI',
     242                                                        'version': '3'},
     243                                                    {   'extensions': [],
     244                                                        'namespace': None,
     245                                                        'schema': None,
     246                                                        'type': 'SFA',
     247                                                        'version': '1'}],
     248                 'hostname': 'quagga.cs.princeton.edu',
     249                 'hrn': 'plc',
     250                 'interface': 'aggregate',
     251                 'sfa': 2,
     252                 'testbed': 'myplc',
     253                 'urn': 'urn:publicid:IDN++plc'}}
     254INFO:omni: ------------------------------------------------------------
     255INFO:omni: Completed getversion:
     256
     257  Options as run:
     258                aggregate: plc
     259                framework: pgeni
     260                native: True
     261
     262  Args: getversion
     263
     264  Result Summary:
     265Got version for 1 out of 1 aggregates
     266 
     267INFO:omni: ============================================================
     268geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$
     269}}}
     270
     271=== List Resources in Omni ===
     272Flack goes behind the scenes and call listresources for the AMs that you chose, and draws the resources in a map. In Omni in order to see what is available in each AM you will have to manually invoke listreouces
    89273
    90274== 1. Configure Omni ==