Changes between Initial Version and Version 1 of GENIRacksHome/GENIRacksRspecs


Ignore:
Timestamp:
04/25/13 13:57:42 (11 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIRacksHome/GENIRacksRspecs

    v1 v1  
     1[[PageOutline(1-2)]]
     2
     3= GENI Racks RSpecs =
     4
     5This 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.
     6
     7== Summary of findings ==
     8Detailed 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'''
     9
     10 - '''Note 1:''' The "postBootScript" schema is an ExoGENI-only schema extension.
     11 - '''Note 2:''' The client_id is element not required for ExoGENI and can be omitted; The sliver_type element is required for ExoGENI.
     12 - '''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
     13 - '''Note 3:''' The sliver_type element is not required for InstaGENI, and if not defined it results in raw-pc node being allocated.
     14 - '''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.
     15'''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"/> }}}
     16'''Note 6:''' ExoGENI will not assign IP addresses if they are not specified in the RSpec.
     17'''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.
     18'''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.
     19'''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.
     20'''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)
     21'''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.
     22'''Note 12:''' There additional variables that are supported for postBootScript via flukes which are not supported via the GENI AM API.
     23'''Note 13:''' Once the allocated node is up, you may view the results of the post boot script with the ''neuca-user-script'' command.
     24'''Note 14:''' ExoGENI node groups are not supported via the GENI AM API, only via flukes.
     25
     26
     27= Common RSpec =
     28
     29A 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:
     30{{{
     31<rspec xmlns="http://www.geni.net/resources/rspec/3"
     32      xmlns:pbs="http://www.geni.net/resources/rspec/ext/postBootScript/1"
     33      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     34      xsi:schemaLocation="http://www.geni.net/resources/rspec/3
     35                          http://www.geni.net/resources/rspec/3/request.xsd
     36                          http://www.geni.net/resources/rspec/ext/shared-vlan/1
     37                          http://www.geni.net/resources/rspec/ext/shared-vlan/1/request.xsd
     38                          http://www.geni.net/resources/rspec/ext/postBootScript/1
     39                          http://www.geni.net/resources/rspec/ext/postBootScript/1/request.xsd"
     40       xmlns:s="http://www.geni.net/resources/rspec/ext/shared-vlan/1"
     41      type="request">
     42}}}
     43
     44'''Note 1:''' "postBootScript" is an ExoGENI-only schema extension.
     45
     46== 1 VM RSpec Default OS ==
     47
     48=== ExoGENI ===
     49
     50A 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):
     51{{{
     52     <node client_id="geni1">
     53     <sliver_type name="m1.small">
     54     </sliver_type>
     55     </node>
     56}}}
     57
     58'''Note 2:''' The client_id is not required for ExoGENI and can be omitted; sliver_type is required.
     59
     60'''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
     61
     62
     63
     64=== InstaGENI ===
     65
     66The same 1-node scenario for InstaGENI:
     67{{{
     68<node client_id="geni1">
     69 <sliver_type name="emulab-openvz">
     70 </sliver_type>
     71</node>
     72</rspec>
     73}}}
     74
     75'''Note 3:''' The sliver_type is not required for InstaGENI, and if not defined it results in raw-pc node being allocated.
     76
     77== 1 Raw PC Default OS ==
     78
     79=== ExoGENI ===
     80
     81ExoGENI dedicated PCs are only available via ExoSM and not the Local site AM (aka ExoGENI SM)
     82{{{
     83<node client_id="geni1">
     84 <sliver_type name="raw-pc">
     85 </sliver_type>
     86</node>
     87</rspec>
     88}}}
     89
     90'''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:
     91
     92{{{
     93   <node client_id="geni1" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm" >
     94    <sliver_type name="raw-pc">
     95    </sliver_type>
     96   </node>
     97}}}
     98
     99'''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"/> }}}
     100
     101=== InstaGENI ===
     102
     103The 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.
     104
     105{{{
     106  <node client_id="geni1">   
     107   <sliver_type name="raw-pc">
     108   </sliver_type>
     109  </node> 
     110}}}
     111
     112== 2 VM at 1 site ==
     113
     114=== ExoGENI ===
     115
     116A simple 2-node 1 link scenario for ExoGENI.
     117
     118{{{
     119<node client_id="geni1">
     120 <sliver_type name="m1.small">
     121 </sliver_type>
     122 <interface client_id="geni1:0">
     123 <ip address="172.16.1.1" netmask="255.255.255.0" />
     124 </interface>
     125</node>
     126<node client_id="geni2">
     127 <sliver_type name="m1.small">
     128 </sliver_type>
     129 <interface client_id="geni2:0" >
     130   <ip address="172.16.1.2" netmask="255.255.255.0" />
     131 </interface>
     132</node>
     133<link client_id="link">
     134  <interface_ref client_id="geni1:0" />
     135  <interface_ref client_id="geni2:0" />
     136</link>
     137</rspec>
     138}}}
     139
     140'''Note 6:''' The IP addresses are added because ExoGENI will not assign IP addresses if they are not specified in the RSpec.
     141
     142'''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.
     143
     144
     145'''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.
     146 
     147
     148=== InstaGENI ===
     149
     150For 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:
     151
     152
     153'''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.
     154
     155
     156== 2 VMs at 2 sites ==
     157
     158=== ExoGENI ===
     159
     160ExoGENI 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.
     161
     162{{{
     163  <node client_id="VM" component_manager_id="urn:publicid:IDN+exogeni.net:rcivmsite+authority+am" >
     164    <sliver_type name="m1.small"/>
     165    <interface client_id="VM:if0">
     166      <ip address="172.16.1.1" netmask="255.255.255.0" />
     167    </interface>
     168  </node>
     169  <node client_id="VM-0" component_manager_id="urn:publicid:IDN+exogeni.net:bbnvmsite+authority+am" >
     170    <sliver_type name="m1.small"/>
     171    <interface client_id="VM-0:if0">
     172     <ip address="172.16.1.2" netmask="255.255.255.0" />
     173    </interface>
     174</node>
     175<link client_id="link0">
     176<component_manager name="urn:publicid:IDN+exogeni.net:bbnvmsite+authority+am"/>
     177<component_manager name="urn:publicid:IDN+exogeni.net:rcivmsite+authority+am"/>
     178<interface_ref client_id="VM-0:if0"/>
     179<interface_ref client_id="VM:if0"/>
     180</link>
     181</rspec>
     182}}}
     183
     184=== InstaGENI ===
     185
     186For 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:
     187{{{
     188<node client_id="VM" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" >
     189  <sliver_type name="emulab-openvz"/>
     190    <interface client_id="VM:if0">
     191      <ip address="172.16.1.1" netmask="255.255.255.0" />
     192    </interface>
     193</node>
     194<node client_id="VM-1" component_manager_id="urn:publicid:IDN+instageni.northwestern.edu+authority+cm">
     195  <sliver_type name="emulab-openvz"/>
     196    <interface client_id="VM-1:if0">
     197     <ip address="172.16.1.2" netmask="255.255.255.0" />
     198    </interface>
     199</node>
     200<link client_id="gre-tunnel0">
     201<component_manager name="urn:publicid:IDN+instageni.northwestern.edu+authority+cm"/>
     202<component_manager name="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"/>
     203<interface_ref client_id="VM-1:if0"/>
     204<interface_ref client_id="VM:if0"/>
     205<link_type name="gre-tunnel"/>
     206</link>
     207}}}
     208
     209'''Note 10:''' Unlike ExoGENI, the request is submitted at each of the aggregate in the RSpec.
     210
     211
     212Another  InstaGENI example for 2 VMs at 2 sites using a Layer2 VLAN named "IG-EXP-7":
     213{{{
     214  <node client_id="bbn-vm" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" exclusive="false">
     215    <sliver_type name="emulab-openvz"/>
     216    <interface client_id="bbn-vm:if0">
     217    </interface>
     218  </node>
     219  <node client_id="utah-vm" component_manager_id="urn:publicid:IDN+utah.geniracks.net+authority+cm" exclusive="false">
     220    <sliver_type name="emulab-openvz"/>
     221    <interface client_id="utah-vm:if0">
     222    </interface>
     223  </node>
     224  <link client_id="link-1">
     225    <component_manager name="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"/>
     226    <interface_ref client_id="bbn-vm:if0"/>
     227    <sharedvlan:link_shared_vlan name="IG-EXP-7"/>
     228  </link>
     229  <link client_id="link-1a">
     230    <component_manager name="urn:publicid:IDN+utah.geniracks.net+authority+cm"/>
     231    <interface_ref client_id="utah-vm:if0"/>
     232    <sharedvlan:link_shared_vlan name="IG-EXP-7"/>
     233  </link>
     234}}}
     235
     236'''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.
     237
     238
     239== 1 VM with OpenFlow ==
     240
     241
     242=== ExoGENI ===
     243
     244Sample ExoGENI Compute Resources RSpec on the !OpenFlow Shared VLAN 1750:
     245{{{
     246  <node client_id="VM" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm" >
     247    <sliver_type name="m1.small">
     248    </sliver_type>
     249    <interface client_id="VM:if0">
     250   <ip address="10.42.11.198" netmask="255.255.255.0" />
     251    </interface>
     252  </node>
     253  <link client_id="lan0">
     254    <interface_ref client_id="VM:if0"/>
     255    <s:link_shared_vlan name="1750"/>
     256  </link>
     257}}}
     258
     259Sample ExoGENI FOAM RSpec on the !OpenFlow Shared VLAN 1750:
     260{{{
     261 <openflow:sliver description="OpenFlow Experiment Example" email="lnevers@bbn.com">
     262 <openflow:controller url="tcp:mallorea.gpolab.bbn.com:33020" type="primary" />
     263
     264    <openflow:group name="eg-gpo-1750">
     265     <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:bbn-hn.exogeni.gpolab.bbn.com+datapath+00:01:08:17:f4:b5:2a:00"
     266        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">
     267      </openflow:datapath>
     268    </openflow:group>
     269
     270    <openflow:match>
     271      <openflow:use-group name="eg-gpo-1750" />
     272      <openflow:packet>
     273      <openflow:dl_vlan value="1750"/>
     274      <openflow:dl_type value="0x800,0x806"/>
     275      <openflow:nw_dst value="10.42.11.0/24"/>
     276      <openflow:nw_src value="10.42.11.0/24"/>
     277      </openflow:packet>
     278    </openflow:match>
     279  </openflow:sliver>
     280}}}
     281
     282
     283=== InstaGENI ===
     284
     285Sample InstaGENI Compute Resources RSpec on the !OpenFlow Shared VLAN 1750:
     286{{{
     287  <node client_id="gpo-ig">
     288    <sliver_type name="emulab-openvz" />
     289    <interface client_id="gpo-ig:if0">
     290      <ip address="10.42.11.65" netmask="255.255.255.0" type="ipv4" />
     291    </interface>
     292  </node>
     293
     294  <link client_id="openflow-mesoscale-0">
     295    <interface_ref client_id="gpo-ig:if0" />
     296    <sharedvlan:link_shared_vlan name="mesoscale-openflow" />
     297  </link>
     298}}}
     299
     300Sample InstaGENI FOAM RSpec on the !OpenFlow Shared VLAN 1750:
     301{{{
     302 <openflow:sliver description="OpenFlow Experiment Example" email="lnevers@bbn.com">
     303 <openflow:controller url="tcp:mallorea.gpolab.bbn.com:33020" type="primary" />
     304    <openflow:group name="ig-gpo-1750">
     305      <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.instageni.gpolab.bbn.com+datapath+06:d6:84:34:97:c6:c9:00"
     306        component_manager_id="urn:publicid:IDN+openflow:foam:foam.instageni.gpolab.bbn.com+authority+am" dpid="06:d6:84:34:97:c6:c9:00">
     307      </openflow:datapath>
     308    </openflow:group>
     309
     310    <openflow:match>
     311      <openflow:use-group name="ig-gpo-1750" />
     312      <openflow:packet>
     313      <openflow:dl_type value="0x800,0x806"/>
     314      <openflow:nw_dst value="10.42.11.0/24"/>
     315      <openflow:nw_src value="10.42.11.0/24"/>
     316      </openflow:packet>
     317    </openflow:match>
     318  </openflow:sliver>
     319}}}
     320
     321== Image Support ==
     322
     323=== ExoGENI ===
     324
     325=== InstaGENI ===
     326
     327= RSpec Services Schema =
     328
     329== Install services ==
     330
     331=== ExoGENI ===
     332The following RSpec can be used on ExoGENI to install a "tar.gz" or a ".tgz" file, unpack it and run the command specified:
     333{{{
     334  <node client_id="VM-1" >
     335    <sliver_type name="m1.small"/>
     336    <services>
     337      <install install_path="/tmp" url="http://www.gpolab.bbn.com/~lnevers/mypkg.tar.gz"/>
     338      <execute command="/tmp/myscript.sh" shell="sh"/>
     339    </services>
     340  </node>
     341}}}
     342
     343
     344=== InstaGENI ===
     345
     346The following RSpec can be used on InstaGENI to install a "tgz" or "tar.gz" file, unpack it and run the command specified:
     347{{{
     348  <node client_id="VM-1" >
     349    <sliver_type name="emulab-openvz"/>
     350    <services>
     351      <install install_path="/tmp" url="http://www.gpolab.bbn.com/~lnevers/mypkg.tar.gz"/>
     352      <execute command="sudo /tmp/myscript.sh" shell="sh"/>
     353    </services>
     354  </node>
     355}}}
     356
     357== Execute services ==
     358
     359=== ExoGENI ===
     360The following RSpec requests the execution of one command:
     361{{{
     362<node client_id="geni1">
     363 <sliver_type name="m1.small">
     364 </sliver_type>
     365 <services>
     366   <execute shell="sh" command="hostname hostA"/>
     367 </services>
     368</node>
     369</rspec>
     370}}}
     371
     372ExoGENI also supports a [https://geni-orca.renci.org/trac/wiki/velocity-templates 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.
     373
     374{{{
     375<rspec xmlns="http://www.geni.net/resources/rspec/3"
     376      xmlns:pbs="http://www.geni.net/resources/rspec/ext/postBootScript/1"
     377      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     378      xsi:schemaLocation="http://www.geni.net/resources/rspec/3
     379      http://www.geni.net/resources/rspec/3/request.xsd
     380      http://www.geni.net/resources/rspec/ext/postBootScript/1
     381      http://www.geni.net/resources/rspec/ext/postBootScript/1/request.xsd"
     382      type="request">
     383<node client_id="geni1" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm">
     384 <sliver_type name="m1.small">
     385   <disk_image name="http://geni-images.renci.org/images/standard/debian/deb6-neuca-v1.0.6.xml" version="64ad567ce3b1c0dbaa15bad673bbf556a9
     386593e1c" />
     387 </sliver_type>
     388   <services>
     389     <pbs:services_post_boot_script type="velocity">
     390#!/bin/sh
     391set -x
     392IP=$self.IP(&quot;center&quot;)
     393MAC=$self.MAC(&quot;geni1:0&quot;)
     394NAME=$self.Name()
     395VM=$self
     396VMNAME=$geni1
     397SLICE=$sliceName
     398USER=$userDN
     399SLICE=$sliceID
     400     </pbs:services_post_boot_script>
     401   </services>
     402 <interface client_id="geni1:0">
     403   <ip address="172.16.1.1" netmask="255.255.255.0" />
     404 </interface>
     405
     406</node>
     407<node client_id="geni2" component_manager_id="urn:publicid:IDN+bbnvmsite+authority+cm">
     408 <sliver_type name="m1.large">
     409   <disk_image name="http://geni-images.renci.org/images/standard/debian/deb6-neuca-v1.0.6.xml" version="64ad567ce3b1c0dbaa15bad673bbf556a9
     410593e1c" />
     411 </sliver_type>
     412 <interface client_id="geni2:0" >
     413   <ip address="172.16.1.2" netmask="255.255.255.0" />
     414 </interface>
     415</node>
     416<link client_id="center">
     417  <interface_ref client_id="geni1:0" />
     418  <interface_ref client_id="geni2:0" />
     419</link>
     420</rspec>
     421}}}
     422
     423'''Note 12:''' There additional variables that are supported for post boot via flukes which are not supported via the GENI AM API.
     424
     425'''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.
     426
     427The above script results in the following:
     428{{{
     429root@debian:~# neuca-user-script
     430
     431#!/bin/sh
     432set -x
     433IP=172.16.1.1
     434MAC=$self.MAC("geni1:0")
     435NAME=geni1
     436VM=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
     437VMNAME=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
     438SLICE=urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+velo2
     439USER=[urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers, lnevers@pgeni.gpolab.bbn.com]
     440SLICE=$sliceID
     441root@debian:~#
     442}}}
     443
     444'''Note 15:''' Node groups are not supported via the GENI AM API, only via flukes.
     445
     446
     447=== InstaGENI ===
     448
     449The following RSpec requests the execution of one command, there is only one difference from ExoGENI, the "sliver_type":
     450{{{
     451<node client_id="geni1">
     452 <sliver_type name="emulab-openvz">
     453 </sliver_type>
     454 <services>
     455   <execute shell="sh" command="hostname hostA"/>
     456 </services>
     457</node>
     458</rspec>
     459}}}
     460
     461
     462
     463
     464
     465
     466= GIMI RSpecs =
     467
     468== GIMI RSpecs in ExoGENI ==
     469
     470== GIMI RSpecs in InstaGENI ==
     471
     472= GEMINI RSpecs =
     473
     474== GEMINI RSpec in InstaGENI ==
     475
     476== GEMINI RSpecs on ExoGENI ==