| 20 | | The complete set of components from the latest release of MobilityFirst software is available as a compressed image within the ORBIT testbed for imaging nodes using the 'omf' tool. The current pre-prepared image is built over Ubuntu 12.04 LTS distribution and will be moved to newer distributions as they become available and we've had a chance to test compatibility. Once logged into the console of the reserved domain, the image can be loaded onto a node using the command line: |
| 21 | | |
| 22 | | {{{ |
| 23 | | #!sh |
| 24 | | |
| 25 | | omf load -i 'mf-release-latest.ndz' -t 'node1-1.sb9.orbit-lab.org' |
| | 20 | The complete set of components from the latest release of MobilityFirst software is available as a compressed image within the ORBIT testbed for imaging nodes using the 'omf' tool. The current pre-prepared image is built over Ubuntu 12.04 LTS distribution and will be moved to newer distributions as they become available and we have had a chance to test compatibility. |
| | 21 | |
| | 22 | A typical Orbit experiment requires the following six steps: |
| | 23 | |
| | 24 | 1. [[CollapsibleStart(Create resource reservation)]][[Include(Documentation/Short/CreateRes)]][[CollapsibleEnd]] |
| | 25 | |
| | 26 | 2. [[CollapsibleStart(Login into reserved domain: "ssh username@sb1.orbit-lab.org")]][[Include(Documentation/Short/Login)]][[CollapsibleEnd]] |
| | 27 | |
| | 28 | 3. [[CollapsibleStart(Load an image on the nodes: "omf load -i baseline.ndz -t all")]] [[Include(Documentation/Short/LoadImage)]][[CollapsibleEnd]] |
| | 29 | |
| | 30 | 4. [[CollapsibleStart(Turn the nodes on: "omf tell -a on -t all")]][[Include(Documentation/Short/TellOn)]][[CollapsibleEnd]] |
| | 31 | |
| | 32 | 5. [[CollapsibleStart(Execute the experiment: "omf exec test:exp:tutorial:hello-world-wireless -- --res1 node1-1.sb1.orbit-lab.org --res2 node1-2.sb1.orbit-lab.org")]][[Include(Software/cOMF/aExec)]][[CollapsibleEnd]] |
| | 33 | |
| | 34 | 6. Analyze the results |
| | 35 | |
| | 36 | While, most of the experiments follow the presented structure, for this specific tutorial some simplifications have been applied. |
| | 37 | |
| | 38 | From now on, the following assumptions are considered: |
| | 39 | |
| | 40 | * You will be working with resources belonging to the Orbid grid. |
| | 41 | * You have been assigned a group number. |
| | 42 | |
| | 43 | While for this experiment we are using the grid, it is not a strict a requirement and for the successful execution of the experiment any sandbox with at least 4 nodes could be employed. |
| | 44 | |
| | 45 | Once logged into the grid console: |
| | 46 | |
| | 47 | {{{ |
| | 48 | #!sh |
| | 49 | |
| | 50 | Command to access??? |
| | 51 | }}} |
| | 52 | |
| | 53 | |
| | 54 | |
| | 55 | {{{ |
| | 56 | #!sh |
| | 57 | |
| | 58 | omf load -i 'mf-release-latest.ndz' -t system:topo:mf-group1 |
| 64 | | app.shortDescription = "Click-based MobilityFirst Router" |
| 65 | | app.path = ";/usr/local/bin/click" |
| 66 | | |
| 67 | | # click options |
| 68 | | app.defProperty('num_threads', 'number of threads', "--threads",{:type =>; :integer, :mandatory => true, :default => 4, :order => 1}) |
| 69 | | app.defProperty('ctrl_port', 'port for Click control socket', "--port",{:type => :integer, :order => 2}) |
| 70 | | |
| 71 | | # click config file |
| 72 | | app.defProperty('config_file', 'Click configuration file', nil,{:type => :string,:mandatory=> true}) |
| 73 | | |
| 74 | | # keyword parameters used in click config file |
| 75 | | app.defProperty('my_GUID', 'router GUID', "my_GUID",{:type => :string, :mandatory => true}) |
| 76 | | app.defProperty('topo_file', 'path to topology file', "topo_file",{:type => :string, :mandatory => true}) |
| 77 | | app.defProperty('core_dev', 'core network interface', "core_dev",{:type => :string,:mandatory=> true}) |
| 78 | | app.defProperty('GNRS_server_ip', 'IP of local GNRS server', "GNRS_server_ip",{:type => :string,:mandatory=> true}) |
| 79 | | app.defProperty('GNRS_server_port', 'Port of GNRS server', "GNRS_server_port",{:type => :string,:mandatory=> true}) |
| 80 | | app.defProperty('GNRS_listen_ip', 'IP to listen for GNRS response', "GNRS_server_ip",{:type => :string,:default=> "0.0.0.0"}) |
| 81 | | app.defProperty('GNRS_listen_port', 'port to listen for GNRS response', "GNRS_server_port",{:type => :string,:default=> 10001}) |
| 82 | | app.defProperty('edge_dev', 'edge network interface', "edge_dev",{:type => :string,:mandatory=> true}) |
| 83 | | app.defProperty('edge_dev_ip', 'IP assigned to edge interface', "edge_dev_ip",{:type => :string,:mandatory=> true}) |
| | 84 | app.shortDescription = "Click-based MobilityFirst Access Router" |
| | 85 | app.path = "/usr/local/src/mobilityfirst/eval/orbit/tutorial/scripts/ARWrapper.sh" |
| | 86 | # click options |
| | 87 | app.defProperty('num_threads', 'number of threads', "-t",{:type => :integer, :mandatory => true, :default => 4, :order => 1}) |
| | 88 | app.defProperty('ctrl_port', 'port for Click control socket', "-c",{:type => :integer, :order => 2}) |
| | 89 | # click config file |
| | 90 | app.defProperty('config_file', 'Click configuration file', "-C",{:type => :string,:mandatory=> true}) |
| | 91 | # keyword parameters used in click config file |
| | 92 | app.defProperty('my_GUID', 'router GUID', "-m",{:type => :string, :mandatory => true}) |
| | 93 | app.defProperty('topo_file', 'path to topology file', "-f",{:type => :string, :mandatory => true}) |
| | 94 | app.defProperty('core_dev', 'core network interface', "-d",{:type => :string,:mandatory => true}) |
| | 95 | app.defProperty('GNRS_server_ip', 'IP of local GNRS server', "-s",{:type => :string,:mandatory => true}) |
| | 96 | app.defProperty('GNRS_server_port', 'Port of GNRS server', "-p",{:type => :string,:mandatory => true}) |
| | 97 | app.defProperty('GNRS_listen_ip', 'IP to listen for GNRS response', "-i",{:type => :string,:default => "0.0.0.0"}) |
| | 98 | app.defProperty('GNRS_listen_port', 'port to listen for GNRS response', "-P",{:type => :string,:default => "10001"}) |
| | 99 | app.defProperty('edge_dev', 'edge network interface', "-D",{:type => :string,:mandatory => true}) |
| | 100 | app.defProperty('edge_dev_ip', 'IP assigned to edge interface', "-I",{:type => :string,:mandatory => true}) |
| | 102 | |
| | 103 | defApplication('MF-GNRS', 'gnrs') {|app| |
| | 104 | app.shortDescription = "GNRS Server" |
| | 105 | app.path = "/usr/local/src/mobilityfirst/eval/orbit/tutorial/scripts/GNRSWrapper.sh" |
| | 106 | app.defProperty('log4j_config_file', 'log 4j configuration file', "-d",{:type => :string, :order => 1}) |
| | 107 | app.defProperty('jar_file', 'server jar file with all dependencies', "-j" ,{:type => :string, :mandatory=> true, :default => "/usr/local/src/mobilityfirst/gnrs/jserver/target/gnrs-server-1.0.0-SNAPSHOT-jar-with-dependencies.jar", :order => 2}) |
| | 108 | app.defProperty('config_file', 'server configuration file', "-c",{:type => :string, :mandatory=> true, :order => 3}) |
| | 109 | } |
| | 110 | |
| | 111 | #Enable OML reporting by default |
| | 112 | defApplication('MF-HostStack', 'hoststack') {|app| |
| | 113 | app.shortDescription = "MF host network stack" |
| | 114 | app.path = "/usr/local/bin/mfstack" |
| | 115 | app.defProperty('log_level', 'log level', nil,{:type => :string, :mandatory => true, :order => 1, :default => "-e"}) # default is 'error' |
| | 116 | app.defProperty('config_file', 'stack configuration file', nil,{:type => :string, :mandatory => true, :order => 2}) |
| | 117 | } |
| 98 | | defTopology("topo:router_#{i}") { |t| |
| 99 | | aNode = routersTopo.getNodeByIndex(i-1) |
| 100 | | t.addNode(aNode) |
| 101 | | print "Adding node: ", aNode, " router with GUID: #{i+num_hosts}\n" |
| 102 | | } |
| 103 | | |
| 104 | | defGroup("router_#{i}", "topo:router_#{i}") {|node| |
| 105 | | node.addApplication('MF-Router') {|app| |
| 106 | | app.setProperty('my_GUID', router_guid[i-1]) |
| 107 | | app.setProperty('topo_file', topo_file) |
| 108 | | app.setProperty('conf_file', click_conf) |
| 109 | | app.setProperty('core_dev', core_dev) |
| 110 | | app.setProperty('gnrs_server_ip', router_gnrs_if_ip[i-1]) |
| 111 | | app.setProperty('gnrs_server_port', gnrs_server_port) |
| 112 | | app.setProperty('edge_dev', edge_dev) |
| 113 | | app.setProperty('edge_dev_ip', router_wifi_if_ip[i-1]) |
| 114 | | } |
| 115 | | |
| 116 | | node.addApplication('MF-GNRS') {|app| |
| 117 | | app.setProperty('config_file', gnrs_conf_file) |
| 118 | | } |
| 119 | | } |
| | 132 | defTopology("topo:router_#{i}") { |t| |
| | 133 | aNode = routersTopo.getNodeByIndex(i-1) |
| | 134 | t.addNode(aNode) |
| | 135 | info aNode, " assigned role of router with GUID: #{i}" |
| | 136 | } |
| | 137 | |
| | 138 | defGroup("router_#{i}", "topo:router_#{i}") {|node| |
| | 139 | node.addApplication('MF-Router') {|app| |
| | 140 | app.setProperty('num_threads', router_threads) |
| | 141 | app.setProperty('config_file', click_conf) |
| | 142 | app.setProperty('my_GUID', router_guid[i-1]) |
| | 143 | app.setProperty('topo_file', rtr_topo_file) |
| | 144 | app.setProperty('core_dev', core_dev) |
| | 145 | app.setProperty('GNRS_server_ip', GNRS_server_ip) |
| | 146 | app.setProperty('GNRS_server_port', GNRS_server_port) |
| | 147 | app.setProperty('GNRS_listen_ip', "192.168.100.#{i}") |
| | 148 | app.setProperty('GNRS_listen_port', GNRS_listen_port) |
| | 149 | app.setProperty('edge_dev', edge_dev) |
| | 150 | app.setProperty('edge_dev_ip', router_ether_if_ip[i-1]) |
| | 151 | } |
| | 152 | |
| | 153 | #If is the first router add the GNRS |
| | 154 | if i == 1 |
| | 155 | aNode = routersTopo.getNodeByIndex(i-1) |
| | 156 | info aNode, " will also host the GNRS server" |
| | 157 | node.addApplication('MF-GNRS') {|app| |
| | 158 | app.setProperty('log4j_config_file', GNRS_log_file) |
| | 159 | app.setProperty('jar_file', GNRS_jar_file) |
| | 160 | app.setProperty('config_file', GNRS_conf_file) |
| | 161 | } |
| | 162 | end |
| | 163 | |
| | 164 | node.net.e0.ip = "192.168.100.#{i}" |
| | 165 | node.net.e0.netmask = '255.255.255.0' |
| | 166 | |
| | 167 | node.net.w0.mode = "adhoc" |
| | 168 | node.net.w0.type = 'g' |
| | 169 | node.net.w0.channel = "11" |
| | 170 | node.net.w0.essid = "SSID_group_#{i}" |
| | 171 | node.net.w0.ip = "192.168.#{i}.1" |
| | 172 | } |
| 121 | | }}} |
| 122 | | |
| 123 | | ==== Configuring the Network Interfaces ==== |
| | 174 | |
| | 175 | #Create host groups |
| | 176 | for i in 1..num_hosts |
| | 177 | defTopology("topo:host_#{i}") { |t| |
| | 178 | aNode = hostsTopo.getNodeByIndex(i-1) |
| | 179 | t.addNode(aNode) |
| | 180 | info aNode, " assigned role of client with GUID: #{100 + i}" |
| | 181 | } |
| | 182 | |
| | 183 | defGroup("host_#{i}", "topo:host_#{i}") {|node| |
| | 184 | node.addApplication('MF-HostStack') {|app| |
| | 185 | app.setProperty('config_file', hoststack_conf_file[i-1]) |
| | 186 | app.setProperty('log_level', log_level) |
| | 187 | } |
| | 188 | |
| | 189 | #node.net.e0.ip = "192.168.#{i}.#{i+100}" |
| | 190 | #node.net.e0.netmask = '255.255.255.0' |
| | 191 | |
| | 192 | node.net.w0.mode = "adhoc" |
| | 193 | node.net.w0.type = 'g' |
| | 194 | node.net.w0.channel = "11" |
| | 195 | node.net.w0.essid = "SSID_group_#{i}" |
| | 196 | node.net.w0.ip = "192.168.#{i}.2" |
| | 197 | } |
| | 198 | end |
| | 199 | }}} |
| | 200 | |
| | 201 | ==== Starting the MobilityFirst Components ==== |
| | 202 | |
| | 203 | The following snippet shows the starting of the router software and the gnrs servers on the two router nodes: |
| 163 | | }}} |
| | 231 | wait 5 |
| | 232 | |
| | 233 | info "Bringing up host stacks..." |
| | 234 | for i in 1..num_hosts |
| | 235 | group("host_#{i}").startApplications |
| | 236 | end |
| | 237 | |
| | 238 | info "Access the nodes to run a program" |
| | 239 | |
| | 240 | wait 10000 |
| | 241 | |
| | 242 | Experiment.done |
| | 243 | end |
| | 244 | }}} |
| | 245 | |
| | 246 | ==== Executing the script ==== |
| | 247 | |
| | 248 | In order to execute the just described script, download it to your console home folder copying and pasting the following command: |
| | 249 | |
| | 250 | {{{ |
| | 251 | #!sh |
| | 252 | wget www.winlab.rutgers.edu/~bronzino/downlaods/exercise1.rb |
| | 253 | }}} |
| | 254 | |
| | 255 | Once the file has been downloaded, execute it with the following command: |
| | 256 | |
| | 257 | {{{ |
| | 258 | #!sh |
| | 259 | omf exec exercise1.rb |
| | 260 | }}} |
| | 261 | |
| | 262 | The obtained output should resamble the follwoing snippet: |
| | 263 | |
| | 264 | {{{ |
| | 265 | #!sh |
| | 266 | |
| | 267 | INFO NodeHandler: OMF Experiment Controller 5.4 (git 3fb37b9) |
| | 268 | INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml |
| | 269 | INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/ |
| | 270 | INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/ |
| | 271 | INFO NodeHandler: Slice ID: default_slice (default) |
| | 272 | INFO NodeHandler: Experiment ID: default_slice-2014-10-15t02.12.19.869-04.00 |
| | 273 | INFO NodeHandler: Message authentication is disabled |
| | 274 | INFO Experiment: load system:exp:stdlib |
| | 275 | INFO property.resetDelay: resetDelay = 230 (Fixnum) |
| | 276 | INFO property.resetTries: resetTries = 1 (Fixnum) |
| | 277 | INFO Experiment: load system:exp:eventlib |
| | 278 | INFO Experiment: load system:exp:winlib |
| | 279 | INFO Experiment: load exercise1.rb |
| | 280 | INFO Topology: Loaded topology '/tmp/pxe_slice-2014-10-15t02.10.16.594-04.00-topo-success'. |
| | 281 | INFO Topology: Loaded topology 'system:topo:imaged'. |
| | 282 | INFO exp: node1-2.grid.orbit-lab.org assigned role of router with GUID: 1 |
| | 283 | INFO exp: node1-2.grid.orbit-lab.org will also host the GNRS server |
| | 284 | INFO exp: node2-1.grid.orbit-lab.org assigned role of router with GUID: 2 |
| | 285 | INFO exp: node1-1.grid.orbit-lab.org assigned role of router with GUID: 101 |
| | 286 | INFO exp: node2-2.grid.orbit-lab.org assigned role of router with GUID: 102 |
| | 287 | INFO exp: Definition of resources completed |
| | 288 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [0 sec.] |
| | 289 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [10 sec.] |
| | 290 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [20 sec.] |
| | 291 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [31 sec.] |
| | 292 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [41 sec.] |
| | 293 | INFO stdlib: Waiting for nodes (Up/Down/Total): 0/4/4 - (still down: node1-2.grid.orbit-lab.org,node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [51 sec.] |
| | 294 | INFO node2-2.grid.orbit-lab.org: Device 'net/w0' reported Not-Associated |
| | 295 | INFO node1-2.grid.orbit-lab.org: Device 'net/w0' reported Not-Associated |
| | 296 | INFO stdlib: Waiting for nodes (Up/Down/Total): 2/2/4 - (still down: node2-1.grid.orbit-lab.org,node1-1.grid.orbit-lab.org) [61 sec.] |
| | 297 | INFO node2-2.grid.orbit-lab.org: Device 'net/w0' reported 76:01:22:6E:DB:FD |
| | 298 | INFO ALL_UP: Event triggered. Starting the associated tasks. |
| | 299 | INFO exp: This is my first MobilityFirst experiment |
| | 300 | INFO exp: Initializing resources |
| | 301 | INFO exp: Request from Experiment Script: Wait for 20s.... |
| | 302 | INFO node1-2.grid.orbit-lab.org: Device 'net/w0' reported 76:5D:54:9F:2E:AE |
| | 303 | INFO node2-1.grid.orbit-lab.org: Device 'net/w0' reported 76:01:22:6E:DB:FD |
| | 304 | INFO node1-1.grid.orbit-lab.org: Device 'net/w0' reported 76:5D:54:9F:2E:AE |
| | 305 | INFO exp: Bringing up routers... |
| | 306 | INFO exp: Request from Experiment Script: Wait for 5s.... |
| | 307 | INFO exp: Bringing up host stacks... |
| | 308 | INFO exp: Access the nodes to run a program |
| | 309 | INFO exp: Request from Experiment Script: Wait for 10000s.... |
| | 310 | }}} |
| | 311 | |
| | 312 | A few comments on the obtained output: |
| | 313 | * temp |