Version 9 (modified by 12 years ago) (diff) | ,
---|
Run an OMF Experiment on an InstaGENI Test Bed
This page provides steps to run an OMF-experiment on an InstaGENI testbed with two nodes.
You can use the GEC16-Tutorial VM to run the experiment as it has the OMF commands pre-installed on them.
1. Create a 2 node topology using the Rspec below.
Note: This rspec is for 2 nodes on the bbninstageni Aggregate manager
For other managers, you can use url=https://boss.instageni.gpolab.bbn.com/image_metadata.php?uuid=2a721653-a868-11e2-921f-029e26f15299
For the same manager, you can use id=urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net:GIMIomf (given below)
<rspec type="request" generated_by="Flack" generated="2013-05-08T15:51:25Z" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd " xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.geni.net/resources/rspec/3"> <node client_id="nodeA" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" exclusive="false" xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1"> <rs:vnode name="pcvm2-2"/> <sliver_type name="emulab-openvz"> <disk_image name="urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net//GIMIomf"/> </sliver_type> <services> <execute command="sudo sh local/postboot_script.sh" shell="sh"/> <install install_path="/local" url="http://emmy9.casa.umass.edu/InstaGENI_Images/install-script.tar.gz"/> </services> <interface client_id="VM:if0"> <ip address="10.10.1.1" netmask="" type="ipv4"/> <flack:interface_info addressBound="false" bound="false"/> </interface> <flack:node_info x="152" y="74" unbound="true"/> </node> <node client_id="nodeB" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" exclusive="false" xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1"> <rs:vnode name="pcvm2-5"/> <sliver_type name="emulab-openvz"> <disk_image name="urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net//GIMIomf"/> </sliver_type> <services> <execute command="sudo sh /local/postboot_script.sh" shell="sh"/> <install install_path="/local" url="http://emmy9.casa.umass.edu/InstaGENI_Images/install-script.tar.gz"/> </services> <interface client_id="VM-0:if0"> <ip address="10.10.1.2" netmask="" type="ipv4"/> <flack:interface_info addressBound="false" bound="false"/> </interface> <flack:node_info x="450" y="104" unbound="true"/> </node> <link client_id="lan0"> <flack:link_info x="-1" y="-1" unboundVlantag="true" xmlns="http://www.protogeni.net/resources/rspec/ext/flack/1"/> <component_manager name="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm"/> <interface_ref client_id="VM:if0"/> <interface_ref client_id="VM-0:if0"/> <property source_id="VM:if0" dest_id="VM-0:if0"/> <property source_id="VM-0:if0" dest_id="VM:if0"/> <link_type name="lan"/> <flack:link_info x="-1" y="-1" unboundVlantag="true"/> </link> </rspec>
2. Edit Experiment Script.
GIMI Simple Experiment script is shown above. In the experiment script you would need to change the host names to the names of your nodes.
# # Copyright (c) 2012 National ICT Australia (NICTA), Australia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # defApplication('oml:app:ping', 'ping') do |a| a.version(2, 9, 0) a.shortDescription = "Wrapper around ping" a.description = "This application runs the system ping, parses its output and reports the measurements via OML" a.path = "/root/ping-oml2" a.defProperty('dest_addr', 'Address to ping', 'a', {:type => :string, :dynamic => false}) a.defProperty('count', 'Number of times to ping', 'c', {:type => :integer, :dynamic => false}) a.defProperty('interval', 'Interval between pings in s', 'i', {:type => :integer, :dynamic => false}) a.defProperty('quiet', 'Don\'t show ping output on the console', 'q', {:type => :boolean, :dynamic => false}) a.defProperty('inet6', 'Use ping6 rather than ping', '6', {:type => :boolean, :dynamic => false}) a.defMeasurement('ping') do |m| m.defMetric('dest_addr',:string) m.defMetric('ttl',:int) m.defMetric('rtt',:float) m.defMetric('rtt_unit',:string) end a.defMeasurement('summary') do |m| m.defMetric('ntransmitted',:int) m.defMetric('nreceived',:int) m.defMetric('lossratio',:float) m.defMetric('runtime',:float) m.defMetric('runtime_unit',:string) end a.defMeasurement('rtt_stats') do |m| m.defMetric('min',:float) m.defMetric('avg',:float) m.defMetric('max',:float) m.defMetric('mdev',:float) m.defMetric('rtt_unit',:string) end end #Example use with OMF: #dbhatabc is the hostname of my source node #dbhatxyz is the hostname of my sink node defProperty('source', "nodeA", "ID of a resource") defProperty('sink', "nodeB", "ID of a resource") defProperty('sinkaddr', "10.10.1.2", "Ping destination address") defGroup('Source', property.source) do |node| node.addApplication("oml:app:ping") do |app| app.setProperty('dest_addr', property.sinkaddr) app.setProperty('count', 5) app.setProperty('interval', 1) app.measure('ping', :samples => 1) end end defGroup('Sink', property.sink) do |node| end onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Starting the ping" group('Source').startApplications wait 6 info "Stopping the ping" group('Source').stopApplications Experiment.done end
3. Run the experiment using the following command
Execute the following command in your tutorial VM.
omf-5.4 exec --no-am -e <exp_name> -S <slice_name> GIMI_Simple_Experiment.rb
The exp_name can be anything you wish to call your experiment. Preferably you could have your exp_name as slicename+exp_name. e.g. dbhatomf_ping_all
The slice_name has to be the slice_name on which you wish to run the experiment.
Shown below is my log after a successful run of the experiment script.
INFO NodeHandler: OMF Experiment Controller 5.4 (git c005675) INFO NodeHandler: Slice ID: dbhatomf INFO NodeHandler: Experiment ID: dbhatomf-ping INFO NodeHandler: Message authentication is disabled WARN NodeHandler: AM support disabled - any service calls will fail! INFO Experiment: load system:exp:stdlib INFO property.resetDelay: resetDelay = 210 (Fixnum) INFO property.resetTries: resetTries = 1 (Fixnum) INFO Experiment: load system:exp:eventlib INFO Experiment: load ping.rb INFO property.source: source = "dbhatabc" (String) INFO property.sink: sink = "dbhatxyz" (String) INFO property.sinkaddr: sinkaddr = "10.10.1.2" (String) INFO Topology: Loading topology 'nodeA'. INFO Topology: Loading topology 'nodeB'. INFO Experiment: Switching ON resources which are OFF INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks. INFO exp: Starting the ping INFO exp: Request from Experiment Script: Wait for 6s.... INFO exp: Stopping the ping INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks. INFO NodeHandler: INFO NodeHandler: Shutting down experiment, please wait... INFO NodeHandler: INFO run: Experiment dbhatomf-ping finished after 0:16
Attachments (5)
- step1-ping_all.rb (2.4 KB) - added by 12 years ago.
- insta_topo.png (146.6 KB) - added by 12 years ago.
- insta_labwiki1.png (160.9 KB) - added by 12 years ago.
- insta_labwiki2.png (200.1 KB) - added by 12 years ago.
- dbhat5insta.rspec (8.7 KB) - added by 12 years ago.
Download all attachments as: .zip