Changes between Version 18 and Version 19 of GENIEducation/HyperNets


Ignore:
Timestamp:
08/19/13 10:36:27 (11 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/HyperNets

    v18 v19  
    2929== To Build a Network Hypervisor Server ==
    3030'''For Ubuntu:''' [[BR]]
     31 - 0. Since the Hypervisor server uses port 8001 to do XML-RPC, it also builds a website to show the server logs. Open Port 80 and 8001 on the server first.
    3132 - 1. install apache:
    3233{{{
     
    157158 myPVN.buildRandomFullMesh(myConfig.PVNName, myConfig.nodeNum);
    158159}}}
    159 
     160 - Node addPR(String pvnName, Node pr, String type): adds a programmable router to your topology. pvnName is the name of your !HyperNet. You can specify Node pr's virtualization type, which specific physical node you want (bounded node), and from which aggregate manager. Alternatively, you can specify the virtualization type of the pr in String type.
     161{{{
     162 #import pvnlib.*
     163 ...
     164 Node myNode = new Node();
     165 myNode.virtuali_id = "fancy-node-name";
     166 myNode.node_type = "xo.small";
     167 myNode.image = "http://emmy9.casa.umass.edu/Disk_Images/ExoGENI/exogeni-umass-ovs-1.0.4.xml";
     168 myNode.version = "375d5861080b85c9b17e8d4c6c431e955e1d72fd";
     169 myNode.tarfiles = "http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/software/install-script-exo.tar.gz";
     170 myNode.install_path = "/tmp/";
     171 myNode.startup_command = "/tmp/postboot_script_exo.sh $sliceName $self.Name()";
     172 //you can even specify which physical node it is by: myNode.address = "pc321.emulab.net";
     173 myPVN.addPR(myNode);
     174}}}
     175 - ArrayList<Node> addTunnel(String pvnName, Node pr1, Node pr2): adds a link between two Nodes pr1 and pr2. This link can be a VLAN link or a GRE tunnel, depending on the two nodes it is connecting. (e.g., if the two nodes are from different aggregates, then a GRE tunnel is created; otherwise a normal VLAN link is created)
     176{{{
     177 Node node1 = new Node();
     178 node1.node_cm = "urn:publicid:IDN+emulab.net+authority+cm";
     179 Node node2 = new Node();
     180 node2.node_cm = "urn:publicid:IDN+uky.emulab.net+authority+cm";
     181 addTunnel(node1, node2); //this will create a GRE tunnel between node1 and node2 since they are from different aggregates.
     182}}}
     183
     184== Compose your own !HyperNet to deploy a topology on GENI ==
     185 - 1. Pre-requisites:
     186  - 1.0. Make sure you have access to the Hypervisor server. Right now it is andor.gpolab.bbn.com (try ping it to make sure that there is no firewall issue).
     187  - 1.1. Of course when you built your own !HyperNet, you want to try it out to debug it. For this purpose, you do need to have a GENI account. Follow the section about "To use a !HyperNet app" to get account and set up credentials.
     188  - 1.2. It will be best if you know some Java, but it is totally fine if you don't know. The examples are quite easy to follow.
     189  - 1.3. Download and install JDK 1.6 or higher.
     190  - 1.4. It is recommended that you use some sort of IDE for Java, such as eclipse, instead of writing the code in vim and writing your own Makefile.
     191  - 1.5. The most important: download !HyperNet library from http://www.gpolab.bbn.com/experiment-support/HyperNet/PVNLibrary.tar.gz
     192   -1.5.1. extract it to any directory (e.g., your home directory), and add the library folder to your "CLASSPATH" varialbe by adding the following line to your ~/.bashrc file:  (in eclipse, you need to include the .jar files in that folder as external JARs in the Build Path of your Java project)
     193  {{{
     194  export CLASSPATH=.:~/PVNLibrary/*:$CLASSPATH
     195  }}}
     196 - 2. Coding:
     197  - 2.1. Your !HyperNet code should follow these steps:
     198   - 2.1.1. Read Config file (by default, it is "myConfig.txt" in the same directory as your !HyperNet app) using getConfig()
     199   - 2.1.2. Register !HyperNet network using registerPVN()
     200   - 2.1.3. Compose your network using the APIs described earlier
     201   - 2.1.4. Build your network using buildTopo()
     202 - 3. A simple example to follow:
     203  - The best practice is to start with an example: http://www.gpolab.bbn.com/experiment-support/HyperNet/Examples/sourceCode/ExampleRingGui.tar.gz
     204  - Run the example and make sure it works (remember to deletesliver after you built the topology, via flack) -- if it does not work, there must be something wrong with your setup (not the code), e.g., connection to Hypervisor server, myConfig.txt, your credential files (omni_config), etc.
     205  - Try change the code in the example so that it creates a random Star topology (the code is already there, you just need to comment and uncomment)
     206 - 4. A more complicated example (that only works on exoGENI since only exoGENI recognize the image name -- you know what that means when you see the code :-)):
     207  - This is an example that shows how to compose a network of any topology that you want, with specific applications/OS image on each of the nodes in your topology, with specific IP addresses assigned on each interfaces on your nodes.
     208  - Code can be found here: http://www.gpolab.bbn.com/experiment-support/HyperNet/Examples/sourceCode/ExampleOpenFlowLB.tar.gz
     209 - 5. Since GENI resources are scarce, it is recommended that you build the RSpec, check the RSpec first, then deploy the topology on GENI (i.e., reserve GENI resources)
     210  - 5.1. How what should I do if I only want to build the RSpec instead of deploying it on GENI? -- Check the next section
     211
     212== What if I only want to create the RSpec file instead of actually building/deploying it on GENI? ==
     213 - 1. Simple: use showRspec() instead of buildTopo()
     214 - 2. If you only want to see RSpec file, you do not even need your credential (i.e., you do not need to have "userCredential" in your config file). As a result, a non-GENI user can use our Hypervisor server to create Rspec files that can be understood by GENI AMs.
     215 - 3. An example: http://www.gpolab.bbn.com/experiment-support/HyperNet/Examples/sourceCode/ExampleRingRspec.tar.gz
     216  - 3.1. This example does not create a GUI window so the code is much simpler than the ExampleRingGui example.
     217  - 3.2. Try change the code as well as the config file so that it creates the RSpec for a full mesh network with 6 nodes.