wiki:GENIRacksHome/GENIRacksRspecs

Version 2 (modified by lnevers@bbn.com, 6 years ago) (diff)

--

GENI Racks RSpecs

This page captures findings from using selected RSpecs in both ExoGENI and InstaGENI racks environments. Additionally, notes are captured to highlight any differences in behavior or information of interest about the requests.

Summary of RSpec findings

Detailed explanation of the findings are in sub-sequent sections. This is a summary of test findings, you can find details in subsequent sections for each Note

  • Note 1: The "postBootScript" schema is an ExoGENI-only schema extension.
  • Note 2: The client_id is element not required for ExoGENI and can be omitted; The sliver_type element is required for ExoGENI.
  • Note 3: If client_id is defined in the RSpec, ExoGENI does not set the hostname to client_id. InstaGENI does set the hostname based on client_id
  • Note 3: The sliver_type element is not required for InstaGENI, and if not defined it results in raw-pc node being allocated.
  • Note 4: If you want a dedicated raw-pc at a specific ExoGENI site, you must must be specify the component_manager_if for the site and request the resource from the ExoSM. There are no raw-pcs available from the local aggregate.
  • Note 5: ExoGENI supports two sliver_types that map to a dedicated PC and they are: <sliver_type name="raw-pc"/> and <sliver_type name="ExoGENI-M4"/>
  • Note 6: ExoGENI will not assign IP addresses if they are not specified in the RSpec.
  • Note 7: Once ExoGENI assigns an IP address on the node it cannot be changed. The NEuca agent continously monitors the interfaces and reset the IP settings if changed.
  • Note 8: If interfaces are configure and IP addresses are not specified on ExoGENI, the nodes only show eth0 in the ifconfig output, but eth1 is initialized and can be configured and brought up with a user-specified address which is not reset by the NEuca agent.
  • Note 9: InstaGENI links that use GRE tunnels must specify and IP address in the RSpec, an address will not be automatically assigned in this case.
  • Note 10: Unlike ExoGENI, for InstaGENI aggregates the request is submitted at each of the aggregate in the RSpec, and there is a limited amount of delay allowed between the requests to each aggregates. (few minutes)
  • Note 11: The shared VLAN link definition in InstaGENI require one entry for each side of the VLAN. Combining the two link into one link entry fails.
  • Note 12: There additional variables that are supported for postBootScript via flukes which are not supported via the GENI AM API.
  • Note 13: Once the allocated node is up, you may view the results of the post boot script with the neuca-user-script command.
  • Note 14: ExoGENI node groups are not supported via the GENI AM API, only via flukes.

Common RSpec

A set of common RSpecs were tested to determine the minimum common RSpec definitions for several topologies. Each of the RSpecs listed below use the following request RSpec header:

<rspec xmlns="http://www.geni.net/resources/rspec/3"
      xmlns:pbs="http://www.geni.net/resources/rspec/ext/postBootScript/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/request.xsd
                          http://www.geni.net/resources/rspec/ext/shared-vlan/1
                          http://www.geni.net/resources/rspec/ext/shared-vlan/1/request.xsd
                          http://www.geni.net/resources/rspec/ext/postBootScript/1
                          http://www.geni.net/resources/rspec/ext/postBootScript/1/request.xsd"
       xmlns:s="http://www.geni.net/resources/rspec/ext/shared-vlan/1"
      type="request">

Note 1: "postBootScript" is an ExoGENI-only schema extension.

1 VM RSpec Default OS

ExoGENI

A simple 1-node scenario for ExoGENI requires "sliver_type" which is not required by InstaGENI, the following request will allocate 1 VM at any ExoGENI local Aggregate (Service Manager (SM)) or at the ExoGENI Global AM (ExoSM):

     <node client_id="geni1">
     <sliver_type name="m1.small">
     </sliver_type>
     </node>

Note 2: The client_id is not required for ExoGENI and can be omitted; sliver_type is required.

Note 3: If client_id is defined in the RSpec, ExoGENI does not set the hostname to client_id. InstaGENI does set the hostname based on client_id

InstaGENI

The same 1-node scenario for InstaGENI:

<node client_id="geni1">
 <sliver_type name="emulab-openvz">
 </sliver_type>
</node>
</rspec>

Note 3: The sliver_type is not required for InstaGENI, and if not defined it results in raw-pc node being allocated.

1 Raw PC Default OS

ExoGENI

ExoGENI dedicated PCs are only available via ExoSM and not the Local site AM (aka ExoGENI SM)

<node client_id="geni1">
 <sliver_type name="raw-pc">
 </sliver_type>
</node>
</rspec>

Note 4:If you want a dedicated raw-pc at a specific ExoGENI site, you must must be specify the component_manager_if for the site and request the resource from the ExoSM. There are no raw-pcs available from the local aggregate. For example, if you want 1 dedicated PC in the GPO rack, you must specify:

   <node client_id="geni1" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm" >
    <sliver_type name="raw-pc">
    </sliver_type>
   </node>

Note 5: ExoGENI supports two sliver_types that map to a dedicated PC and they are: <sliver_type name="raw-pc"/> and <sliver_type name="ExoGENI-M4"/>

InstaGENI

The following will allocate 1 dedicated PC at the aggregate where the request is submitted. The "sliver_type" is not required, when one is not specified a dedicated PC is allocated.

  <node client_id="geni1">    
   <sliver_type name="raw-pc"> 
   </sliver_type>
  </node>  

2 VM at 1 site

ExoGENI

A simple 2-node 1 link scenario for ExoGENI.

<node client_id="geni1">
 <sliver_type name="m1.small">
 </sliver_type>
 <interface client_id="geni1:0">
 <ip address="172.16.1.1" netmask="255.255.255.0" />
 </interface>
</node>
<node client_id="geni2">
 <sliver_type name="m1.small">
 </sliver_type>
 <interface client_id="geni2:0" >
   <ip address="172.16.1.2" netmask="255.255.255.0" />
 </interface>
</node>
<link client_id="link">
  <interface_ref client_id="geni1:0" />
  <interface_ref client_id="geni2:0" />
</link>
</rspec>

Note 6: The IP addresses are added because ExoGENI will not assign IP addresses if they are not specified in the RSpec.

Note 7: Once the IP address exists is applied on the node, it cannot be changed. The NEuca agent continously monitors the interfaces and reset the IP settings if changed.

Note 8: If IP addressed are not specified, the nodes only show eth0 in the ifconfig output, but eth1 is initialized and can be configured and brought up. In this case, the eth1 interface is not reset by the NEuca agent.

InstaGENI

For InstaGENI, just replace the sliver_type "m1.small" with "emulab-openvz" and the rspec works, there is no need to specify addresses within the same InstaGENI rack or across racks for InstaGENI:

Note 9:Links that use GRE tunnels must specify and IP address in the RSpec, an address will not be automatically assigned in this case.

2 VMs at 2 sites

ExoGENI

ExoGENI requests are submitted once to ExoSM for resources at the 2 aggregates. As with InstaGENI, you specify the aggregates in the RSpec to get two different sites, if not specified the VMs allocated will be in the same rack.

  <node client_id="VM" component_manager_id="urn:publicid:IDN+exogeni.net:rcivmsite+authority+am" >
    <sliver_type name="m1.small"/>
    <interface client_id="VM:if0">
      <ip address="172.16.1.1" netmask="255.255.255.0" />
    </interface>
  </node>
  <node client_id="VM-0" component_manager_id="urn:publicid:IDN+exogeni.net:bbnvmsite+authority+am" >
    <sliver_type name="m1.small"/>
    <interface client_id="VM-0:if0">
     <ip address="172.16.1.2" netmask="255.255.255.0" />
    </interface>
</node>
<link client_id="link0">
<component_manager name="urn:publicid:IDN+exogeni.net:bbnvmsite+authority+am"/>
<component_manager name="urn:publicid:IDN+exogeni.net:rcivmsite+authority+am"/>
<interface_ref client_id="VM-0:if0"/>
<interface_ref client_id="VM:if0"/>
</link>
</rspec>

InstaGENI

For InstaGENI replace the sliver_type "m1.small" with "emulab-openvz" and the component_manager. The RSpec will look as follows if a GRE tunnel is used:

<node client_id="VM" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" >
  <sliver_type name="emulab-openvz"/>
    <interface client_id="VM:if0">
      <ip address="172.16.1.1" netmask="255.255.255.0" />
    </interface>
</node>
<node client_id="VM-1" component_manager_id="urn:publicid:IDN+instageni.northwestern.edu+authority+cm">
  <sliver_type name="emulab-openvz"/>
    <interface client_id="VM-1:if0">
     <ip address="172.16.1.2" netmask="255.255.255.0" />
    </interface>
</node>
<link client_id="gre-tunnel0">
<component_manager name="urn:publicid:IDN+instageni.northwestern.edu+authority+cm"/>
<component_manager name="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"/>
<interface_ref client_id="VM-1:if0"/>
<interface_ref client_id="VM:if0"/>
<link_type name="gre-tunnel"/>
</link>

Note 10: Unlike ExoGENI, the request is submitted at each of the aggregate in the RSpec.

Another InstaGENI example for 2 VMs at 2 sites using a Layer2 VLAN named "IG-EXP-7":

  <node client_id="bbn-vm" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" exclusive="false">
    <sliver_type name="emulab-openvz"/>
    <interface client_id="bbn-vm:if0">
    </interface>
  </node>
  <node client_id="utah-vm" component_manager_id="urn:publicid:IDN+utah.geniracks.net+authority+cm" exclusive="false">
    <sliver_type name="emulab-openvz"/>
    <interface client_id="utah-vm:if0">
    </interface>
  </node>
  <link client_id="link-1">
    <component_manager name="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"/>
    <interface_ref client_id="bbn-vm:if0"/>
    <sharedvlan:link_shared_vlan name="IG-EXP-7"/>
  </link>
  <link client_id="link-1a">
    <component_manager name="urn:publicid:IDN+utah.geniracks.net+authority+cm"/>
    <interface_ref client_id="utah-vm:if0"/>
    <sharedvlan:link_shared_vlan name="IG-EXP-7"/>
  </link>

Note 11: The shared VLAN link definition in InstaGENI require one entry for each side of the VLAN. Combining the two link into one link entry fails.

1 VM with OpenFlow

ExoGENI

Sample ExoGENI Compute Resources RSpec on the OpenFlow Shared VLAN 1750:

  <node client_id="VM" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm" >
    <sliver_type name="m1.small">
    </sliver_type>
    <interface client_id="VM:if0">
   <ip address="10.42.11.198" netmask="255.255.255.0" />
    </interface>
  </node>
  <link client_id="lan0">
    <interface_ref client_id="VM:if0"/>
    <s:link_shared_vlan name="1750"/>
  </link>

Sample ExoGENI FOAM RSpec on the OpenFlow Shared VLAN 1750:

 <openflow:sliver description="OpenFlow Experiment Example" email="lnevers@bbn.com">
 <openflow:controller url="tcp:mallorea.gpolab.bbn.com:33020" type="primary" />

    <openflow:group name="eg-gpo-1750">
     <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:bbn-hn.exogeni.gpolab.bbn.com+datapath+00:01:08:17:f4:b5:2a:00" 
	component_manager_id="urn:publicid:IDN+openflow:foam:bbn-hn.exogeni.gpolab.bbn.com+authority+am" dpid="00:01:08:17:f4:b5:2a:00">
      </openflow:datapath>
    </openflow:group>

    <openflow:match>
      <openflow:use-group name="eg-gpo-1750" />
      <openflow:packet>
      <openflow:dl_vlan value="1750"/>
      <openflow:dl_type value="0x800,0x806"/>
      <openflow:nw_dst value="10.42.11.0/24"/>
      <openflow:nw_src value="10.42.11.0/24"/>
      </openflow:packet>
    </openflow:match>
  </openflow:sliver>

InstaGENI

Sample InstaGENI Compute Resources RSpec on the OpenFlow Shared VLAN 1750:

  <node client_id="gpo-ig">
    <sliver_type name="emulab-openvz" />
    <interface client_id="gpo-ig:if0">
      <ip address="10.42.11.65" netmask="255.255.255.0" type="ipv4" />
    </interface>
  </node>

  <link client_id="openflow-mesoscale-0">
    <interface_ref client_id="gpo-ig:if0" />
    <sharedvlan:link_shared_vlan name="mesoscale-openflow" />
  </link>

Sample InstaGENI FOAM RSpec on the OpenFlow Shared VLAN 1750:

 <openflow:sliver description="OpenFlow Experiment Example" email="lnevers@bbn.com">
 <openflow:controller url="tcp:mallorea.gpolab.bbn.com:33020" type="primary" />
    <openflow:group name="ig-gpo-1750">
      <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.instageni.gpolab.bbn.com+datapath+06:d6:84:34:97:c6:c9:00" 
	component_manager_id="urn:publicid:IDN+openflow:foam:foam.instageni.gpolab.bbn.com+authority+am" dpid="06:d6:84:34:97:c6:c9:00">
      </openflow:datapath>
    </openflow:group>

    <openflow:match>
      <openflow:use-group name="ig-gpo-1750" />
      <openflow:packet>
      <openflow:dl_type value="0x800,0x806"/>
      <openflow:nw_dst value="10.42.11.0/24"/>
      <openflow:nw_src value="10.42.11.0/24"/>
      </openflow:packet>
    </openflow:match>
  </openflow:sliver>

Image Support

ExoGENI

InstaGENI

RSpec Services Schema

Install services

ExoGENI

The following RSpec can be used on ExoGENI to install a "tar.gz" or a ".tgz" file, unpack it and run the command specified:

  <node client_id="VM-1" >
    <sliver_type name="m1.small"/>
    <services>
      <install install_path="/tmp" url="http://www.gpolab.bbn.com/~lnevers/mypkg.tar.gz"/>
      <execute command="/tmp/myscript.sh" shell="sh"/>
    </services>
  </node>

InstaGENI

The following RSpec can be used on InstaGENI to install a "tgz" or "tar.gz" file, unpack it and run the command specified:

  <node client_id="VM-1" >
    <sliver_type name="emulab-openvz"/>
    <services>
      <install install_path="/tmp" url="http://www.gpolab.bbn.com/~lnevers/mypkg.tar.gz"/>
      <execute command="sudo /tmp/myscript.sh" shell="sh"/>
    </services>
  </node>

Execute services

ExoGENI

The following RSpec requests the execution of one command:

<node client_id="geni1">
 <sliver_type name="m1.small">
 </sliver_type>
 <services>
   <execute shell="sh" command="hostname hostA"/>
 </services>
</node>
</rspec>

ExoGENI also supports a post boot script schema extension which uses Apache Velocity templates to replace key properties on an allocated node. Following is an example RSpec which lists all supported post boot variables via the AM API that you may use in your script. Two node are requested in order to be able to show the interface (IP/MAC) specific information.

<rspec xmlns="http://www.geni.net/resources/rspec/3"
      xmlns:pbs="http://www.geni.net/resources/rspec/ext/postBootScript/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/request.xsd
      http://www.geni.net/resources/rspec/ext/postBootScript/1
      http://www.geni.net/resources/rspec/ext/postBootScript/1/request.xsd"
      type="request">
<node client_id="geni1" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm">
 <sliver_type name="m1.small">
   <disk_image name="http://geni-images.renci.org/images/standard/debian/deb6-neuca-v1.0.6.xml" version="64ad567ce3b1c0dbaa15bad673bbf556a9
593e1c" />
 </sliver_type>
   <services>
     <pbs:services_post_boot_script type="velocity">
#!/bin/sh
set -x
IP=$self.IP(&quot;center&quot;)
MAC=$self.MAC(&quot;geni1:0&quot;)
NAME=$self.Name()
VM=$self
VMNAME=$geni1
SLICE=$sliceName
USER=$userDN
SLICE=$sliceID
     </pbs:services_post_boot_script>
   </services>
 <interface client_id="geni1:0">
   <ip address="172.16.1.1" netmask="255.255.255.0" />
 </interface>

</node>
<node client_id="geni2" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm">
 <sliver_type name="m1.large">
   <disk_image name="http://geni-images.renci.org/images/standard/debian/deb6-neuca-v1.0.6.xml" version="64ad567ce3b1c0dbaa15bad673bbf556a9
593e1c" />
 </sliver_type>
 <interface client_id="geni2:0" >
   <ip address="172.16.1.2" netmask="255.255.255.0" />
 </interface>
</node>
<link client_id="center">
  <interface_ref client_id="geni1:0" />
  <interface_ref client_id="geni2:0" />
</link>
</rspec>

Note 12: There additional variables that are supported for post boot via flukes which are not supported via the GENI AM API.

Note 13: Once the allocated node is up, you may view the neuca-user-script on the allocated node to view the results of the post boot script.

The above script results in the following:

root@debian:~# neuca-user-script 

#!/bin/sh
set -x
IP=172.16.1.1
MAC=$self.MAC("geni1:0")
NAME=geni1
VM=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
VMNAME=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
SLICE=urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+velo2
USER=[urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers, lnevers@pgeni.gpolab.bbn.com]
SLICE=$sliceID
root@debian:~# 

Note 15: Node groups are not supported via the GENI AM API, only via flukes.

InstaGENI

The following RSpec requests the execution of one command, there is only one difference from ExoGENI, the "sliver_type":

<node client_id="geni1">
 <sliver_type name="emulab-openvz">
 </sliver_type>
 <services>
   <execute shell="sh" command="hostname hostA"/>
 </services>
</node>
</rspec>

GIMI RSpecs

GIMI RSpecs in ExoGENI

GIMI RSpecs in InstaGENI

GEMINI RSpecs

GEMINI RSpec in InstaGENI

GEMINI RSpecs on ExoGENI