wiki:IMInteroperability/GIMIInstaGENITestCase

Version 2 (modified by divyashri.bhat@gmail.com, 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.

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)

<node client_id="VM-0" component_manager_id="urn:publicid:IDN+instageni.gpolab.bbn.com+authority+cm" exclusive="false" component_id="urn:publicid:IDN+instageni.gpolab.bbn.com+node+pc2" sliver_id="urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+3900" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns="http://www.geni.net/resources/rspec/3" xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sliver_type name="emulab-openvz">
    <disk_image name="urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net//GIMIomf"/>
  </sliver_type>
  <interface client_id="VM-0:if0" component_id="urn:publicid:IDN+instageni.gpolab.bbn.com+interface+pc2:lo0" sliver_id="urn:publicid:IDN+instageni.gpolab.bbn.com+sliver+3904" mac_address="02ebf8c7eb5c">
    <flack:interface_info addressBound="false" bound="false"/>
    <ip address="10.10.1.2" type="ipv4"/>
  </interface>
  <flack:node_info x="659" y="222" unbound="true"/>
  <rs:vnode name="pcvm2-6" xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1"/>
  <host name="VM-0.dbhatomf.emulab-net.instageni.gpolab.bbn.com"/>
  <services>
    <login authentication="ssh-keys" hostname="pc2.instageni.gpolab.bbn.com" port="32315" username="dbhat"/>
  </services>
</node>

2. Manually install postboot script on each of the 2 nodes.

#!/bin/bash

# Experiment slice name used by OMF. Should be unique for each experiment
sn=gimi30

# For InstaGENI slivers assign hostname by typing hostname <yourhostname>
#This needs to be repeated for the other node with a different hostname
sudo hostname nodeA

#Adds the slice name to the resource controller configuration file
sudo curl http://emmy9.casa.umass.edu/omf-resctl.yaml -o /etc/omf-resctl-5.4/omf-resctl.yaml
sudo perl -i.bak -pe "s/\:slice\:/\:slice\: $sn/g" /etc/omf-resctl-5.4/omf-resctl.yaml

# The above updates require a restart of the OMF resource controller.
sudo /etc/init.d/omf-resctl-5.4 restart

3. Edit Experiment Script.

#
# 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', "dbhatabc", "ID of a resource")
defProperty('sink', "dbhatxyz", "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

GIMI_Simple_Experiment.rb is shown above. In the experiment script you would need to change the host names to the names of your nodes.

4. Run the experiment using the following command

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.

Attached here is Experiment_run_log.txt contains 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 'dbhatabc'.
 INFO Topology: Loading topology 'dbhatxyz'.
 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)

Download all attachments as: .zip