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


Ignore:
Timestamp:
10/15/14 13:06:24 (6 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC21Agenda/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 "GEC21learningswitch" in the field and then select "GEC21learningswitch.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
     25defProperty('source1', "nodea-dbhattesteg", "ID of a resource")
     26defProperty('source2', "switch-dbhattesteg", "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.9', "Ping destination address")
     33
     34
     35defApplication('ping') do |app|
     36  app.description = 'Simple Definition for the ping-oml2 application'
     37  # Define the path to the binary executable for this application
     38  app.binary_path = '/usr/local/bin/ping-oml2'
     39  # Define the configurable parameters for this application
     40  # For example if target is set to foo.com and count is set to 2, then the
     41  # application will be started with the command line:
     42  # /usr/bin/ping-oml2 -a foo.com -c 2
     43  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     44  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     45  # Define the OML2 measurement point that this application provides.
     46  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     47  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     48  app.defMeasurement('ping') do |m|
     49    m.defMetric('dest_addr',:string)
     50    m.defMetric('ttl',:uint32)
     51    m.defMetric('rtt',:double)
     52    m.defMetric('rtt_unit',:string)
     53  end
     54end
     55
     56defApplication('trema') do |app|
     57  app.description = 'This app runs trema from command line'
     58  app.binary_path = '/bin/sh /root/ovs-setup2.sh'
     59end
     60defGroup('Source2', property.source2) do |node|
     61  node.addApplication("trema")
     62end
     63defGroup('Source1', property.source1) do |node|
     64  node.addApplication("ping") do |app|
     65    app.setProperty('target', property.sinkaddr12)
     66    app.setProperty('count', 30)
     67    #app.setProperty('interval', 1)
     68    app.measure('ping', :samples => 1)
     69  end
     70  node.addApplication("ping") do |app|
     71    app.setProperty('target', property.sinkaddr13)
     72    app.setProperty('count', 30)
     73    #app.setProperty('interval', 1)
     74    app.measure('ping', :samples => 1)
     75  end
     76   node.addApplication("ping") do |app|
     77    app.setProperty('target', property.sinkaddr21)
     78    app.setProperty('count', 30)
     79    #app.setProperty('interval', 1)
     80    app.measure('ping', :samples => 1)
     81  end
     82end
     83
     84
     85onEvent(:ALL_UP_AND_INSTALLED) do |event|
     86  info "Starting the ping"
     87  after 1 do
     88    group('Source2').startApplications
     89  end
     90  after 30 do
     91    group('Source1').startApplications
     92  end
     93  after 80 do
     94    info "Stopping the ping"
     95    allGroups.stopApplications
     96    Experiment.done
     97  end
     98end
     99
     100defGraph 'RTT' do |g|
     101  g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     102  g.caption "RTT of received packets."
     103  g.type 'line_chart3'
     104  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     105  g.xaxis :legend => 'oml_seq'
     106  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     107end
     108
     109}}}
     110
     111=== 3.1.3 Start your application from !LabWiki ===
     112
     113To 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.
     114That will automatically fill out the experiment relevant information in this window
     115 Explanation of the fields in the Execute window:
     116
     117* name: In this field you specify the name of your experiment.
     118
     119* 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.
     120
     121* 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.
     122
     123* 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.
     124
     125*Change source1 and source2 fields to include your slice name similar to nodea-<slicename>
     126
     127Then, start the actual experiment by clicking on the "Start Experiment" button.
     128
     129[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleA/Execute/LW-execute.pngq, 40%)]]
     130
     131
     132=== 3.1.4 During experiment execution ===
     133
     134After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     135The figure below gives an example for the Execute window during experiment execution.
     136
     137[[Image(http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleA/Execute/LW-executing.png, 40%)]]
     138
     139Now 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.
     140
     141Depending on the status of your resources and experiments, you will see one of the following statuses at the top of the Execute window:
     142 * 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
     143 * Running - This status appears when your experiment starts running. If it fails for one or more reasons, a Failed status will appear instead
     144 * Aborted - When you click on "Stop Experiment" at the top-left corner of the Execute window, the status changes to aborted
     145 * Finished - When your experiment is done, you will see this status
     146
     147= [wiki:GEC21Agenda/LabWiki/ModuleA/Finish Next: Finish] =
     148= [wiki:GEC21Agenda/LabWiki/ModuleA/DesignSetup Design] =