Changes between Initial Version and Version 1 of GENIFIRE/Labwiki/Part1/Execute


Ignore:
Timestamp:
07/07/14 03:11:42 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIFIRE/Labwiki/Part1/Execute

    v1 v1  
     1== 2. Instrument your Application using !LabWiki ==
     2
     3In this part you will learn how you can use !LabWiki to execute an experiment on the slice you
     4reserved in the [http://groups.geni.net/geni/wiki/GENIFIRE/Labwiki/Part1/DesignSetup previous step].
     5
     6=== 2.1 Design and Execute measurement in !LabWiki ===
     7
     8
     9=== 2.1.1. The "Plan" Window ===
     10To get started point your browser to [http://labwiki.test.atlantis.ugent.be:4000/labwiki]. Labwiki has three major windows. We will focus on the leftmost window first. This is the "Planning" window in which you document your experiment. (This is somewhat the equivalent of an electronic lab journal.) Documents are written in [http://daringfireball.net/projects/markdown/ Markdown].
     11
     12At the top of that window is a text field which you can use to search for existing MD scripts. Type "learningswitch" in the field and then select "learningswitch.md" from the list of files that are offered. This document has some information on the experiment that will be performed in the tutorial.
     13
     14
     15=== 2.1.2 The "Prepare" Window ===
     16
     17In the Search bar in the prepare window, find the script firegenipart1.oedl and click on it to load it.
     18'''Note''': Create a new script by clicking on the wheel and prepend your username to the name of the script. Copy and paste the contents of firegenipart1.oedl to create a copy of your own. [[BR]]
     19'''Please do not modify the original script.'''
     20
     21The script is also shown here for your reference:
     22{{{
     23
     24defProperty('source1', "nodea-exttest7", "ID of a resource")
     25defProperty('source2', "switch1-exttest7", "ID of a resource")
     26defProperty('source3', "switch2-exttest7", "ID of a resource")
     27
     28
     29defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
     30defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     31
     32defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
     33defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
     34defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
     35
     36
     37defApplication('ping') do |app|
     38  app.description = 'Simple Definition for the ping-oml2 application'
     39  # Define the path to the binary executable for this application
     40  app.binary_path = '/usr/local/bin/ping-oml2'
     41  # Define the configurable parameters for this application
     42  # For example if target is set to foo.com and count is set to 2, then the
     43  # application will be started with the command line:
     44  # /usr/bin/ping-oml2 -a foo.com -c 2
     45  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     46  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     47  # Define the OML2 measurement point that this application provides.
     48  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     49  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     50  app.defMeasurement('ping') do |m|
     51    m.defMetric('dest_addr',:string)
     52    m.defMetric('ttl',:uint32)
     53    m.defMetric('rtt',:double)
     54    m.defMetric('rtt_unit',:string)
     55  end
     56end
     57
     58defApplication('trema') do |app|
     59  app.description = 'This app runs trema from command line'
     60  app.binary_path = '/bin/sh /root/ovs-setup2.sh'
     61end
     62defGroup('Source2', property.source2, property.source3) do |node|
     63  node.addApplication("trema")
     64end
     65defGroup('Source1', property.source1) do |node|
     66  node.addApplication("ping") do |app|
     67    app.setProperty('target', property.sinkaddr12)
     68    app.setProperty('count', 30)
     69    #app.setProperty('interval', 1)
     70    app.measure('ping', :samples => 1)
     71  end
     72  node.addApplication("ping") do |app|
     73    app.setProperty('target', property.sinkaddr13)
     74    app.setProperty('count', 30)
     75    #app.setProperty('interval', 1)
     76    app.measure('ping', :samples => 1)
     77  end
     78   node.addApplication("ping") do |app|
     79    app.setProperty('target', property.sinkaddr21)
     80    app.setProperty('count', 30)
     81    #app.setProperty('interval', 1)
     82    app.measure('ping', :samples => 1)
     83  end
     84   node.addApplication("ping") do |app|
     85    app.setProperty('target', property.sinkaddr23)
     86    app.setProperty('count', 30)
     87    #app.setProperty('interval', 1)
     88    app.measure('ping', :samples => 1)
     89  end
     90  node.addApplication("ping") do |app|
     91    app.setProperty('target', property.sinkaddr24)
     92    app.setProperty('count', 30)
     93    #app.setProperty('interval', 1)
     94    app.measure('ping', :samples => 1)
     95  end
     96end
     97
     98
     99onEvent(:ALL_UP_AND_INSTALLED) do |event|
     100  info "Starting the ping"
     101  after 2 do
     102    group('Source2').startApplications
     103  end
     104  after 20 do
     105    group('Source1').startApplications
     106  end
     107  after 80 do
     108    info "Stopping the ping"
     109    allGroups.stopApplications
     110    Experiment.done
     111  end
     112end
     113
     114defGraph 'RTT' do |g|
     115  g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     116  g.caption "RTT of received packets."
     117  g.type 'line_chart3'
     118  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     119  g.xaxis :legend => 'oml_seq'
     120  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     121end
     122
     123}}}
     124
     125=== 2.1.3 Start your application from !LabWiki ===
     126
     127To 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.
     128Explanation of the fields in the Execute window:
     129
     130* name: In this field you specify the name of your experiment.
     131
     132* slice: Type the name of the slice you would like to run your experiment on
     133
     134*Change source1, source2 and source3 fields to include your slice name similar to nodea-<slicename>
     135
     136Then, start the actual experiment by clicking on the "Start Experiment" button.
     137[[BR]]
     138
     139[[Image(LW-execute-extended.png, 90%)]]
     140
     141
     142=== 3.1.4 During experiment execution ===
     143
     144After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     145The figure below gives an example for the Execute window during experiment execution.
     146
     147[[Image(LW-extended-lw.png, 90%)]]
     148
     149Now 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.
     150
     151Depending on the status of your resources and experiments, you will see one of the following statuses at the top of the Execute window:
     152 * 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
     153 * Running - This status appears when your experiment starts running. If it fails for one or more reasons, a Failed status will appear instead
     154 * Aborted - When you click on "Stop Experiment" at the top-left corner of the Execute window, the status changes to aborted
     155 * Finished - When your experiment is done, you will see this status
     156
     157
     158= [wiki:GEC20Agenda/LabWiki/ModuleC/DesignSetup Design] =
     159= [wiki:GEC20Agenda/LabWiki/ModuleC/Finish Next: Finish] =