Changes between Version 1 and Version 2 of IMInteroperability/GIMIInstaGENITestCase


Ignore:
Timestamp:
05/06/13 11:08:02 (6 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IMInteroperability/GIMIInstaGENITestCase

    v1 v2  
    11
    2 TBD
     2== Run an OMF Experiment on an InstaGENI Test Bed ==
     3
     4This page provides steps to run an OMF-experiment on an InstaGENI testbed with two nodes.[[BR]]
     5
     6'''1. Create a 2 node topology using the Rspec below.[[BR]]'''
     7
     8'''Note:''' This rspec is for 2 nodes on the bbninstageni Aggregate manager[[BR]]
     9
     10For other managers, you can use url=https://boss.instageni.gpolab.bbn.com/image_metadata.php?uuid=2a721653-a868-11e2-921f-029e26f15299 [[BR]]
     11For the same manager, you can use id=urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net:GIMIomf (given below)[[BR]]
     12
     13{{{
     14<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">
     15  <sliver_type name="emulab-openvz">
     16    <disk_image name="urn:publicid:IDN+instageni.gpolab.bbn.com+image+emulab-net//GIMIomf"/>
     17  </sliver_type>
     18  <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">
     19    <flack:interface_info addressBound="false" bound="false"/>
     20    <ip address="10.10.1.2" type="ipv4"/>
     21  </interface>
     22  <flack:node_info x="659" y="222" unbound="true"/>
     23  <rs:vnode name="pcvm2-6" xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1"/>
     24  <host name="VM-0.dbhatomf.emulab-net.instageni.gpolab.bbn.com"/>
     25  <services>
     26    <login authentication="ssh-keys" hostname="pc2.instageni.gpolab.bbn.com" port="32315" username="dbhat"/>
     27  </services>
     28</node>
     29}}}
     30
     31
     32'''2. Manually install postboot script on each of the 2 nodes.[[BR]]'''
     33
     34
     35{{{
     36#!/bin/bash
     37
     38# Experiment slice name used by OMF. Should be unique for each experiment
     39sn=gimi30
     40
     41# For InstaGENI slivers assign hostname by typing hostname <yourhostname>
     42#This needs to be repeated for the other node with a different hostname
     43sudo hostname nodeA
     44
     45#Adds the slice name to the resource controller configuration file
     46sudo curl http://emmy9.casa.umass.edu/omf-resctl.yaml -o /etc/omf-resctl-5.4/omf-resctl.yaml
     47sudo perl -i.bak -pe "s/\:slice\:/\:slice\: $sn/g" /etc/omf-resctl-5.4/omf-resctl.yaml
     48
     49# The above updates require a restart of the OMF resource controller.
     50sudo /etc/init.d/omf-resctl-5.4 restart
     51}}}
     52
     53
     54'''3. Edit Experiment Script. [[BR]]'''
     55
     56{{{
     57#
     58# Copyright (c) 2012 National ICT Australia (NICTA), Australia
     59#
     60# Permission is hereby granted, free of charge, to any person obtaining a copy
     61# of this software and associated documentation files (the "Software"), to deal
     62# in the Software without restriction, including without limitation the rights
     63# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     64# copies of the Software, and to permit persons to whom the Software is
     65# furnished to do so, subject to the following conditions:
     66#
     67# The above copyright notice and this permission notice shall be included in
     68# all copies or substantial portions of the Software.
     69#
     70# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     71# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     72# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     73# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     74# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     75# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     76# THE SOFTWARE.
     77#
     78defApplication('oml:app:ping', 'ping') do |a|
     79  a.version(2, 9, 0)
     80  a.shortDescription = "Wrapper around ping"
     81  a.description = "This application runs the system ping, parses its output and reports the measurements via OML"
     82  a.path = "/root/ping-oml2"
     83
     84  a.defProperty('dest_addr', 'Address to ping', 'a', {:type => :string, :dynamic => false})
     85  a.defProperty('count', 'Number of times to ping', 'c', {:type => :integer, :dynamic => false})
     86  a.defProperty('interval', 'Interval between pings in s', 'i', {:type => :integer, :dynamic => false})
     87  a.defProperty('quiet', 'Don\'t show ping output on the console', 'q', {:type => :boolean, :dynamic => false})
     88  a.defProperty('inet6', 'Use ping6 rather than ping', '6', {:type => :boolean, :dynamic => false})
     89
     90  a.defMeasurement('ping') do |m|
     91    m.defMetric('dest_addr',:string)
     92    m.defMetric('ttl',:int)
     93    m.defMetric('rtt',:float)
     94    m.defMetric('rtt_unit',:string)
     95  end
     96
     97  a.defMeasurement('summary') do |m|
     98    m.defMetric('ntransmitted',:int)
     99    m.defMetric('nreceived',:int)
     100    m.defMetric('lossratio',:float)
     101    m.defMetric('runtime',:float)
     102    m.defMetric('runtime_unit',:string)
     103  end
     104
     105  a.defMeasurement('rtt_stats') do |m|
     106    m.defMetric('min',:float)
     107    m.defMetric('avg',:float)
     108    m.defMetric('max',:float)
     109    m.defMetric('mdev',:float)
     110    m.defMetric('rtt_unit',:string)
     111  end
     112end
     113
     114 #Example use with OMF:
     115 #dbhatabc is the hostname of my source node
     116 #dbhatxyz is the hostname of my sink node
     117defProperty('source', "dbhatabc", "ID of a resource")
     118defProperty('sink', "dbhatxyz", "ID of a resource")
     119defProperty('sinkaddr', "10.10.1.2", "Ping destination address")
     120defGroup('Source', property.source) do |node|
     121  node.addApplication("oml:app:ping") do |app|
     122    app.setProperty('dest_addr', property.sinkaddr)
     123    app.setProperty('count', 5)
     124    app.setProperty('interval', 1)
     125    app.measure('ping', :samples => 1)
     126  end
     127end
     128
     129defGroup('Sink', property.sink) do |node|
     130end
     131
     132onEvent(:ALL_UP_AND_INSTALLED) do |event|
     133  info "Starting the ping"
     134  group('Source').startApplications
     135    wait 6
     136 info "Stopping the ping"
     137  group('Source').stopApplications
     138  Experiment.done
     139end
     140
     141}}}
     142
     143GIMI_Simple_Experiment.rb is shown above. In the experiment script you would need to change the host names to the names of your nodes.[[BR]]
     144
     145'''4. Run the experiment using the following command'''
     146
     147
     148{{{
     149omf-5.4 exec --no-am -e <exp_name> -S <slice_name> GIMI_Simple_Experiment.rb
     150}}}
     151
     152The 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]]
     153The slice_name has to be the slice_name on which you wish to run the experiment.
     154
     155Attached here is Experiment_run_log.txt contains my log after a successful run of the experiment script.
     156
     157{{{
     158INFO NodeHandler: OMF Experiment Controller 5.4 (git c005675)
     159 INFO NodeHandler: Slice ID: dbhatomf
     160 INFO NodeHandler: Experiment ID: dbhatomf-ping
     161 INFO NodeHandler: Message authentication is disabled
     162 WARN NodeHandler: AM support disabled - any service calls will fail!
     163 INFO Experiment: load system:exp:stdlib
     164 INFO property.resetDelay: resetDelay = 210 (Fixnum)
     165 INFO property.resetTries: resetTries = 1 (Fixnum)
     166 INFO Experiment: load system:exp:eventlib
     167 INFO Experiment: load ping.rb
     168 INFO property.source: source = "dbhatabc" (String)
     169 INFO property.sink: sink = "dbhatxyz" (String)
     170 INFO property.sinkaddr: sinkaddr = "10.10.1.2" (String)
     171 INFO Topology: Loading topology 'dbhatabc'.
     172 INFO Topology: Loading topology 'dbhatxyz'.
     173 INFO Experiment: Switching ON resources which are OFF
     174 INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks.
     175 INFO exp: Starting the ping
     176 INFO exp: Request from Experiment Script: Wait for 6s....
     177 INFO exp: Stopping the ping
     178 INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     179 INFO NodeHandler:
     180 INFO NodeHandler: Shutting down experiment, please wait...
     181 INFO NodeHandler:
     182 INFO run: Experiment dbhatomf-ping finished after 0:16
     183
     184}}}