Changes between Initial Version and Version 1 of GENI-in-a-Box/GiB-to-ProtoGENI


Ignore:
Timestamp:
10/17/12 08:56:30 (9 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENI-in-a-Box/GiB-to-ProtoGENI

    v1 v1  
     1= Moving Experiments from GENI-in-a-Box to ProtoGENI Aggregates =
     2
     3The GENI-in-a-Box aggregate is most similar to the GENI [http://www.protogeni.net ProtoGENI] aggregates.   This page describes some of the similarities and differences between these aggregates.
     4
     5== Similarities ==
     6  * All experimenter nodes have 3 NICs available to the experimenter.  These is, in addition, a fourth NIC that is connected to by the aggregate control network.  This network should not be used for experiment traffic.
     7  * Experimenters get root access to their virtual machines.
     8  * Virtual machines from both aggregates are implemented as OpenVZ containers running Fedora 15.  The Ubuntu flavor of GENI-in-a-Box provides OpenVZ containers running Ubuntu.
     9  * The manifest rspec is available in all the experimenter nodes at {{{/proj/geni-in-a-box.net/exp/<slicename>/tbdata/geni_manifest}}} and the fully qualified name of the node is available in {{{/var/emulab/boot/nickname}}}.  An example of a fully qualified node name is {{{left.myslice.geni-in-a-box.net}}} where {{{myslice}}} is the name of the slice.
     10
     11
     12== Differences ==
     13  * '''Mapping of device name to experimenter specified interface name'''.  The mapping of the experimenter specified interface name to the operating system device name is available in the manifest rspec.  For example, the {{{<interface>}}} element in the snippet of a manifest rspec shown below tells us that the interface with the experimenter specified name {{{left:if0}}} is mapped to {{{eth1}}} by the operating system (see the last part of the component_id for this interface).  In the ProtoGENI aggregate this mapping is not guaranteed to be correct i.e. it might actually be mapped to a different operating system interface such as {{{eth2}}} or {{{eth3}}}.  With GENI-in-a-Box the mapping will be correct.
     14{{{
     15<node client_id="left" component_id="urn:publicid:IDN+geni-in-a-box.net+node+pc101" component_manager_id="urn:publicid:IDN+geni-in-a-box.net+authority+cm" exclusive="false" sliver_id="urn:publicid:IDN+geni-in-a-box.net+sliver+101">   
     16        <sliver_type name="virtual-pc">     
     17            <disk_image name="urn:publicid:geni-in-a-box.net+image//FEDORA15-STD"/>     
     18        </sliver_type>   
     19        <services>     
     20            <install file_type="tar.gz" install_path="/local" url="http://groups.geni.net/geni/attachment/wiki/GiB-gettingStarted/iperf-execute-script.tar.gz?format=raw"/>     
     21            <execute command="/local/iperf-execute-script.sh" shell="sh"/>     
     22            <login authentication="ssh-keys" hostname="pc101.geni-in-a-box.net" port="22" username="alice"/>     
     23        </services>   
     24        <interface client_id="left:if0" component_id="urn:publicid:IDN+geni-in-a-box.net+interface+pc101:eth1" mac_address="00:0C:29:B4:DF:A7" sliver_id="urn:publicid:IDN+geni-in-a-box.net+sliver+1011">     
     25            <ip address="10.0.3.101"/>     
     26        </interface>   
     27        <rs:vnode name="pc101" xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1"/>   
     28        <host name="pc101.geni-in-a-box.net"/>   
     29</node> 
     30}}}
     31  * '''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.
     32  * '''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 an experiment 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=== Install and use 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. Edit the file "three-nodes-lan.rspec" to introduce the two modification needed:
     91
     92First, replace all instances of ''pgeni.gpolab.bbn.com'' with ''emulab.net''.
     93
     94Second, replace all instances of the image tag with an image available at ProtoGENI.  The following line:
     95{{{
     96<disk_image name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops:UBUNTU1004-STD" os="Linux" version="Ubuntu10.04"/>
     97}}}
     98is replaced by
     99{{{
     100<disk_image description="Ubuntu 10 32-bit" name="urn:publicid:IDN+emulab.net+image+emulab-ops:UBUNTU10-STD" os="Linux" version="10"/>
     101}}}
     102
     103 ''Note: You may chose a different image, simply run look for "disk_images" in the rspec-www-emulab-net-protogeniv2.xml generated above. ''
     104
     105=== Run the experiment at ProtoGENI ===
     106
     107 1. You may now create a slice and a sliver at the ProtoGENI aggregate using the modified RSpec file.
     108{{{
     109$ omni.py createslice myslice
     110$ omni.py createsliver -a pg-utah myslice three-nodes-lan-mod.rspec
     111}}}
     112
     113 2. You get the information to login to the nodes with one of the gcf scripts:
     114
     115{{{
     116$ gcf/examples/readyToLogin.py -a pg-utah myslice
     117
     118 .....
     119================================================================================
     120LOGIN INFO for AM: https://www.emulab.net/protogeni/xmlrpc/am/2.0
     121================================================================================
     122
     123middle's geni_status is: ready (am_status:ready)
     124User lnevers logins to middle using:
     125        xterm -e ssh -i /home/lnevers/.ssh/id_rsa lnevers@pc154.emulab.net &
     126
     127
     128right's geni_status is: ready (am_status:ready)
     129User lnevers logins to right using:
     130        xterm -e ssh -i /home/lnevers/.ssh/id_rsa lnevers@pc99.emulab.net &
     131
     132
     133left's geni_status is: ready (am_status:ready)
     134User lnevers logins to left using:
     135        xterm -e ssh -i /home/lnevers/.ssh/id_rsa lnevers@pc116.emulab.net &
     136
     137}}}
     138
     139
     140You can now log in to the nodes and run your experiment!