wiki:IMInteroperability/GIMIInstaGENITestCase

Version 16 (modified by divyashri.bhat@gmail.com, 6 years ago) (diff)

--

Run an Labwiki 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 5 node topology.

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 for a five node topology

<rspec type="request" generated_by="Flack" generated="2013-05-20T01:24:12Z" 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="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="pcvm1-3"/>
    <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="192.168.4.10" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="VM:if1">
      <ip address="192.168.1.10" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="nodeB:if0">
      <ip address="192.168.2.10" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <flack:node_info x="327" y="67" unbound="true"/>
  </node>
  <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="pcvm1-1"/>
    <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="192.168.4.11" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="VM-0:if1">
      <ip address="192.168.5.11" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <flack:node_info x="140" y="164" unbound="true"/>
  </node>
  <node client_id="nodeD" 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="pcvm1-8"/>
    <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-1:if0">
      <ip address="192.168.1.13" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="VM-1:if1">
      <ip address="192.168.3.13" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <flack:node_info x="564" y="168" unbound="true"/>
  </node>
  <node client_id="nodeC" 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="pcvm1-6"/>
    <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-2:if0">
      <ip address="192.168.3.12" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="VM-2:if1">
      <ip address="192.168.5.12" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="VM-2:if2">
      <ip address="192.168.6.12" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <interface client_id="nodeC:if0">
      <ip address="192.168.2.12" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <flack:node_info x="352" y="252" unbound="true"/>
  </node>
  <node client_id="nodeE" 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="pcvm1-9"/>
    <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-3:if0">
      <ip address="192.168.6.14" netmask="" type="ipv4"/>
      <flack:interface_info addressBound="false" bound="false"/>
    </interface>
    <flack:node_info x="364" y="389" unbound="true"/>
  </node>
  <link client_id="link0">
    <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-0:if0"/>
    <interface_ref client_id="VM:if0"/>
    <property source_id="VM-0:if0" dest_id="VM:if0"/>
    <property source_id="VM:if0" dest_id="VM-0:if0"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
  <link client_id="link1">
    <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:if1"/>
    <interface_ref client_id="VM-1:if0"/>
    <property source_id="VM:if1" dest_id="VM-1:if0"/>
    <property source_id="VM-1:if0" dest_id="VM:if1"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
  <link client_id="link2">
    <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-1:if1"/>
    <interface_ref client_id="VM-2:if0"/>
    <property source_id="VM-1:if1" dest_id="VM-2:if0"/>
    <property source_id="VM-2:if0" dest_id="VM-1:if1"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
  <link client_id="link3">
    <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-0:if1"/>
    <interface_ref client_id="VM-2:if1"/>
    <property source_id="VM-0:if1" dest_id="VM-2:if1"/>
    <property source_id="VM-2:if1" dest_id="VM-0:if1"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
  <link client_id="link4">
    <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-2:if2"/>
    <interface_ref client_id="VM-3:if0"/>
    <property source_id="VM-2:if2" dest_id="VM-3:if0"/>
    <property source_id="VM-3:if0" dest_id="VM-2:if2"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
  <link client_id="link5">
    <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="nodeB:if0"/>
    <interface_ref client_id="nodeC:if0"/>
    <property source_id="nodeB:if0" dest_id="nodeC:if0"/>
    <property source_id="nodeC:if0" dest_id="nodeB:if0"/>
    <flack:link_info x="-1" y="-1" unboundVlantag="true"/>
  </link>
</rspec>

The postboot script is attached here. It is automatically executed when you submit your request Rspec. There is no need for any modifictaions.

!/bin/bash

cd /local
read -r slice</var/emulab/boot/nickname
slicename=$(echo $slice | cut -f2 -d.)

host=$(hostname)

host1=$(echo $host | cut -f1 -d.)

hostname $host1
curl http://emmy9.casa.umass.edu/pingWrap.rb -o /root/pingWrap.rb
chmod +x /root/pingWrap.rb

curl http://emmy9.casa.umass.edu/omf-resctl.yaml -o /etc/omf-resctl-5.4/omf-resctl.yaml
perl -i.bak -pe "s/\:slice\:/\:slice\: $slicename/g" /etc/omf-resctl-5.4/omf-resctl.yaml
/etc/init.d/omf-resctl-5.4 restart

2. Edit Experiment Script.

A ping all node script is shown below. In the experiment script you would need to change the host names to the names of your nodes.

defProperty('source1', "nodeA", "ID of a resource")
defProperty('source2', "nodeB", "ID of a resource")
defProperty('source3', "nodeC", "ID of a resource")
defProperty('source4', "nodeD", "ID of a resource")
defProperty('source5', "nodeE", "ID of a resource")
defProperty('graph', true, "Display graph or not")

#defProperty('sink1', "nodeA", "ID of a sink")
#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', '192.168.16.10', "Ping destination address")
defProperty('sinkaddr12', '192.168.5.12', "Ping destination address")

defProperty('sinkaddr21', '192.168.4.11', "Ping destination address")
defProperty('sinkaddr22', '192.168.2.12', "Ping destination address")
defProperty('sinkaddr23', '192.168.1.13', "Ping destination address")

defProperty('sinkaddr31', '192.168.5.11', "Ping destination address")
defProperty('sinkaddr32', '192.168.2.10', "Ping destination address")
defProperty('sinkaddr33', '192.168.3.13', "Ping destination address")
defProperty('sinkaddr34', '192.168.6.14', "Ping destination address")

defProperty('sinkaddr41', '192.168.1.10', "Ping destination address")
defProperty('sinkaddr42', '192.168.3.12', "Ping destination address")

defProperty('sinkaddr51', '192.168.6.12', "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', '', :stream_name => 'pingmonitor_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.sinkaddr11)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  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.sinkaddr21)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr22)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr23)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end
end

defGroup('Source3', property.source3) do |node|
  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr31)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr32)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr33)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr34)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end
end

defGroup('Source4', property.source4) do |node|
  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr41)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end

  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr42)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end
end

defGroup('Source5', property.source5) do |node|
  node.addApplication("ping_app") do |app|
    app.setProperty('dest_addr', property.sinkaddr51)
    app.setProperty('count', 30)
    app.setProperty('interval', 1)
    app.measure('myping', :samples => 1)
  end
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


3. Run the experiment using the following command

Execute the following command in your tutorial VM. Please install the latest version of Labwiki and OMF-Web before you proceed.

ruby1.9.3 -I lib -I $HOME/omf_web/lib/ lib/labwiki.rb --lw-config etc/labwiki/exogeni_with_irods.yaml start

$HOME= path where omf_web is installed.

For example ruby1.9.3 -I lib -I /home/dbhat/omf_web/lib/ lib/labwiki.rb --lw-config etc/labwiki/exogeni_with_irods.yaml start

In your browser, open Labwiki.

Type in your slice name exactly as it is in the GENI Portal. Type in any experiment name you like.
Set graph to "true".

Click on "Start Experiment"

Shown below is a screen shot of the ping-all experiment.

Attachments (5)

Download all attachments as: .zip