Changes between Version 2 and Version 3 of GEC16Agenda/WiMAX-Tutorial/Streamload/06


Ignore:
Timestamp:
03/20/13 12:21:32 (11 years ago)
Author:
Fraida Fund
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/WiMAX-Tutorial/Streamload/06

    v2 v3  
    55While the disk image is loading onto his nodes, he prepares an experiment script. This script describes the configuration of all the OMF-enabled resources in the experiment, and the sequence of events in the experiment.
    66
     7The experiment script is given here:
     8
     9{{{
     10#!ruby
     11
     12defProperty('hrnSuffix', ".sb4.orbit-lab.org", "Suffix to use for the HRN of resources")
     13defProperty('hrnPrefix', "node1-", "Prefix to use for the HRN of resources")
     14defProperty('client1', "6", "ID for the first resource to use as downloader")
     15defProperty('client2', "5", "ID for the second resource to use as downloader")
     16defProperty('server', "7", "ID for the resource to use as server")
     17defProperty('duration', 120, "Duration of experiment")
     18defProperty('attUrl', "http://internal2dmz.orbit-lab.org:5052/instr/set?", "Path to use to set attenuation")
     19defProperty('buffer', 4, "Buffer size for downloading base layer")
     20defProperty('window', 3, "Window to use for streamloading")
     21
     22
     23defGroup("server", "#{property.hrnPrefix}#{property.server}#{property.hrnSuffix}") do |node|
     24  node.net.x0.profile = '51'
     25  node.net.x0.ip = '10.43.0.4%y%'
     26  node.net.x0.netmask = "255.255.0.0"
     27end
     28
     29defGroup("client1", "#{property.hrnPrefix}#{property.client1}#{property.hrnSuffix}") do |node|
     30  node.net.x0.profile = '51'
     31  node.net.x0.ip = '10.43.0.4%y%'
     32  node.net.x0.netmask = "255.255.0.0"
     33  node.addApplication("wmxstat_universal") do |app|
     34    app.measure('status')
     35  end
     36  node.addApplication("streamload") do |app|
     37    app.setProperty('url', "http://10.43.0.4#{property.server}:8000/root/")
     38    app.setProperty('video', "vidoe#{property.buffer}")
     39    app.setProperty('window', property.window)
     40    app.setProperty('streamload', "True")
     41    app.measure('dl', :samples =>1)
     42    app.measure('conf', :samples =>1)
     43    app.measure('play', :samples =>1)
     44  end
     45end
     46
     47defGroup("client2", "#{property.hrnPrefix}#{property.client2}#{property.hrnSuffix}") do |node|
     48  node.net.x0.profile = '51'
     49  node.net.x0.ip = '10.43.0.4%y%'
     50  node.net.x0.netmask = "255.255.0.0"
     51  node.addApplication("wmxstat_universal") do |app|
     52    app.measure('status')
     53  end
     54  node.addApplication("streamload") do |app|
     55    app.setProperty('url', "http://10.43.0.4#{property.server}:8000/root/")
     56    app.setProperty('video', "video#{property.buffer}")
     57    app.setProperty('window', property.window)
     58    app.setProperty('streamload', "False")
     59    app.measure('dl', :samples =>1)
     60    app.measure('conf', :samples =>1)
     61    app.measure('play', :samples =>1)
     62  end
     63end
     64
     65
     66onEvent(:ALL_UP_AND_INSTALLED) do |event|
     67  wait 5
     68  system("/home/#{ENV['USER']}/getbsconf -i wimaxrf --oml-server tcp:oml:3003 --oml-id console --oml-exp-id #{Experiment.ID}")
     69  info "This is my experiment ID: #{Experiment.ID}"
     70  group("server").exec("/usr/bin/python -m SimpleHTTPServer")
     71  group("client1").startApplications
     72  wait property.duration
     73  group("client1").stopApplications
     74  wait 5
     75  group("client2").startApplications
     76  wait property.duration
     77  group("client2").stopApplications
     78  wait 5
     79  allGroups.stopApplications
     80  Experiment.done
     81end
     82
     83
     84}}}
     85
    786
    887'''[wiki:GEC16Agenda/WiMAX-Tutorial/Streamload/07 Next]'''