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


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

--

Legend:

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

    v1 v1  
     1= Module A Execute Experiment =
     2
     3== 3. Instrument your Application using !LabWiki ==
     4
     5In this part of Module A you will learn how you can use !LabWiki to execute an experiment on the slice you
     6reserved in the [wiki:GEC21Agenda/LabWiki/ModuleA/DesignSetup previous step].
     7
     8=== 3.1 Design and Execute measurement in !LabWiki ===
     9
     10
     11=== 3.1.1. The "Plan" Window ===
     12To get started point your browser to [http://labwiki.casa.umass.edu]. 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].
     13
     14At the top of that window is a text field which you can use to search for existing MD scripts. Type "GEC21-learningswitch" in the field and then select "GEC21-learningswitch.md" from the list of files that are offered. This document has some information on the experiment that will be performed in Module A of the tutorial.
     15
     16=== 3.1.2 The "Prepare" Window ===
     17
     18The "Prepare" (middle) window allows you to define your experiment through and [http://mytestbed.net/projects/omf/wiki/OMF_Main_Page OMF] experiment script specified in [http://mytestbed.net/projects/omf6/wiki/OEDLOMF6 OMF Experiment Description Language] (OEDL).
     19
     20At the top of that window is a text field which you can use to search for existing OEDL scripts. Type "GEC21" in the field and then select "GEC21-learningswitch.oedl" from the list of files that are offered. This shows the experiment script in the field below.
     21
     22For reference, we show the experiment script here:
     23{{{
     24#!ruby
     25
     26defProperty('resource1', "nodea", "ID of a resource")
     27defProperty('resource2', "switch", "ID of a resource")
     28
     29
     30defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
     31defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     32
     33defProperty('sinkaddr21', '192.168.1.9', "Ping destination address")
     34
     35
     36defApplication('ping') do |app|
     37  app.description = 'Simple Definition for the ping-oml2 application'
     38  # Define the path to the binary executable for this application
     39  app.binary_path = '/usr/local/bin/ping-oml2'
     40  # Define the configurable parameters for this application
     41  # For example if target is set to foo.com and count is set to 2, then the
     42  # application will be started with the command line:
     43  # /usr/bin/ping-oml2 -a foo.com -c 2
     44  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     45  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     46  # Define the OML2 measurement point that this application provides.
     47  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     48  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     49  app.defMeasurement('ping') do |m|
     50    m.defMetric('remote',:string)
     51    m.defMetric('ttl',:uint32)
     52    m.defMetric('rtt',:double)
     53    m.defMetric('rtt_unit',:string)
     54  end
     55end
     56
     57defApplication('trema') do |app|
     58  app.description = 'This app runs trema from command line'
     59  app.binary_path = '/bin/sh /root/ovs-setup2.sh'
     60end
     61defGroup('Source2', property.resource2) do |node|
     62  node.addApplication("trema")
     63end
     64defGroup('Source1', property.resource1) do |node|
     65  node.addApplication("ping") do |app|
     66    app.setProperty('target', property.sinkaddr12)
     67    app.setProperty('count', 30)
     68    #app.setProperty('interval', 1)
     69    app.measure('ping', :samples => 1)
     70  end
     71  node.addApplication("ping") do |app|
     72    app.setProperty('target', property.sinkaddr13)
     73    app.setProperty('count', 30)
     74    #app.setProperty('interval', 1)
     75    app.measure('ping', :samples => 1)
     76  end
     77   node.addApplication("ping") do |app|
     78    app.setProperty('target', property.sinkaddr21)
     79    app.setProperty('count', 30)
     80    #app.setProperty('interval', 1)
     81    app.measure('ping', :samples => 1)
     82  end
     83end
     84
     85
     86onEvent(:ALL_UP_AND_INSTALLED) do |event|
     87  info "Starting the ping"
     88  after 1 do
     89    group('Source2').startApplications
     90  end
     91  after 30 do
     92    group('Source1').startApplications
     93  end
     94  after 80 do
     95    info "Stopping the ping"
     96    allGroups.stopApplications
     97    Experiment.done
     98  end
     99end
     100
     101defGraph 'RTT' do |g|
     102  g.ms('ping').select(:oml_seq, :remote, :rtt)
     103  g.caption "RTT of received packets."
     104  g.type 'line_chart3'
     105  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :remote
     106  g.xaxis :legend => 'oml_seq'
     107  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     108end
     109
     110}}}
     111
     112=== 3.1.3 Start your application from !LabWiki ===
     113
     114To 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.
     115That will automatically fill out the experiment relevant information in this window
     116 Explanation of the fields in the Execute window:
     117
     118* name: In this field you specify the name of your experiment.
     119
     120* 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.
     121
     122* 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.
     123
     124* 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.
     125
     126*Change source1 and source2 fields to include your slice name similar to nodea-<slicename>
     127
     128Then, start the actual experiment by clicking on the "Start Experiment" button.
     129
     130[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleA/Execute/LW-execute.png, 40%)]]
     131
     132
     133=== 3.1.4 During experiment execution ===
     134
     135After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     136The figure below gives an example for the Execute window during experiment execution.
     137
     138[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleA/Execute/LW-executing.png, 40%)]]
     139
     140Now 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.
     141
     142Depending on the status of your resources and experiments, you will see one of the following statuses at the top of the Execute window:
     143 * 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
     144 * Running - This status appears when your experiment starts running. If it fails for one or more reasons, a Failed status will appear instead
     145 * Aborted - When you click on "Stop Experiment" at the top-left corner of the Execute window, the status changes to aborted
     146 * Finished - When your experiment is done, you will see this status
     147
     148= [wiki:GEC21Agenda/LabWiki/ModuleA/Finish Next: Finish] =
     149= [wiki:GEC21Agenda/LabWiki/ModuleA/DesignSetup Design] =