== 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.[[BR]] You can use the GEC16-Tutorial VM to run the experiment as it has the OMF commands pre-installed on them.[[BR]] '''1. Create a 2 node topology using the Rspec below.[[BR]]''' '''Note:''' This rspec is for 2 nodes on the bbninstageni Aggregate manager[[BR]] For other managers, you can use url=https://boss.instageni.gpolab.bbn.com/image_metadata.php?uuid=2a721653-a868-11e2-921f-029e26f15299 [[BR]] For the same manager, you can use id=urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net:GIMIomf (given below)[[BR]] {{{ }}} '''2. Edit Experiment Script. [[BR]]''' Login to each node separately using the SSH button in Flack and change hostname using the following command: [[BR]] nodeA[[BR]] {{{ sudo hostname nodeA }}} node B[[BR]] {{{ sudo hostname nodeB }}} '''3. Edit Experiment Script. [[BR]]''' 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.[[BR]] {{{ # # 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 }}} '''4. Run the experiment using the following command''' Execute the following command in your tutorial VM. {{{ omf-5.4 exec --no-am -e -S 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[[BR]] 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 }}}