Changes between Initial Version and Version 1 of Tutorials/a0Basic/Tutorial4


Ignore:
Timestamp:
Jun 10, 2016, 10:14:30 AM (8 years ago)
Author:
seskar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/a0Basic/Tutorial4

    v1 v1  
     1[[TOC(Tutorials/a0Basic*)]]
     2
     3== !WiSHFUL Tutorial: Basic Controller-Agent Interaction ==
     4
     5=== Prerequisites ===
     6
     7This tutorial series assumes you have an [http://www.orbit-lab.org/userManagement/register ORBIT account], have [https://www.orbit-lab.org/schedule/ scheduled a session] on the ORBIT testbed, are familiar with [http://en.wikipedia.org/wiki/Secure_Shell SSH]'ing [http://www.orbit-lab.org/wiki/Tutorial/HelloWorld#a4.RunningtheHelloWorldexperiment into the testbed itself, and are familiar with the basics of running ORBIT experiments]. If you have not done these things yet, you may wish to do so before taking a look at this slightly more advanced experiment. If you are unfamiliar with or are entirely new to ORBIT, you may wish to start [http://www.orbit-lab.org/ here].
     8
     9=== About This Experiment ===
     10
     11This tutorial illustartes use of WiSHFUL framework for experiment orchestration. In this experiment script, we'll use a WiSHFUL Controller and Agent. This experiment assumes usinge reference WiSHFUL image that is available as '''wishful.ndz''' and is design for use in SB4.
     12
     13=== Experiment Script ===
     14
     15The experiment script.
     16
     17* [attachment:wishful_simple.rb Experiment Script]
     18
     19Relevant sections of the script code are:
     20
     21'''1. Define the set of nodes and path for the WiSHFUL directory:
     22'''
     23'''2. Define WiSSHFUL Controller and Agent application that will run on nodes:'''
     24
     25 We use ''defApplication'' to create two reference application names: ''controller'' and ''agent'' that are used later in the script to actually execute corresponding WiSHFUL components.
     26{{{
     27defApplication('iperf', 'iperf-oml2') do |app|
     28}}}
     29
     30The actual path to the applications in the node is defined as follows.
     31{{{
     32app.path =
     33}}}
     34
     35
     36 The actual experiment has the 10 second delay before the call to ''startApplications'' (to "warm up" nodes) that is followed by 60 seconds of run-time during which WiSHFUL controller manages corresponding agerm. Finally all applications are stopped and the experiment exits out.
     37
     38
     39=== Executing the Experiment Script ===
     40An overview on running experiment scripts on the ORBIT testbed can be found on the [wiki:Documentation/CGettingStarted Getting Started Page].
     41
     42In order to run this experiment script, connect to the console of the SB4 for which you have an active and approved reservation for and load the ''wishfull.ndz'' image onto experiment nodes.
     43{{{
     44user@console:~$ omf load -i wishful.ndz -t node1-1,node2-1
     45}}}
     46
     47After the nodes have finished imaging, turn the nodes on. The topology used here is ''system:topo:imaged'' which selects the prior set of nodes that were successfully imaged.
     48{{{
     49user@console:~$ omf tell -a on -t system:topo:imaged
     50}}}
     51Wait about 1 minute before proceeding to allow the nodes time to boot up.
     52
     53Run the experiment:{{{
     54user@console:~$ omf exec wishful_simple.rb --duration 60
     55}}}
     56
     57The output of this script should be similar to the following:
     58{{{
     59user@console.sb4:~# omf exec wishful_simple.rb
     60
     61 INFO NodeHandler: OMF Experiment Controller 5.4 (git 861d645)
     62 INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml
     63 INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/
     64 INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/
     65 INFO NodeHandler: Add domain http - http://internal2dmz.orbit-lab.org:5054/
     66 INFO NodeHandler: Add domain http - http://external1.orbit-lab.org:5054/
     67 INFO NodeHandler: Slice ID: default_slice (default)
     68 INFO NodeHandler: Experiment ID: default_slice-2016-06-10t04.50.48.026-04.00
     69 INFO NodeHandler: Message authentication is disabled
     70 INFO Experiment: load system:exp:stdlib
     71 INFO property.resetDelay: resetDelay = 230 (Fixnum)
     72 INFO property.resetTries: resetTries = 1 (Fixnum)
     73 INFO Experiment: load system:exp:eventlib
     74 INFO Experiment: load system:exp:winlib
     75 INFO Experiment: load wishful_simple.rb
     76 INFO property.contr: contr = "node2-1" (String)
     77 INFO property.agent: agent = "node1-1" (String)
     78 INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks.
     79 INFO exp: Wait for all nodes to come up
     80 INFO exp: Request from Experiment Script: Wait for 10s....
     81 INFO BRING_UP: Event triggered. Starting the associated tasks.
     82 INFO Experiment: Bringing up resources
     83 INFO exp: Both controller and agent are started...
     84 INFO exp: Request from Experiment Script: Wait for 60s....
     85 INFO exp: Both controller and agent are stopped...
     86 INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     87 INFO NodeHandler:
     88 INFO NodeHandler: Shutting down experiment, please wait...
     89 INFO NodeHandler:
     90 INFO run: Experiment default_slice-2016-06-10t04.50.48.026-04.00 finished after 1:20
     91}}}
     92
     93=== Retrieving Results ===
     94
     95This particular experiment does not generate any data but rather illustrates how to run WiSHFUL based experiment. The primary observable output from both experiment script execution as well as output of the controller/agent interraction are aggregated on the console in a log file: /tmp/''<Experiment ID>''.log
     96
     97For this example, this log file is: /tmp/default_slice-2016-06-10t04.50.48.026-04.00.log
     98
     99Partial contents of this file is:
     100{{{
     1012016-06-10 04:51:13 DEBUG nodeHandler::AppContext: Starting application 'controller#1'
     1022016-06-10 04:51:13 DEBUG nodeHandler::set::Controllers: Send ('Controllers') - '<EXECUTE><TARGET>Controllers</TARGET><APPID>controller#1<
     103/APPID><PATH>/root/wishful/examples/simple/wishful_simple_controller</PATH><ENV></ENV><CMDLINEARGS>--config /root/wishful/examples/simple/
     104controller_config.yaml</CMDLINEARGS></EXECUTE>'
     1052016-06-10 04:51:13 DEBUG nodeHandler::set::Agents: Start all applications
     1062016-06-10 04:51:13 DEBUG nodeHandler::AppContext: Starting application 'agent#1'
     1072016-06-10 04:51:13 DEBUG nodeHandler::set::Agents: Send ('Agents') - '<EXECUTE><TARGET>Agents</TARGET><APPID>agent#1</APPID><PATH>/root/w
     108ishful/examples/simple/wishful_simple_agent</PATH><ENV></ENV><CMDLINEARGS>--config /root/wishful/examples/simple/agent_config.yaml</CMDLIN
     109EARGS></EXECUTE>'
     1102016-06-10 04:51:13 DEBUG nodeHandler::AgentCommands: APP_EVENT STARTED from: 'controller#1' (node2-1.sb4.orbit-lab.org) - msg: ''
     1112016-06-10 04:51:13 INFO nodeHandler::exp: Both controller and agent are started...
     1122016-06-10 04:51:13 INFO nodeHandler::exp: Request from Experiment Script: Wait for 50s....
     1132016-06-10 04:51:13 DEBUG nodeHandler::AgentCommands: APP_EVENT STARTED from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: ''
     1142016-06-10 04:51:14 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1151:14,022 - SimpleModule2.myFunc_1() - INFO - This function is executed on agent start'
     1162016-06-10 04:51:15 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1171:15,711 - pyre_discovery_module.main.discovery_task() - INFO - Discovered Controller DL-tcp://10.14.2.1:8990, UL-tcp://10.14.2.1:8989'
     1182016-06-10 04:51:17 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1191:17,724 - pyre_discovery_module.main.discovery_task() - INFO - Discovered Controller DL-tcp://10.14.2.1:8990, UL-tcp://10.14.2.1:8989'
     1202016-06-10 04:51:18 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1211:18,052 - SimpleModule2.myFunc_3() - INFO - This function is executed on connection to global controller'
     1222016-06-10 04:51:23 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1231:23,712 - SimpleModule2.myFunc_5() - INFO - This function is executed before first UPI call to module'
     1242016-06-10 04:51:23 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1251:23,719 - SimpleModule2.send_to_module() - WARNING - Exception: function radio.clean_per_flow_tx_power_table was not correctly executed;
     126error msg: wrong'
     1272016-06-10 04:51:26 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1281:26,471 - SimpleModule2.before_set_channel() - INFO - This function is executed before set_channel'
     1292016-06-10 04:51:26 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1301:26,471 - SimpleModule2.set_channel() - INFO - Simple Module sets channel: 4 on interface: wlan1'
     1312016-06-10 04:51:26 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1321:26,471 - SimpleModule2.after_set_channel() - INFO - This function is executed after set_channel'
     1332016-06-10 04:51:33 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1341:33,735 - SimpleModule2.send_to_module() - WARNING - Exception: function radio.clean_per_flow_tx_power_table was not correctly executed;
     135error msg: wrong'
     1362016-06-10 04:51:36 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:5
     1371:36,487 - SimpleModule2.before_set_channel() - INFO - This function is executed before set_channel'
     1382016-06-10 04:51:36 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:36,487 - SimpleMod
     139ule2.set_channel() - INFO - Simple Module sets channel: 4 on interface: wlan1'
     1402016-06-10 04:51:36 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:36,487 - SimpleMod
     141ule2.after_set_channel() - INFO - This function is executed after set_channel'
     1422016-06-10 04:51:43 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:43,743 - SimpleMod
     143ule2.send_to_module() - WARNING - Exception: function radio.clean_per_flow_tx_power_table was not correctly executed; error msg: wrong'
     1442016-06-10 04:51:46 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:46,495 - SimpleMod
     145ule2.before_set_channel() - INFO - This function is executed before set_channel'
     1462016-06-10 04:51:46 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:46,496 - SimpleMod
     147ule2.set_channel() - INFO - Simple Module sets channel: 4 on interface: wlan1'
     1482016-06-10 04:51:46 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:46,496 - SimpleMod
     149ule2.after_set_channel() - INFO - This function is executed after set_channel'
     1502016-06-10 04:51:53 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:53,756 - SimpleMod
     151ule2.send_to_module() - WARNING - Exception: function radio.clean_per_flow_tx_power_table was not correctly executed; error msg: wrong'
     1522016-06-10 04:51:56 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:56,508 - SimpleMod
     153ule2.before_set_channel() - INFO - This function is executed before set_channel'
     1542016-06-10 04:51:56 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:56,508 - SimpleMod
     155ule2.set_channel() - INFO - Simple Module sets channel: 4 on interface: wlan1'
     1562016-06-10 04:51:56 DEBUG nodeHandler::AgentCommands: APP_EVENT STDERR from: 'agent#1' (node1-1.sb4.orbit-lab.org) - msg: '2016-06-10 04:51:56,508 - SimpleMod
     157ule2.after_set_channel() - INFO - This function is executed after set_channel'
     158
     159}}}