wiki:GENIExperimenter/ExperimentExample

Version 43 (modified by lnevers@bbn.com, 12 years ago) (diff)

--

GENI Experiment Example 1

This page uses gcf 1.6.2 to demonstrate a GENI Experiment. If you are using gcf 2.0 or higher, see the Experiment Example using gcf 2.0 tools.

This page illustrates an operational example for the Omni How-to page capturing the actions required to run an experiment using multiple resource aggregates and with user credentials from the GPO ProtoGENI Clearinghouse pgeni.gpolab.bbn.com. Details on how credentials are set up can be found in the GENI Credentials section of the main Omni How-To page. In this experiment, a total of 5 nodes are requested, with 2 nodes from the Emulab (PG) aggregate and 3 nodes from the PlanetLab (PL) aggregate.

This page does not cover the installation of the Omni client, as it is well documented.

Omni Configuration

If you haven't already configured Omni, please follow these configuration instructions.

The Omni client, is a very simple tool that communicates with Aggregate Managers(AMs) using the GENI AM API. In order to specify which AM you would like to talk to, you will have to use the -a option of Omni. If you automatically configured Omni then your configuration file contains nicknames for addressing most of GENI AMs. If you manually configured your Omni, them make sure that you added the nicknames from the omni_config.sample file that is under the gcf directory. In these examples we will only refer to AMs by their nicknames. If you want to get the full URL please refer to the Omni configuration file used.

Note: If you are using an Omni version < 1.6.2, then we recommend that you upgrade Omni. If for some reason you can't upgrade Omni and you are having problems following these instructions please contact us.

List available resources

With your Omni is configured with your GENI credentials, you can get a list of available resources from each of the other 2 aggregates.

Getting a list of resources from the Emulab ProtoGENI aggregate in GENI v3 rspec format:

$ omni.py -o -a pg-utah listresources -t GENI 3
INFO:omni:Loading config file /home/nriga/.gcf/omni_config
INFO:omni:Using control framework pg
INFO:omni:Saving output to a file.
INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net/protogeni/xmlrpc/am, URN unspecified_AM_URN
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'rspec-www-emulab-net-protogeni.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
		aggregate: pg-utah
		framework: pg
		native: True
		output: True
		rspectype: ('GENI', '3')

  Args: listresources

  Result Summary: Retrieved resources from 1 aggregates.
Wrote rspecs from 1 aggregates to 1 files
Saved listresources RSpec at 'unspecified_AM_URN' to file rspec-www-emulab-net-protogeni.xml; . 
INFO:omni: ============================================================

The resulting file (named rspec-www-emulab-net-protogeni.xml as the output describes) looks like this in part:

<?xml version="1.0" ?>
<!-- Resources at AM:
  URN: unspecified_AM_URN
  URL: https://www.emulab.net/protogeni/xmlrpc/am
 -->
<rspec expires="2012-08-22T18:45:34Z" 
            generated="2012-08-22T18:45:34Z"
            type="advertisement" 
            xmlns="http://www.geni.net/resources/rspec/3" 
            xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://www.geni.net/resources/rspec/3 
                                              http://www.geni.net/resources/rspec/3/ad.xsd 
                                              http://www.protogeni.net/resources/rspec/ext/emulab/1                                               
                                              http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop_extension.xsd 
                                              http://hpn.east.isi.edu/rspec/ext/stitch/0.1/ 
                                              http://hpn.east.isi.edu/rspec/ext/stitch/0.1/stitch-schema.xsd 
                                              http://www.geni.net/resources/rspec/ext/shared-vlan/1 
                                              http://www.geni.net/resources/rspec/ext/shared-vlan/1/ad.xsd ">  

Getting a list of resources from the PlanetLab Princeton aggregate in GENI v3 rspec format:

$ omni.py -o -a plc -t geni 3 --api-version 2 listresources
INFO:omni:Loading config file /home/nriga/.gcf/omni_config
INFO:omni:Using control framework pg
INFO:omni:Saving output to a file.
INFO:omni:Substituting AM nickname plc with URL https://www.planet-lab.org:12346, URN unspecified_AM_URN
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'rspec-www-planet-lab-org.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
		aggregate: plc
		api_version: 2
		framework: pg
		native: True
		output: True
		rspectype: ('geni', '3')

  Args: listresources

  Result Summary: Retrieved resources from 1 aggregates.
Wrote rspecs from 1 aggregates to 1 files
Saved listresources RSpec at 'unspecified_AM_URN' to file rspec-www-planet-lab-org.xml; . 
INFO:omni: ============================================================

This output file (rspec-www-planet-lab-org.xml) begins:

<!-- Resources at AM:
        URN: unspecified_AM_URN
        URL: http://www.planet-lab.org:12346
 -->

<rspec expires="2012-01-09T17:30:45Z" 
       generated="2012-01-09T16:30:45Z" 
       type="advertisement" 
       xmlns="http://www.geni.net/resources/rspec/3" 
       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.geni.net/resources/rspec/3 
                     http://www.geni.net/resources/rspec/3/ad.xsd 
                     http://www.planet-lab.org/resources/sfa/ext/planetlab/1 
                     http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd"
>  

You may use the output of these two listresources commands to generate RSpecs to request resources.

If you are planning to use MyPLC resources, you may query a MyPLC installation to get a list of available resources as follows:

$  omni.py -o -a plc-gpo listresources
INFO:omni:Loading config file /home/nriga/.gcf/omni_config
INFO:omni:Using control framework pg
INFO:omni:Saving output to a file.
INFO:omni:Substituting AM nickname plc-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'rspec-myplc-gpolab-bbn-com-12346-.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
		aggregate: plc-gpo
		framework: pg
		native: True
		output: True

  Args: listresources

  Result Summary: Retrieved resources from 1 aggregates.
Wrote rspecs from 1 aggregates to 1 files
Saved listresources RSpec at 'unspecified_AM_URN' to file rspec-myplc-gpolab-bbn-com-12346-.xml; . 
INFO:omni: ============================================================

Create a slice

If you have an account with GPO's Clearinghouse then your slice will be created in the pgeni.gpolab.bbn.com namespace. For this example a slice named lnevers-1slice is created; you should choose a slice name that is meaningful to you. To avoid confusion, avoid creating a slice with the same name as your username (ie if your username is lnevers, don't name your slice lnevers too).

$  omni.py createslice lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Created slice with Name lnevers-1slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice, Expiration 2012-01-10 00:07:45
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed createslice:

  Options as run:
                framework: pgeni
                native: True

  Args: createslice lnevers-1slice
  Result Summary: Created slice with Name lnevers-1slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice, Expiration 2012-01-10 00:07:45
INFO:omni: ============================================================

Renew your slice

Note in the above output that our new slice expires soon. Any resources that you will reserve as part of your slice can not last longer than your slice, and will go away when the reservation expires. For your experiment be sure to renew your slice for the duration of your experiment. Here we only slightly extend the slice lifetime.

$  omni.py renewslice lnevers-1slice 2012-01-30
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni.protogeni:Requesting new slice expiration '2012-01-30T00:00:00'
INFO:omni:Slice lnevers-1slice now expires at 2012-01-30 00:00:00 UTC
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed renewslice:

  Options as run:
                framework: pgeni
                native: True

  Args: renewslice lnevers-1slice 2012-01-30

  Result Summary: Slice lnevers-1slice now expires at 2012-01-30 00:00:00 UTC
Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC 
INFO:omni: ============================================================

Add Emulab PG resources to your slice

To request two Emulab ProtoGENI nodes, the following rspec named emulab.rspec was used for this example; your rspec will be specific to your experiment requirements:

<?xml version="1.0" ?>
<!-- Resources at AM:
        URN: unspecified_AM_URN
        URL: https://www.emulab.net/protogeni/xmlrpc/am
 -->
<rspec type="request" xmlns="http://www.protogeni.net/resources/rspec/2" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec2/request.xsd http://www.protogeni.net/resources/rspec/ext/emulab/1 http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop_extension.xsd">
  <node client_id="geni1"
        exclusive="true">
    <sliver_type name="raw-pc" />
  </node>
  <node client_id="geni2"
        exclusive="true">
    <sliver_type name="raw-pc" />
  </node>
</rspec>

To request two ProtoGENI nodes, a sliver was created within the Emulab ProtoGENI aggregate with the RSpec above using the following command. Note the use of the -o argument, which saves the manifest RSpec to a file. The manifest contains your new host's IP address and login information.

$ omni.py -a pg-utah -o createsliver lnevers-1slice emulab.rspec
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni:Creating sliver(s) from rspec file emulab.rspec for slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice
INFO:omni:Writing result of createsliver for slice: lnevers-1slice at AM: https://www.emulab.net/protogeni/xmlrpc/am to file lnevers-1slice-manifest-rspec-www-emulab-net-protogeni.xml
INFO:omni:Writing to 'lnevers-1slice-manifest-rspec-www-emulab-net-protogeni.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed createsliver:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True
                output: True

  Args: createsliver lnevers-1slice emulab.rspec

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Reserved resources on https://www.emulab.net/protogeni/xmlrpc/am. 
   Saved createsliver results to lnevers-1slice-manifest-rspec-www-emulab-net-protogeni.xml.  
INFO:omni: ============================================================

The manifest RSpec lnevers-1slice-manifest-rspec-www-emulab-net-protogeni.xml- the result of your reservation - looks like this:

<!-- Reserved resources for:
        Slice: lnevers-1slice
        At AM:
        URL: https://www.emulab.net/protogeni/xmlrpc/am
 -->

<rspec type="manifest" 
       xmlns="http://www.protogeni.net/resources/rspec/2" 
       xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/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/request.xsd 
                            http://www.protogeni.net/resources/rspec/ext/emulab/1 
                            http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop _extension.xsd">  
    <node component_id="urn:publicid:IDN+emulab.net+node+pc333" 
          component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" 
          exclusive="true" sliver_id="urn:publicid:IDN+emulab.net+sliver+68392" 
          virtual_id="geni1" virtualization_type="emulab-vnode" 
          xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">    
      
         <sliver_type name="raw-pc"/>    
         <emulab:vnode name="pc333"/>    
         <host name="geni1.lnevers-1slice.pgeni-gpolab-bbn-com.emulab.net"/>    
         <services>      
                  <login authentication="ssh-keys" hostname="pc333.emulab.net" port="22" username="lnevers"/>    
         </services>  
   </node>  
    <node component_id="urn:publicid:IDN+emulab.net+node+pc350" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" exclusive="true" sliver_id="urn:publicid:IDN+emulab.net+sliver+68393" virtual_id="geni2" virtualization_type="emulab-vnode" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1">    
      <sliver_type name="raw-pc"/>    <emulab:vnode name="pc350"/>    <host name="geni2.lnevers-1slice.pgeni-gpolab-bbn-com.emulab.net"/>    <services>      <login authentication="ssh-keys" hostname="pc350.emulab.net" port="22" username="lnevers"/>    </services>  </node>  
</rspec>

Add PlanetLab resources to GPO PG slice

To request three PlanetLab nodes, the following rspec named planet.rspec was used for this example; your rspec will be specific to your experiment requirements.

This example uses ProtoGENI V2 RSpec format, to generate the ProtoGENI V2 request from the Advertisement:

  • Change the rspec headers to specify that this is a request, using the headers shown below
  • Pull out only the nodes you wish to reserve - ensure they say available now="true"
  • For each node
    • Add an attribute client_id with a nickname
    • Remove the available sub-element
    • Add the sub-element <sliver_type name="plab-vnode"/>
<?xml version="1.0" ?>
<!-- Resources at AM:
        URN: unspecified_AM_URN
        URL: http://www.planet-lab.org:12346
 -->
<rspec type="request"
       xmlns="http://www.protogeni.net/resources/rspec/2"
       xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/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/request.xsd
       http://www.protogeni.net/resources/rspec/ext/emulab/1
       http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop_extension.xsd">
  <node
    component_id="urn:publicid:IDN+plc:rit+node+planet2.cs.rit.edu"
    component_manager_id="urn:publicid:IDN+plc+authority+am"
    component_name="planet2.cs.rit.edu" exclusive="false" 
    client_id="ritpl2">    
      <hardware_type name="plab-pc"/>    
      <hardware_type name="pc"/>    
      <location country="us" latitude="43.0844" longitude="-77.6799"/>    
      <sliver_type name="plab-vnode"/>    
  </node>  
  <node
    component_id="urn:publicid:IDN+plc:williams+node+planetlab3.williams.edu"
    component_manager_id="urn:publicid:IDN+plc+authority+am"
    component_name="planetlab3.williams.edu" exclusive="false" 
    client_id="williamspl3">    
      <hardware_type name="plab-pc"/>    
      <hardware_type name="pc"/>    
      <location country="us" latitude="42.71" longitude="-73.2"/>    
      <sliver_type name="plab-vnode"/>    
  </node>  
  <node
    component_id="urn:publicid:IDN+plc:bbn+node+plnode-03.gpolab.bbn.com"
    component_manager_id="urn:publicid:IDN+plc+authority+am"
    component_name="plnode-03.gpolab.bbn.com" exclusive="false" 
    client_id="gpopl3">    
      <hardware_type name="plab-pc"/>    
      <hardware_type name="pc"/>    
      <location country="us" latitude="42.3907" longitude="-71.1478"/>    
      <sliver_type name="plab-vnode"/>    
  </node>  
</rspec>

To request the three PlanetLab nodes, a sliver was created within Planetlab with the rspec above using the following command:

$ omni.py -a plc -o createsliver --api-version 2  lnevers-1slice planet.rspec
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni:Creating sliver(s) from rspec file planet.rspec for slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice
INFO:omni:Writing result of createsliver for slice: lnevers-1slice at AM: http://www.planet-lab.org:12346 to file lnevers-1slice-manifest-rspec-www-planet-lab-org.xml
INFO:omni:Writing to 'lnevers-1slice-manifest-rspec-www-planet-lab-org.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed createsliver:

  Options as run:
                aggregate: http://www.planet-lab.org:12346
                api_version: 2
                framework: pgeni
                native: True
                output: True

  Args: createsliver lnevers-1slice planet.rspec

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Reserved resources on http://www.planet-lab.org:12346. 
   Saved createsliver results to lnevers-1slice-manifest-rspec-www-planet-lab-org.xml.  
INFO:omni: ============================================================

The resulting manifest RSpec lnevers-1slice-manifest-rspec-www-planet-lab-org.xml is this:

<?xml version="1.0" ?>
<!-- Reserved resources for:
        Slice: lnevers-1slice
        At AM:
        URL: http://www.planet-lab.org:12346
 -->
<rspec expires="2012-01-23T13:12:32Z" generated="2012-01-09T18:12:35Z" type="manifest" xmlns="http://www.protogeni.net/resources/rspec/2" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" x
mlns: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.proto
geni.net/resources/rspec/2/manifest.xsd http://www.planet-lab.org/resources/sfa/ext/planetlab/1 http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd">  
    <node client_id="plnode-03.gpolab.bbn.com" component_id="urn:publicid:IDN+plc:bbn+node+plnode-03.gpolab.bbn.com" component_manager_id="urn:publicid:IDN+plc+authority+cm" component_name="plnode-03.gpolab
.bbn.com" exclusive="false" sliver_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice:23324:13627:0">    
        <hardware_type name="plab-pc"/>    
        <hardware_type name="pc"/>    
        <location country="unknown" latitude="42.3907" longitude="-71.1478"/>    
        <interface client_id="13627:2918" component_id="urn:publicid:IDN+plc+interface+node13627:eth0"/>    
        <services>      
            <login authentication="ssh-keys" hostname="plnode-03.gpolab.bbn.com" port="22" username="pgenigpolabbbncom_lnevers1slice"/>      
        </services>    
        <sliver_type name="plab-vserver"/>    
    </node>  
    <node client_id="planetlab3.williams.edu" component_id="urn:publicid:IDN+plc:williams+node+planetlab3.williams.edu" component_manager_id="urn:publicid:IDN+plc+authority+cm" component_name="planetlab3.wi
lliams.edu" exclusive="false" sliver_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice:23324:10860:0">    
        <hardware_type name="plab-pc"/>    
        <hardware_type name="pc"/>    
        <location country="unknown" latitude="42.71" longitude="-73.2"/>    
        <interface client_id="10860:1643" component_id="urn:publicid:IDN+plc+interface+node10860:eth0"/>    
        <services>      
            <login authentication="ssh-keys" hostname="planetlab3.williams.edu" port="22" username="pgenigpolabbbncom_lnevers1slice"/>      
        </services>    
        <sliver_type name="plab-vserver"/>    
    </node>  
</rspec>

Note that your login for your nodes is available by running sliverstatus.

As part of the createsliver operation for PL nodes, Omni uploads the user SSH keys based on the [users] section of the omni_config. If you have problems in setting up your slice, contact us at help@geni.net.

Checking sliver resource status

Once you have requested the resources you may check the sliver status for PG and PL nodes. As you review the results, note the expiration time to make sure that it meets your experiment running time requirement. To get sliverstatus for the example experiment on this page the following command was issued for the PG resources:

<?xml version="1.0" ?>
<!-- Reserved resources for:
        Slice: lnevers-1slice
        At AM:
        URL: http://www.planet-lab.org:12346
 -->

<rspec expires="2012-01-23T13:12:32Z" generated="2012-01-09T18:12:35Z" type="manifest" xmlns="http://www.protogeni.net/resources/rspec/2" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" x
mlns: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.proto
geni.net/resources/rspec/2/manifest.xsd http://www.planet-lab.org/resources/sfa/ext/planetlab/1 http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd">  
    <node client_id="plnode-03.gpolab.bbn.com" component_id="urn:publicid:IDN+plc:bbn+node+plnode-03.gpolab.bbn.com" component_manager_id="urn:publicid:IDN+plc+authority+cm" component_name="plnode-03.gpolab
.bbn.com" exclusive="false" sliver_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice:23324:13627:0">    
        <hardware_type name="plab-pc"/>    
        <hardware_type name="pc"/>    
        <location country="unknown" latitude="42.3907" longitude="-71.1478"/>    
        <interface client_id="13627:2918" component_id="urn:publicid:IDN+plc+interface+node13627:eth0"/>    
        <services>      
            <login authentication="ssh-keys" hostname="plnode-03.gpolab.bbn.com" port="22" username="pgenigpolabbbncom_lnevers1slice"/>      
        </services>    
$ omni.py -a pg-utah lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni:Status of Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice:
INFO:omni:Sliver status for Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice at AM URL https://www.emulab.net/protogeni/xmlrpc/am
INFO:omni:{'geni_resources': [{'geni_error': '',
                     'geni_status': 'ready',
                     'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+68392',
                     'pg_manifest': {'attributes': {'component_id': 'urn:publicid:IDN+emulab.net+node+pc333',
                                                    'component_manager_id': 'urn:publicid:IDN+emulab.net+authority+cm',
                                                    'exclusive': 'true',
                                                    'sliver_id': 'urn:publicid:IDN+emulab.net+sliver+68392',
                                                    'virtual_id': 'geni1',
                                                    'virtualization_type': 'emulab-vnode',
                                                    'xmlns': 'http://www.protogeni.net/resources/rspec/2',
                                                    'xmlns:emulab': 'http://www.protogeni.net/resources/rspec/ext/emulab/1'},
                                     'children': [{'attributes': {'name': 'raw-pc'},
                                                   'children': [],
                                                   'name': 'sliver_type'},
                                                  {'attributes': {'name': 'pc333'},
                                                   'children': [],
                                                   'name': 'emulab:vnode'},
                                                  {'attributes': {'name': 'geni1.lnevers-1slice.pgeni-gpolab-bbn-com.emulab.net'},
                                                   'children': [],
                                                   'name': 'host'},
                                                  {'attributes': {},
                                                   'children': [{'attributes': {'authentication': 'ssh-keys',
                                                                                'hostname': 'pc333.emulab.net',
                                                                                'port': 22,
                                                                                'username': 'lnevers'},
                                                                 'children': [],
                                                                 'name': 'login'}],
                                                   'name': 'services'}],
                                     'name': 'node'},
                     'pg_status': 'ready'},
                    {'geni_error': '',
                     'geni_status': 'ready',
                     'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+68393',
                     'pg_manifest': {'attributes': {'component_id': 'urn:publicid:IDN+emulab.net+node+pc350',
                                                    'component_manager_id': 'urn:publicid:IDN+emulab.net+authority+cm',
                                                    'exclusive': 'true',
                                                    'sliver_id': 'urn:publicid:IDN+emulab.net+sliver+68393',
                                                    'virtual_id': 'geni2',
                                                    'virtualization_type': 'emulab-vnode',
                                                    'xmlns': 'http://www.protogeni.net/resources/rspec/2',
                                                    'xmlns:emulab': 'http://www.protogeni.net/resources/rspec/ext/emulab/1'},
                                     'children': [{'attributes': {'name': 'raw-pc'},
                                                   'children': [],
                                                   'name': 'sliver_type'},
                                                  {'attributes': {'name': 'pc350'},
                                                   'children': [],
                                                   'name': 'emulab:vnode'},
                                                  {'attributes': {'name': 'geni2.lnevers-1slice.pgeni-gpolab-bbn-com.emulab.net'},
                                                   'children': [],
                                                   'name': 'host'},
                                                  {'attributes': {},
                                                   'children': [{'attributes': {'authentication': 'ssh-keys',
                                                                                'hostname': 'pc350.emulab.net',
                                                                                'port': 22,
                                                                                'username': 'lnevers'},
                                                                 'children': [],
                                                                 'name': 'login'}],
                                                   'name': 'services'}],
                                     'name': 'node'},
                     'pg_status': 'ready'}],
 'geni_status': 'ready',
 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice',
 'pg_expires': '2012-01-14 11:10:10',
 'pg_status': 'ready'}
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed sliverstatus:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True

  Args: sliverstatus lnevers-1slice

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Returned status of slivers on 1 of 1 possible aggregates. 
INFO:omni: ============================================================

To check the sliverstatus for PL resources, but this time saving the status output to a file, the following command was issued:

$ omni.py -a plc -o sliverstatus -t geni 3 --api-version 2 lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni:Status of Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice:
INFO:omni:Writing to 'lnevers-1slice-sliverstatus-www-planet-lab-org.json'
INFO:omni:Sliver status for Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice at AM URL http://www.planet-lab.org:12346
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed sliverstatus:

  Options as run:
                aggregate: http://www.planet-lab.org:12346
                api_version: 2
                framework: pgeni
                native: True
                output: True
                rspectype: ('geni', '3')

  Args: sliverstatus lnevers-1slice

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Saved sliverstatus on lnevers-1slice at AM http://www.planet-lab.org:12346 to file lnevers-1slice-sliverstatus-www-planet-lab-org.json. 
Returned status of slivers on 1 of 1 possible aggregates. 
INFO:omni: ============================================================

And the saved status is:

{'geni_resources': [{'geni_error': '',
                     'geni_status': 'ready',
                     'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+lnevers-1slice:23324:13627:0',
                     'pl_boot_state': 'boot',
                     'pl_hostname': 'plnode-03.gpolab.bbn.com',
                     'pl_last_contact': '2012-01-09T13:15:59Z'},
                    {'geni_error': '',
                     'geni_status': 'ready',
                     'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+lnevers-1slice:23324:10860:0',
                     'pl_boot_state': 'boot',
                     'pl_hostname': 'planetlab3.williams.edu',
                     'pl_last_contact': '2012-01-09T13:13:23Z'}],
 'geni_status': 'ready',
 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+lnevers-1slice',
 'pl_expires': '2012-01-23T13:12:32Z',
 'pl_login': 'pgenigpolabbbncom_lnevers1slice'}

A lot of very useful information is reported for the sliverstatus output including which hosts are assigned to you and for how long. For PlanetLab, notice the value in the 'pl_login' field, which is the login to be used to access the nodes. For a slice across multiple aggregates, you should pay close attention to the expiration time for each aggregate sliver (pg_expires & pl_expires). Note that slice expiration time is also available in the output of many commands.

Also note that by using the aggregates option in your omni_config, you can configure Omni to talk to all the aggregates in your experiment, and only those aggregates. Then sliverstatus will get full status for you in a single call.

Note that the Emulab PG aggregate limits slivers to a duration of 5 days and you may need to extend the sliver expiration. For this example the pg_expires is 2012-01-14 11:10:10 while the pl_expires is 2012-01-23T13:12:32Z. Make sure that each expiration time meets your requirements for your experiment's duration. If you need to extend the expiration, you can use the Omni renewsliver to extend each sliver. The following command is issued to modify the expiration time for the ProtoGENI resources:

$ omni.py -a pg-utah renewsliver lnevers-1slice '2012-01-14 16:10:10'
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
INFO:omni:Renewing Sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice until 2012-01-14 16:10:10+00:00 (UTC)
INFO:omni:Renewed sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice at unspecified_AM_URN (https://www.emulab.net/protogeni/xmlrpc/am) until 2012-01-14T16:10:10+00:00 (UTC)
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed renewsliver:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True

  Args: renewsliver lnevers-1slice 2012-01-14 16:10:10

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Renewed sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice at unspecified_AM_URN (https://www.emulab.net/protogeni/xmlrpc/am) until 2012-01-14T16:10:10+00:00 (UTC)
INFO:omni: ============================================================

Check status again and you will notice that the pg_expires has been modified:

$ omni.py -a pg-utah sliverstatus lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni

.....
 'geni_status': 'ready',
 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice',
 'pg_expires': '2012-01-14 09:10:10',
 'pg_status': 'ready'}
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed sliverstatus:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True

  Args: sliverstatus lnevers-1slice

  Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice expires on 2012-01-30 00:00:00 UTC
Returned status of slivers on 1 of 1 possible aggregates. 
INFO:omni: ============================================================

Find Slivers and List Resources in your Slice

If at any point you forget what you have reserved in your slice, or lose the manifest RSpec that you saved earlier, you can retrieve it. By calling listresources with your slice name as an argument, you get your manifest RSpec again.

Run:

$ omni.py -a pg-utah -o -t ProtoGENI 2 listresources lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Saving output to a file.
INFO:omni:Gathering resources reserved for slice lnevers-1slice.
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'lnevers-1slice-rspec-www-emulab-net-protogeni.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True
                output: True
                rspectype: ('ProtoGENI', '2')

  Args: listresources lnevers-1slice

  Result Summary: Retrieved resources for slice lnevers-1slice from 1 aggregates.
Wrote rspecs from 1 aggregates to 1 files
Saved listResources RSpec at unspecified_AM_URN to file lnevers-1slice-rspec-www-emulab-net-protogeni.xml.  
INFO:omni: ============================================================

The result will be a file (lnevers-1slice-rspec-www-emulab-net.xml) of the resources in your slice at that aggregate.

Verify Resources and run your Experiment

Once you have the sliverstatus, you have enough information to access the hosts allocated for your experiment. Simply SSH into one of the hosts and ping any of the other hosts in your experiment. Notice that the pl_login is being used to get access. Now verify that there is connectivity between your allocated resources. In this example experiment, one of the PlanetLab resources allocated is used to ping a !ProtoGENI resource that is also part of the experiment:

$ ssh pgenigpolabbbncom_lneversslice@plnode-03.gpolab.bbn.com
Last login: Mon Jan 2 09:20:48 2012 from sendaria.gpolab.bbn.com
[pgenigpolabbbncom_lneversslice@plnode-03 ~]$ ping pc203.emulab.net -c 3
PING pc203.emulab.net (155.98.39.3) 56(84) bytes of data.
64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=1 ttl=44 time=116 ms
64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=2 ttl=44 time=116 ms
64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=3 ttl=44 time=116 ms

--- pc203.emulab.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 116.385/116.595/116.997/0.398 ms
[pgenigpolabbbncom_lneversslice@plnode-03 ~]$ 

Once you have verified connectivity between these hosts that have been allocated to you, you may start your experiment.

Delete sliver resources

When the experiment is completed you should release the resources by deleting the resource sliver for each of the Resource Aggregates used in the Experiment. In the example experiment used in this page, the ProtoGENI sliver was deleted as follows:

$ omni.py -a pg-utah deletesliver lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice on unspecified_AM_URN at https://www.emulab.net/protogeni/xmlrpc/am
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed deletesliver:

  Options as run:
                aggregate: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True

  Args: deletesliver lnevers-1slice

  Result Summary: Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice on unspecified_AM_URN at https://www.emulab.net/protogeni/xmlrpc/am 
INFO:omni: ============================================================

Also the Planetlab sliver was deleted as follows:

List your Slices

You are responsible for remembering your slices, and what resources you have.

If, as here, you use Protogeni as your Clearinghouse, you can use an Omni command to listmyslices. Then for each, you can use listresources to see what you have reserved at various aggregates.

For example:

$ omni.py -a plc deletesliver  -t geni 3 --api-version 2 lnevers-1slice
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice on unspecified_AM_URN at http://www.planet-lab.org:12346
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed deletesliver:

  Options as run:
                aggregate: http://www.planet-lab.org:12346
                api_version: 2
                framework: pgeni
                native: True
                rspectype: ('geni', '3')

  Args: deletesliver lnevers-1slice

  Result Summary: Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers-1slice on unspecified_AM_URN at http://www.planet-lab.org:12346 
INFO:omni: ============================================================

Then, to see what resources you have in this slice at Planetlab:

$ omni.py -f pgeni -a plc -t geni 3 --api-version 2 listresources lnevers-1slice

The results above show that the returned RSpec contains no nodes - as expected, since we had already deleted our sliver there.

Happy Experimenting!


Email help@geni.net for GENI support or email me with feedback on this page!

Attachments (1)

Download all attachments as: .zip