Changes between Version 17 and Version 18 of GENIEducation/SampleAssignments/OpenFlowLoadBalancerTutorial/ExerciseLayout/Execute


Ignore:
Timestamp:
07/08/13 11:14:04 (11 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/OpenFlowLoadBalancerTutorial/ExerciseLayout/Execute

    v17 v18  
    9999
    100100= 3. Hints =
    101 == 3.1 About the OpenFlow controller [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer.rb load-balancer.rb] ==
     101== 3.1 About The Rspec file [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/openflow-loadbalancer-kvm.rspec OpenFlowLBExo.rspec]
     102  - The Rspec file describes a topology we showed earlier--each node is assigned with certain number of interfaces with pre-defined IP addresses
     103  - Some of the nodes are loaded with softwares and post-scripts. We will take node "Switch" as an example since it is the most complicated one.
     104   - The following section in the Rspec file for node "Switch":
     105   {{{
     106     <install url="http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/software/of-switch-exo.tar.gz" install_path="/"/>
     107   }}}
     108   means it is going to download that tar ball from the specified URL and extract to directory "/"
     109   - The following section in the Rspec file for node "Switch":
     110   {{{
     111     <execute shell="bash" command="/tmp/postboot_script_exo.sh $sliceName $self.Name() ; /tmp/of-topo-setup/lb-setup"/>
     112   }}}
     113   names the post-boot script that ExoGENI is going to run for you after the nodes are booted. 
     114  - More information about "/tmp/postboot_script_exo.sh":
     115   It is a "hook" to the !LabWiki interface. Experimenter run this so that !LabWiki knows the name of the slice and the hostname of the particular node that OML/OMF toolkits are running on.
     116  - More information about "/tmp/of-topo-setup/lb-setup":
     117   "lb-setup" is to setup the load balancing switch. The source code as well as explanation is as follows:
     118   {{{
     119   #!/bin/sh
     120
     121   /tmp/of-topo-setup/prep-trema       # install all libraries for trema
     122   /tmp/of-topo-setup/ovs-start           # create ovs bridge
     123
     124   cp /usr/bin/trace-oml2 /usr/bin/trace        # a hack to the current LabWiki --> needs to be fixed
     125   cp /usr/bin/nmetrics-oml2 /usr/bin/nmetrics       # a hack to the current LabWiki --> needs to be fixed
     126   # download the load balancing openflow controller source code to user directory
     127   wget http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer.rb -O /root/load-balancer.rb
     128
     129   INTERFACES="192.168.1.1 192.168.2.1 192.168.3.1"
     130
     131   # wait until all interfaces are up, then fetch the mapping from interface name to its ip/MAC address and save this info in a file /tmp/ifmap
     132   /tmp/of-topo-setup/writeifmap3
     133
     134   # add port to the ovs bridge
     135   /tmp/of-topo-setup/find-interfaces $INTERFACES | while read iface; do
     136       ovs-vsctl add-port br0 $iface < /dev/null
     137   done
     138
     139   # create port map save it to /tmp/portmap
     140   ovs-ofctl show tcp:127.0.0.1:6634 \
     141       | /tmp/of-topo-setup/ovs-id-ports 192.168.1.1=outside 192.168.2.1=left 192.168.3.1=right \
     142       > /tmp/portmap
     143   }}}
     144
     145== 3.2 About the OpenFlow controller [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer.rb load-balancer.rb] ==
    102146  - Trema web site: http://trema.github.io/trema/
    103147  - Treme ruby API document: http://rubydoc.info/github/trema/trema/master/frames
     
    129173  - '''Note: ''' since Trema does not yet support multi-thread mode, this simple implementation runs in one thread. As a result, users will experience some delay in fetching the flow statistics (i.e., `stats_reply` will not be called right after a !FlowStatsRequest message has been sent in `packet_in` function). Also, it seems that it will take some time for the Open vSwitch to be able to report some flow statistics to the controller. In our experience, Open vSwitch will start to report flow statistics after two flows have already been established. So do not be panic when flow_stats_reply says nothing when one or two flows are already running.
    130174
    131 == 3.2 About the GIMI script you run on !LabWiki ==
     175== 3.3 About the GIMI script you run on !LabWiki ==
    132176
    133177= [wiki:GENIEducation/SampleAssignments/OpenFlowLoadBalancerTutorial/ExerciseLayout/Finish Next: Teardown Experiment] =