wiki:GENIExperimenter/ExperimentExample

Version 29 (modified by lnevers@bbn.com, 8 years ago) (diff)

--

GENI Experiment Example 1

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, please see the following pages to get the GCF package and to install it.

Omni Configuration

For GENI Experiment Example defined above, the following omni_config settings were used:

[omni]
default_cf = gpo-pg
users = lnevers

# ---------- Users ----------
[lnevers]
urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers
keys = ~/.ssh/id_rsa.pub

# ---------- Frameworks ----------
# GPO ProtoGENI 
[gpo-pg]
type = pg
ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa
cert = ~/.ssl/pgeni/encrypted-cleartext.pem
key = ~/.ssl/pgeni/encrypted-cleartext.pem
verbose=false

# Utah ProtoGENI 
[utah-pg]
type = pg
ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
sa = https://www.emulab.net:443/protogeni/xmlrpc/sa
cert = ~/.ssl/protogeni/encrypted-cleartext.pem
key = ~/.ssl/protogeni/encrypted-cleartext.pem

# PlanetLab 
[plc]
type=sfa
authority=plc.bbn
user=plc.bbn.lnevers
cert=~/.gcf/planetlab/plc.bbn.lnevers.gid
key=~/.gcf/planetlab/lnevers.pkey
registry=http://www.planet-lab.org:12345
slicemgr=http://www.planet-lab.org:12347

The above configuration is specific to the experiment captured in this page. 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 Omni page for more details. The omni_configuration parameters shown define the following:

Parameter Use
default_cf Default Clearinghouse and credentials used if not specified on the command line.
users users setting used when reserving slices.
urn The username URN, see how to determine your URN
keys A comma separated list of public ssh key, that are already uploaded to the Clearinghouse and will be uploaded to nodes by omni tools
type Clearinghouse/credentials type "pg" indicates ProtoGENI, "sfa" indicates PlanetLab
ch ProtoGENI Clearinghouse URL.
sa Slice Authority URL.
cert Location of your SSL encrypted certificate (contains both a certificate and a private key).
key Location of your SSL encrypted private key (contains both a certificate and a private key), or SSH private key for PlanetLab

List available resources

With the GPO ProtoGENI setting defined as shown in the omni_config above, you can get a list of available resources from each of the other 2 aggregates.

Note: These instructions use Omni options available in v1.3 and later. Starting with Omni 1.3, 'native' format RSpecs are the default, and 'omnispecs' are deprecated though still available. Additionally, verbose output like the Advertisement RSpec from List Resources is saved to a file using the -o option. Finally, these instructions show the use of the -t option to request RSpecs in a particular format. For earlier versions of omni, you should (a) include the -n argument, (b) re-direct output to a file (>) instead of the -o option, and (c) use PG V0.2 RSpecs at Emulab and SFA format RSpecs at PlanetLab.

Getting a list of resources from the Emulab ProtoGENI aggregate in ProtoGENI RSpec V2 format:

$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am -o -t ProtoGENI 2 listresources 
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Saving output to a file.
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: https://www.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                native: True
                output: True
                rspectype: ('ProtoGENI', '2')

  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-01-09T17:28:17Z" generated="2012-01-09T17:28:17Z" type="advertisement" 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/ad.xsd http://www.protogeni.net/resource
s/rspec/ext/emulab/1 http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop_extension.xsd http://company.com/rspec/ext/stitch/1 http://company.com/rspec/ext/stitch/1/ad.xsd ">  

Getting a list of resources from the PlanetLab Princeton aggregate in its default format (SFA):

$  ./src/omni.py -o -a http://www.planet-lab.org:12346 -t geni 3 --api-version 2 listresources
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Saving output to a file.
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: http://www.planet-lab.org:12346
                api_version: 2
                framework: pgeni
                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. The above listresources commands use the default native rspec format rather than the deprecated omnispec format. Note that with native RSpecs, the -a flag or the aggregates entry in your omni_config is required to specify an aggregate manager.

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

$  ./src/omni.py -a http://myplc.gpolab.bbn.com:12346 -o listresources
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Saving output to a file.
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'rspec-myplc-gpolab-bbn-com.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
                aggregate: http://myplc.gpolab.bbn.com:12346
                framework: pgeni
                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.xml. 
INFO:omni: ============================================================

If you are planning to use University of Kentucky Emulab resources, you can query just this installation (instead of all PG aggregates, as we did in the example above) to get a list of available resources. Note the example below was collected with GPO pgeni.gpolab.bbn.com credentials:

$  ./src/omni.py -a https://www.uky.emulab.net/protogeni/xmlrpc/am -o listresources 
INFO:omni:Loading config file omni_config
INFO:omni:Using control framework pgeni
INFO:omni:Saving output to a file.
INFO:omni:Listed resources on 1 out of 1 possible aggregates.
INFO:omni:Writing to 'rspec-www-uky-emulab-net-protogeni.xml'
INFO:omni: ------------------------------------------------------------
INFO:omni: Completed listresources:

  Options as run:
                aggregate: https://www.uky.emulab.net/protogeni/xmlrpc/am
                framework: pgeni
                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-www-uky-emulab-net-protogeni.xml. 
INFO:omni: ============================================================

Create a slice

Since the omni_config specifies using the credentials and the Clearinghouse for the GPO ProtoGENI, 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).

$  ./src/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. Your resource reservations will not be longer then your slice life, 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.

$  ./src/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 GPO PG 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.

$  ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am -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. Standard SFA formats are also acceptable. 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:

$  ./src/omni.py -a http://www.planet-lab.org:12346 -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>    
lnevers@sendaria:~/gcf-1.5.1$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am sliverstatus 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:

$ ./src/omni.py -a http://www.planet-lab.org:12346 -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 renewslice to extend each sliver. The following command is issued to modify the expiration time for the ProtoGENI resources:

$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am 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:

$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am 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:

$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am -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:

$ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am 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:

$ ./src/omni.py -a http://www.planet-lab.org:12346 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:

$ ./src/omni.py -f pgeni -a http://www.planet-lab.org:12346 -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 us with any questions and feedback on this page!

Attachments (1)

Download all attachments as: .zip