Changes between Version 7 and Version 8 of GiB-to-ProtoGENI


Ignore:
Timestamp:
10/16/12 15:19:06 (7 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GiB-to-ProtoGENI

    v7 v8  
    3131  * '''Aggregate URN in rspec.'''  As you might expect, the aggregate URN in a GENI-in-a-Box rspec will be different from that in a  ProtoGENI rspec.  However, you can use your ProtoGENI rspec, with the URN for a ProtoGENI aggregate, in your GENI-in-a-Box rspec.  The GENI-in-a-Box aggregate manager does not check the aggregate URN in the rspec.  This is a feature and not a bug.  It is so you can use your ProtoGENI rspec with GENI-in-a-Box with very little or no changes.
    3232  * '''Running commands as root in startup scripts'''.  The startup script specified by the experimenter as an {{{<execute>}}} element of the request rspec is executed with root privileges in the GENI-in-a-Box aggregate.  You therefore do not require to sudo to run commands that require root privileges.  In fact, such scripts with sudo in them will fail as the VMs are set up to disallow sudo'ing without a tty.
     33
     34== Moving your experiment to ProtoGENI ==
     35
     36This section highlights the process of moving experiments from the GENI-in-a-Box aggregate running on a virtual machine to the ProtoGENI aggregate using your own system to run the experiment.
     37
     38=== Get GENI Credentials ===
     39
     40GENI [http://groups.geni.net/geni/wiki/GENIExperimenterWelcome Experimenters] can get credentials by signing up for existing projects or by requesting new projects. These options are highlighted in the GENI Experimenter [http://groups.geni.net/geni/wiki/SignMeUp Sign Me Up] page. 
     41 
     42=== 2. Get and setup Omni ===
     43
     44Omni is the tool used to manage GENI resources and it is part of the gcf package. 
     45
     46 1. The gcf package has dependencies that can be installed as detailed on the GCF [http://trac.gpolab.bbn.com/gcf/wiki/QuickStart#SoftwareDependencies Software Dependencies] page.
     47
     48 2. Get the latest GCF package release at the [http://software.geni.net/local-sw/ GPO Software Release] page, or the latest development version of the GCF package using git as detailed in the  [http://trac.gpolab.bbn.com/gcf/wiki/GettingGcf Getting GCF] page.
     49
     50 3. Unpack the gcf tgz file and configure as detailed in the [http://trac.gpolab.bbn.com/gcf/wiki/OmniConfigure How to configure Omni] page.
     51
     52 4. You should add the following to your PATH and PYTHONPATH:
     53 {{{
     54  gcf-version=gcf-2.1
     55  export PATH="$HOME/$gcf-version/src:$PATH"
     56  export PYTHONPATH=~/$gcf-version/src/
     57}}}
     58 
     59 5. You should now be able to use Omni to request information from the ProtoGENI aggregate. Note that the omni configuration includes a nickname for the ProtoGENI aggregate at Utah, ''pg-utah'':
     60{{{
     61$ omni.py -a pg-utah listresources -o
     62INFO:omni:Loading config file /home/lnevers/.gcf/omni_config
     63INFO:omni:Using control framework pg
     64INFO:omni:Saving output to a file.
     65INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN
     66INFO:omni:Listed resources on 1 out of 1 possible aggregates.
     67INFO:omni:Writing to 'rspec-www-emulab-net-protogeniv2.xml'
     68INFO:omni: ------------------------------------------------------------
     69INFO:omni: Completed listresources:
     70
     71  Options as run:
     72                aggregate: ['pg-utah']
     73                framework: pg
     74                getversionCacheName: /home/lnevers/.gcf/get_version_cache.json
     75                output: True
     76
     77  Args: listresources
     78
     79  Result Summary: Queried resources from 1 of 1 aggregate(s).
     80Wrote rspecs from 1 aggregate(s) to 1 file(s)
     81Saved listresources RSpec at 'unspecified_AM_URN' to file rspec-www-emulab-net-protogeniv2.xml; 
     82INFO:omni: ============================================================
     83}}}
     84
     85''Note: The command runs for several minutes, and the content of the listresources output file rspec-www-emulab-net-protogeniv2.xml is used later in this procedure to define the ProtoGENI RSpec.''
     86
     87
     88=== Modify your GiB RSpec for use at ProtoGENI ===
     89
     90In this section we will modify the GENI-in-a-Box RSpec named "three-nodes-lan.rspec" to be used at ProtoGENI. Here is the contents of the file before the modifications:
     91{{{
     92<rspec type="request"
     93        xmlns="http://www.geni.net/resources/rspec/3"
     94        xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
     95        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     96        xsi:schemaLocation="http://www.geni.net/resources/rspec/3
     97        http://www.geni.net/resources/rspec/3/request.xsd"> 
     98
     99  <node client_id="left" component_manager_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm" exclusive="true">
     100    <sliver_type name="raw-pc">
     101     <disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops:UBUNTU1004-STD" os="Linux" version="Ubuntu10.04"/> 
     102    </sliver_type>
     103    <interface client_id="left:if0">
     104    </interface>
     105  </node>
     106
     107  <node client_id="right" component_manager_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm" exclusive="true">
     108    <sliver_type name="raw-pc">
     109    <disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops:UBUNTU1004-STD" os="Linux" version="Ubuntu10.04"/>                                                         
     110    </sliver_type>
     111    <interface client_id="right:if0">
     112    </interface>
     113  </node>
     114
     115  <node client_id="middle" component_manager_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm" exclusive="true">
     116    <sliver_type name="raw-pc">
     117    <disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops:UBUNTU1004-STD" os="Linux" version="Ubuntu10.04"/>     
     118    </sliver_type>
     119    <interface client_id="middle:if0">
     120    </interface>
     121  </node>
     122
     123  <link client_id="lan0">
     124    <component_manager name="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm"/>
     125    <interface_ref client_id="left:if0"/>
     126    <interface_ref client_id="right:if0"/>
     127    <interface_ref client_id="middle:if0"/>
     128    <property source_id="left:if0" dest_id="right:if0"/>
     129    <property source_id="left:if0" dest_id="middle:if0"/>
     130    <property source_id="right:if0" dest_id="left:if0"/>
     131    <property source_id="right:if0" dest_id="middle:if0"/>
     132    <property source_id="middle:if0" dest_id="left:if0"/>
     133    <property source_id="middle:if0" dest_id="right:if0"/>
     134    <link_type name="lan"/>
     135  </link>
     136</rspec>
     137}}}
     138
     139Edit the file "three-nodes-lan.rspec" to introduce the modification needed for this RSpec to work at ProGENI:
     140
     141 1. Replace all instances of ''pgeni.gpolab.bbn.com'' with ''emulab.net''
     142 2. Replace all instances of the image tag with an image available at ProtoGENI.  The following line: {{{<disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops:UBUNTU1004-STD" os="Linux" version="Ubuntu10.04"/>}}}
     143 is replaced by {{{ <disk_image description="Ubuntu 10 32-bit" name="urn:publicid:IDN+emulab.net+image+emulab-ops:UBUNTU10-STD" os="Linux" version="10"/> }}}
     144
     145 ''Note: You may chose a different image, simply run look for "disk_images" in the rspec-www-emulab-net-protogeniv2.xml generated above. ''
     146
     147 3. You may now create a slice and a sliver at the ProtoGENI aggregate using the modified RSpec file.
     148{{{
     149$ omni.py createslice myslice
     150$ omni.py createsliver -a pg-utah myslice three-nodes-lan-mod.rspec
     151}}}