== 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]]
{{{
defProperty('source1', "nodeA", "ID of a resource")
defProperty('source2', "nodeB", "ID of a resource")
#defProperty('sink2', "nodeB", "ID of a sink")
#defProperty('sink3', "nodeC", "ID of a sink")
#defProperty('sink4', "nodeD", "ID of a sink")
#defProperty('sink5', "nodeE", "ID of a sink")
defProperty('sinkaddr11', '10.10.1.1', "Ping destination address")
defProperty('sinkaddr12', '10.10.1.2', "Ping destination address")
defApplication('ping_app', 'pingmonitor') do |a|
a.path = "/root/pingWrap.rb"
a.version(1, 2, 0)
a.shortDescription = "Wrapper around ping"
a.description = "ping application"
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.defMeasurement('myping') do |m|
#a.defMeasurement('myping', '') do |m|
m.defMetric('dest_addr',:string)
m.defMetric('ttl',:int)
m.defMetric('rtt',:float)
m.defMetric('rtt_unit',:string)
end
end
defGroup('Source1', property.source1) do |node|
node.addApplication("ping_app") do |app|
app.setProperty('dest_addr', property.sinkaddr12)
app.setProperty('count', 30)
app.setProperty('interval', 1)
app.measure('myping', :samples => 1)
end
end
defGroup('Source2', property.source2) do |node|
node.addApplication("ping_app") do |app|
app.setProperty('dest_addr', property.sinkaddr11)
app.setProperty('count', 30)
app.setProperty('interval', 1)
app.measure('myping', :samples => 1)
end
end
#defGroup('Sink1', property.sink1) do |node|
#end
#defGroup('Sink2', property.sink2) do |node|
#end
#defGroup('Sink3', property.sink3) do |node|
#end
#defGroup('Sink4', property.sink4) do |node|
#end
#defGroup('Sink5', property.sink5) do |node|
#end
onEvent(:ALL_UP_AND_INSTALLED) do |event|
info "Starting the ping"
allGroups.startApplications
wait 30
info "Stopping the ping"
allGroups.stopApplications
Experiment.done
end
defGraph 'RTT' do |g|
g.ms('myping').select(:oml_seq, :dest_addr, :rtt)#.where(:dest_addr => "192.168.5.12")
g.caption "RTT of received packets."
g.type 'line_chart3'
g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
# g.group_by(:dest_addr)
g.xaxis :legend => 'oml_seq'
g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
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.
{{{
omf-5.4 exec --no-am -e dbhatinstageni-ping_all -S dbhatinstageni step1-ping_all.rb
INFO NodeHandler: OMF Experiment Controller 5.4 (git c005675)
INFO NodeHandler: Slice ID: dbhatinstageni
INFO NodeHandler: Experiment ID: dbhatinstageni-ping_all
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 step1-ping_all.rb
INFO property.source1: source1 = "nodeA" (String)
INFO property.source2: source2 = "nodeB" (String)
INFO property.sinkaddr11: sinkaddr11 = "10.10.1.1" (String)
INFO property.sinkaddr12: sinkaddr12 = "10.10.1.2" (String)
INFO Topology: Loading topology 'nodeA'.
INFO Topology: Loading topology 'nodeB'.
INFO GraphDescription: REPORT:START: RTT
INFO GraphDescription: REPORT:TYPE: line_chart3
INFO GraphDescription: REPORT:MS:default: SELECT%20%22oml_seq%22,%20%22dest_addr%22,%20%22rtt%22%20FROM%20%22pingWrap_myping%22
INFO GraphDescription: REPORT:MAPPING: %7B%22y_axis%22:%22rtt%22,%22group_by%22:%22dest_addr%22,%22x_axis%22:%22oml_seq%22%7D
INFO GraphDescription: REPORT:AXIS: %7B%22y%22:%7B%22legend%22:%22rtt%22,%22ticks%22:%7B%22format%22:%22s%22%7D%7D,%22x%22:%7B%22legend%22:%22oml_seq%22%7D%7D
INFO GraphDescription: REPORT:CAPTION: RTT%20of%20received%20packets.
INFO GraphDescription: REPORT:STOP
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 30s....
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 dbhatinstageni-ping_all finished after 0:46
}}}