Changes between Initial Version and Version 1 of GEC22Agenda/LabWiki/ModuleC/Execute


Ignore:
Timestamp:
03/09/15 11:41:14 (9 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC22Agenda/LabWiki/ModuleC/Execute

    v1 v1  
     1= Module C Execute Experiment (on extended topology) =
     2
     3== 3. Instrument your Application using !LabWiki ==
     4
     5In this part of Module C we will learn how to extend an OEDL script to execute
     6an experiment on the extended topology you reserved in the [wiki:GEC21Agenda/LabWiki/ModuleC/DesignSetup previous step].
     7
     8=== 3.1 Design and Execute measurement in !LabWiki ===
     9
     10
     11=== 3.1.1. The "Plan" Window ===
     12Now you can use the original MD script and modify it with new information on the extended topology and the
     13experiment you are executing on the extended topology.
     14
     15
     16Look [wiki:GEC21Agenda/LabWiki/ModuleA/Execute here] if you have to refresh your memory on how to use the prepare window.
     17
     18TIP: To add images to your markdown script, please add a line similar to below into your .md file at the place where you want the image to appear:
     19<img src="http://emmy9.casa.umass.edu/GEC-20/threenoderoute.png">.
     20The image has to be hosted on a webserver.
     21
     22=== 3.1.2 The "Prepare" Window ===
     23
     24In the Search bar in the prepare window, find the script GEC20learningswitchextend.oedl and click on it to load it. The script is also shown here for your reference:
     25{{{
     26#!ruby
     27defProperty('source1', "nodea-dbhatpostboot", "ID of a resource")
     28defProperty('source2', "switch1-dbhatpostboot", "ID of a resource")
     29defProperty('source3', "switch2-dbhatpostboot", "ID of a resource")
     30
     31
     32defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
     33defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     34
     35defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
     36defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
     37defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
     38
     39
     40defApplication('ping') do |app|
     41  app.description = 'Simple Definition for the ping-oml2 application'
     42  # Define the path to the binary executable for this application
     43  app.binary_path = '/usr/local/bin/ping-oml2'
     44  # Define the configurable parameters for this application
     45  # For example if target is set to foo.com and count is set to 2, then the
     46  # application will be started with the command line:
     47  # /usr/bin/ping-oml2 -a foo.com -c 2
     48  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     49  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     50  # Define the OML2 measurement point that this application provides.
     51  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     52  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     53  app.defMeasurement('ping') do |m|
     54    m.defMetric('dest_addr',:string)
     55    m.defMetric('ttl',:uint32)
     56    m.defMetric('rtt',:double)
     57    m.defMetric('rtt_unit',:string)
     58  end
     59end
     60
     61defApplication('trema') do |app|
     62  app.description = 'This app runs trema from command line'
     63  app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
     64end
     65defGroup('Source2', property.source2, property.source3) do |node|
     66  node.addApplication("trema")
     67end
     68defGroup('Source1', property.source1) do |node|
     69  node.addApplication("ping") do |app|
     70    app.setProperty('target', property.sinkaddr12)
     71    app.setProperty('count', 30)
     72    #app.setProperty('interval', 1)
     73    app.measure('ping', :samples => 1)
     74  end
     75  node.addApplication("ping") do |app|
     76    app.setProperty('target', property.sinkaddr13)
     77    app.setProperty('count', 30)
     78    #app.setProperty('interval', 1)
     79    app.measure('ping', :samples => 1)
     80  end
     81   node.addApplication("ping") do |app|
     82    app.setProperty('target', property.sinkaddr21)
     83    app.setProperty('count', 30)
     84    #app.setProperty('interval', 1)
     85    app.measure('ping', :samples => 1)
     86  end
     87   node.addApplication("ping") do |app|
     88    app.setProperty('target', property.sinkaddr23)
     89    app.setProperty('count', 30)
     90    #app.setProperty('interval', 1)
     91    app.measure('ping', :samples => 1)
     92  end
     93  node.addApplication("ping") do |app|
     94    app.setProperty('target', property.sinkaddr24)
     95    app.setProperty('count', 30)
     96    #app.setProperty('interval', 1)
     97    app.measure('ping', :samples => 1)
     98  end
     99end
     100
     101
     102
     103
     104
     105#defGroup('Sink1', property.sink1) do |node|
     106#end
     107
     108#defGroup('Sink2', property.sink2) do |node|
     109#end
     110
     111#defGroup('Sink3', property.sink3) do |node|
     112#end
     113
     114#defGroup('Sink4', property.sink4) do |node|
     115#end
     116
     117#defGroup('Sink5', property.sink5) do |node|
     118#end
     119
     120onEvent(:ALL_UP_AND_INSTALLED) do |event|
     121  info "Starting the ping"
     122  after 2 do
     123    group('Source2').startApplications
     124  end
     125  after 10 do
     126    group('Source1').startApplications
     127  end
     128  after 80 do
     129    info "Stopping the ping"
     130    allGroups.stopApplications
     131    Experiment.done
     132  end
     133end
     134
     135defGraph 'RTT' do |g|
     136  g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     137  g.caption "RTT of received packets."
     138  g.type 'line_chart3'
     139  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     140  g.xaxis :legend => 'oml_seq'
     141  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     142end
     143}}}
     144
     145=== 3.1.3 Start your application from !LabWiki ===
     146
     147To start your experiment, simply drag the icon that is to the left of the file name (see figure below) from the middle (Prepare) to the right (Execute) window.
     148Explanation of the fields in the Execute window:
     149
     150* name: In this field you specify the name of your experiment.
     151
     152* project: This pull-down menu list all the projects you are currently a member of. Select the project that contains the slice you want to run your experiment on.
     153
     154* experiment context: With the context you can specify a certain set of experiments. E.g., a series of experiments you run under a certain set of startup parameters. This field is not mandatory and only necessary if you would like to save your experiment data to view later.
     155
     156* slice: This pull down menu lists all slice that have been created under "project". Select the slice you would like to run your experiment on.
     157
     158*Change source1 and source2 fields to include your slice name similar to nodea-<slicename>
     159
     160Then, start the actual experiment by clicking on the "Start Experiment" button.
     161[[BR]]
     162
     163[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleC/Execute/LW-execute-extended.png, 60%)]]
     164
     165
     166=== 3.1.4 During experiment execution ===
     167
     168After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     169The figure below gives an example for the Execute window during experiment execution.
     170
     171[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleC/Execute/LW-extended-lw.png, 60%)]]
     172
     173Now the window lists experiment properties, one or several live graphs (if they have been specified in the OEDL script), and logging information. The latter would be a good starting point for trouble shooting, should your experiment not run as expected.
     174
     175Depending on the status of your resources and experiments, you will see one of the following statuses at the top of the Execute window:
     176 * Pending - This is the first state of your experiment where the job scheduler adds it to the run queue. This status would remain for the first few seconds before it changes to Running or Failed
     177 * Running - This status appears when your experiment starts running. If it fails for one or more reasons, a Failed status will appear instead
     178 * Aborted - When you click on "Stop Experiment" at the top-left corner of the Execute window, the status changes to aborted
     179 * Finished - When your experiment is done, you will see this status
     180
     181
     182= [wiki:GEC21Agenda/LabWiki/ModuleC/Finish Next: Finish] =
     183= [wiki:GEC21Agenda/LabWiki/ModuleC/DesignSetup Design] =