[[PageOutline]] = Experimenter Workflow and Example Topologies = [[br]] = Prework = 1. Download and install [http://www.virtualbox.org/ VirtualBox] on your machine, we have tested versions 4.1.8 * If your computer runs Ubuntu 10.04 which comes with !VirtualBox 3.1.6_OSE, please download the latest version of !VirtualBox. 2. [https://www.planet-lab.org/GEC13/ Download] the VM image 3. Run !VirtualBox and Import Appliance (File->Import Appliance), accept the default settings for the VM. * If you are using a FAT32 filesystem you will NOT be able to load the image. 4. Start the VM and log in 5. Change the default password, on the task bar on the top, click on the right on the user 'geni', and choose the Change Password button. 6. Verify that the VM has connectivity. Start Firefox (shortcut on the top bar) and try to load Google. If you can't reach any website, restore VM's Network connection. * On the far right on the top bar, there is the network icon (two opposite facing arrows). * Click that icon and choose 'Auto eth0'. * Try loading the webpage again. = Useful Tips = * You '''can copy-paste''' between the host and the guest VM. * In the terminal within the VM, use '''Ctrl-Shift-C to copy''' and '''Ctrl-Shift-V to paste'''. * vim and emacs editors are installed on the VM, so feel free to use them for editing your files. * To replace a pattern within the file: * If you are using vim, while in command mode, type: {{{ %s/pattern/replace_text/gc }}} And press 'y' for the instances of the pattern you want replaced, 'n' otherwise. * If you are using emacs, press Alt-x and then type: {{{ query-replace }}} and press ENTER. Enter the pattern to be replaced, press ENTER, enter the text you want to replace it with and press ENTER. Press 'y' for the instances of the pattern you want replaced, 'n' otherwise. * If you want to have a shared folder between your machine and the VM so that it's easier to transfer files during the tutorial, you have to do this before starting the VM. Follow [http://ozz314.wordpress.com/2008/05/08/virtualbox-shared-folders-between-ubuntu-guest-and-mac-host/ these instructions] * If you get an error running Omni, look at the [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot troubleshoot page] for help. = I. Getting Started = == 1. Update the VM files == Before you start make sure you update the tutorial files. * '''Open a terminal window ''' (there is a shortcut on the top bar). * ''' Change the directory to go under the bin directory of the tutorial''' {{{ cd Tutorials/ExptWorkflow/bin }}} * '''Download the latest version of the update script''' {{{ wget http://192.1.249.166:8383/downloadRSpecs.sh }}} * '''Make it an executable''' {{{ chmod +x downloadRSpecs.sh }}} * '''Leave the bin directory''' and '''execute the update script''' {{{ cd ..; downloadRSpecs.sh }}} == 2. Firewalls == Some of the compute resources are behind a firewall. To avoid any firewall problems, please first login to "ops.pgeni.gpolab.bbn.com", since we might need to tunnel some traffic through this connection. To do that : * '''Open a terminal window ''' (there is a shortcut on the top bar). * ''' Change to the directory of your team'''. Substitute ## with the number of your team. {{{ cd Tutorials/ExptWorkflow/gpousr## }}} * '''Connect to ops.pgeni.gpolab.bbn.com ''' {{{ xterm -e ssh -i ssh/geni_key -F ssh/config gpousr##@ops & }}} == 3. Flack vs OMNI == In this first exercise we are going to use Omni and Flack in parallel and see how you can do the same thing with either of the tools. === Configure Flack to use your account=== Flack is a web based graphical tool. Start firefox (there should be a shortcut in the top bar). On the bookmark toolbar there is an ExptWorkflow folder. Press there and "Open All in Tabs'' [[Image(all-tabs.png, 60%)]] On the first tab there should be the pgeni website loaded (www.pgeni.gpolab.bbn.com). Choose login on the left pane. Add the security exception that you are requested to. Use the information in the slip to login. After you have successfully logged in switch to the second tab. Press login. Select pgeni.gpolab.bbn.com as your authority. '''NOTE : make sure to choose, pgeni and not pgeni1 or pgeni3. Press '''Download'''. [[Image(flack-login.png, 60%)]] Type in your password again. Now you have configured Flack to your personal information. === Listresources in Flack === After you login, you will see a pop-up window that will ask you which AMs you would like to interact with in this session. First of all unclick the All/None checkbox to uncheck all the AMs. Then make sure that you only check '''bbn-pgeni.cm''' and '''utahemulab.cm''', note that there are AMs with similar names make sure you choose these two. [[Image(choose-ams.png, 30%)]] Now Flack will go behind the scenes and invoke listresources in the selected AMs and populate the map. While Flack is loading the resources you can browse through your personal information by clicking to the button with your username on the left. You will see your credential, your certificate and your ssh keys. === Configure Omni to use your account === While Flack is loading the resources let's understand how the same functionality works with Omni. Omni is configured through a text file that is called omni_config. Go back to the terminal window and go under the directory that corresponds to your user {{{ cd /home/geni/Tutorials/ExptWorkflow/gpousr##/ }}} For user gpousr25, this will look like {{{ cd /home/geni/Tutorials/ExptWorkflow/gpousr25/ }}} Open the file called `omni_config` using either vim or emacs. Close to the top of the file you will see two parameters called `default_cf` and `users`. Your username should be at least listed in the user section. Look for the sections in the file that are named `[pgeni]` and `[gpousr##]`. For example for user gpousr25 these section look like: {{{ [pgeni] type = pg ch = https://www.emulab.net:443/protogeni/xmlrpc/ch sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa # Use the following two lines if you are using # a certificate with a passphrase #cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem #key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem # Use the following two lines if you are using # a cleartext cert. cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem [gpousr25] # Make sure the urn matches the URN of the credential urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr25 # Public key to be installed in compute resources. For multiple # keys use a comma separated file keys = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_key.pub }}} In the pgeni section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from pgeni.gpolab.bbn.com. This is equivalent to the Download action of Flack. In the `[gpousr##]` section, the information need for logging-in to reserved compute resources are provided. It includes you unique URN and a public key that would be uploaded to the hosts that you will reserve during the tutorial. Another interesting section to look at is the `[aggregate-nicknames]` sections. Flack already knows the URL for all the AMs and present you a list of AMs to choose from using a short, descriptive name. In Omni a user is required to pass the URL for each call to the GENI AM API. In this section the user get a chance to provide short descriptive names to the URLs that are easier to memorize and use. This section should look like : {{{ [aggregate_nicknames] # ProtoGENI AMs and PlanetLab central pg-gpo=urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+am,https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am pg-utah=,https://www.emulab.net/protogeni/xmlrpc/am pg-ky=urn:publicid:IDN+uky.emulab.net+authority+am,https://www.uky.emulab.net/protogeni/xmlrpc/am plc=,https://www.planet-lab.org:12346 # Private myplc installations pl-gpo=,http://myplc.gpolab.bbn.com:12346/ pl-clemson=,http://myplc.clemson.edu:12346/ pl-stanford=,https://myplc.stanford.edu:12346/ pl-wisconsin=,https://wings-openflow-1.wail.wisc.edu:12346/ pl-washington=,https://of.cs.washington.edu:12346/ pl-rutgers=,https://plc.orbit-lab.org:12346/ pl-indiana=,https://localhost:12346/ pl-gatech=,https://localhost:2346/ # Tutorial OpenFlow AM of-tut=,https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1 # Other OpenFlow AMs of-gpo=,https://foam.gpolab.bbn.com:3626/foam/gapi/1 of-stanford=,https://openflow4.stanford.edu:3626/foam/gapi/1 of-clemson=,https://foam.clemson.edu:3626/foam/gapi/1 of-wisconsin=,https://foam.wail.wisc.edu:3626/foam/gapi/1 of-rutgers=,https://foam.oflow.cip.gatech.edu:3626/foam/gapi/1 of-indiana=,https://foam.noc.iu.edu:3626/foam/gapi/1 of-gatech=,https://nox.orbit-lab.org:3626/foam/gapi/1 of-nlr=,https://foam.nlr.net:3626/foam/gapi/1 of-i2=,https://foam.net.internet2.edu:3626/foam/gapi/1 }}} ==== Clearing the passphrase from your cert ==== When you first logged in to Flack, you had to type your passphrase (password). Flack cashes this information and re-uses it for the duration of the session. Omni will ask you for the phrase multiple times per command. To save time during the tutorial, we are going to remove the passphrase from your cert. Close the omni_config file and type : {{{ clear_cert.sh }}} Use the same password as in Flack. For user gpousr25, this looks like {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ clear_cert.sh Enter pass phrase for ssh/geni_cert.pem: writing RSA key }}} '''NOTE''': If you misstype your password and get an error, make sure to remove a file before you start again: {{{ rm -f ssh/geni_cert_ct.pem }}} Verify that you have the necessary credential and key files {{{ ls ssh |grep geni }}} For gpousr25 the output looks like : {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ ls ssh |grep geni geni_cert_ct.pem geni_cert.pem geni_key geni_key.pub }}} || geni_cert_ct.pem || Cleartext certificate, i.e. does not require any passphrase || || geni_cert.pem || Encrypted certificate || || geni_key || The private key that gpousr25 would use to login to the nodes || || geni_key.pub || The corresponding public key that gpousr25 will ask to be loaded to the nodes || ==== Test configuration ==== In order to test that our configuration is correct, you can issue a getversion command. For this step we have used !PlanetLab's AM, but you can use any Aggregate Manager(AM). {{{ omni.py getversion -a http://www.planet-lab.org:12346 }}} Or equivalently using the !PlanetLab nickname: {{{ omni.py getversion -a plc }}} gpousr25 decided to use !PlanetLab central : {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py getversion -a plc INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Substituting AM nickname plc with URL https://www.planet-lab.org:12346, URN unspecified_AM_URN INFO:omni:AM URN: unspecified_AM_URN (url: https://www.planet-lab.org:12346) has version: INFO:omni:{ 'code': { 'am_code': None, 'am_type': 'sfa', 'geni_code': 0}, 'geni_api': 2, 'output': '', 'value': { 'code_tag': '2.0-9', 'code_url': 'git://git.onelab.eu/sfa.git@sfa-2.0-9', 'geni_ad_rspec_versions': [ { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], 'namespace': 'http://www.protogeni.net/resources/rspec/2', 'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd', 'type': 'ProtoGENI', 'version': '2'}, { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], 'namespace': 'http://www.geni.net/resources/rspec/3', 'schema': 'http://www.geni.net/resources/rspec/3/ad.xsd', 'type': 'GENI', 'version': '3'}, { 'extensions': [], 'namespace': None, 'schema': None, 'type': 'SFA', 'version': '1'}], 'geni_api': 2, 'geni_api_versions': { '2': 'http://planet-lab.org:12346'}, 'geni_request_rspec_versions': [ { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], 'namespace': 'http://www.protogeni.net/resources/rspec/2', 'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd', 'type': 'ProtoGENI', 'version': '2'}, { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], 'namespace': 'http://www.geni.net/resources/rspec/3', 'schema': 'http://www.geni.net/resources/rspec/3/request.xsd', 'type': 'GENI', 'version': '3'}, { 'extensions': [], 'namespace': None, 'schema': None, 'type': 'SFA', 'version': '1'}], 'hostname': 'quagga.cs.princeton.edu', 'hrn': 'plc', 'interface': 'aggregate', 'sfa': 2, 'testbed': 'myplc', 'urn': 'urn:publicid:IDN++plc'}} INFO:omni: ------------------------------------------------------------ INFO:omni: Completed getversion: Options as run: aggregate: plc framework: pgeni native: True Args: getversion Result Summary: Got version for 1 out of 1 aggregates INFO:omni: ============================================================ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ }}} === List Resources in Omni === Flack goes behind the scenes and call listresources for the AMs that you chose, and draws the resources in a map. In Omni in order to see what is available in each AM you will have to manually invoke listresources. Invoke listresources on utah's ProtoGENI cluster {{{ omni.py getversion -a pg-utah -o }}} The `-o` option will save the output to a file. The filename is chosen by Omni and printed as part of the output. For user gpousr25 this will look like : {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py listresources -a pg-utah -o INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Saving output to a file. INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net/protogeni/xmlrpc/am, URN unspecified_AM_URN INFO:omni:Listed resources on 1 out of 1 possible aggregates. INFO:omni:Writing to 'rspec-www-emulab-net-protogeni.xml' INFO:omni: ------------------------------------------------------------ INFO:omni: Completed listresources: Options as run: aggregate: pg-utah framework: pgeni native: True output: True Args: listresources Result Summary: Retrieved resources from 1 aggregates. Wrote rspecs from 1 aggregates to 1 files Saved listresources RSpec at 'unspecified_AM_URN' to file rspec-www-emulab-net-protogeni.xml; . INFO:omni: ============================================================ }}} === Createslice and listmyslices in Flack === Now you can switch back to the browser and look at the map of resources. Arguably this is a match better representation of the resources than the text file given back by Omni. Under your username on the left there is a button called createslice. This is how you can create new slices in Flack. Create a new slice called "sliceflack##" based on your username. For example gpousr25 should create a slice called "sliceflack25". An empty canvas should open up and under your username there should be at least this new slice. === Createslice and listmyslice in Omni === In order to do the same thing in Omni, you have to invoke the createslice command. Switch to your terminal window and type {{{ omni.py createslice sliceomni## }}} For example user gpousr25 should type : {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py createslice sliceomni25 INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Created slice with Name testomni25, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni25, Expiration 2012-03-13 20:32:02+00:00 INFO:omni: ------------------------------------------------------------ INFO:omni: Completed createslice: Options as run: framework: pgeni native: True Args: createslice sliceomni25 Result Summary: Created slice with Name testomni25, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni25, Expiration 2012-03-13 20:32:02+00:00 INFO:omni: ============================================================ }}} In order to see your active slices with Omni, you will have to use the `listmyslices` command. {{{ omni.py listmyslices gpousr## }}} For user gpousr25, this would look like : {{{ geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py listmyslices gpousr25 INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:User 'gpousr25' has slices: urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceflack25 urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni25 INFO:omni: ------------------------------------------------------------ INFO:omni: Completed listmyslices: Options as run: framework: pgeni native: True Args: listmyslices gpousr25 Result Summary: Found 2 slices for user 'gpousr25'. INFO:omni: ============================================================ }}} Notice how you can see the slice that you created with Flack from Omni as well. If you go back to flack and click the reload button that is next to the Slice under your username on the left you will see that the Omni slice will appear there as well. === Createsliver and sliverstatus === For this part we are going to go back and forth between Omni and Flack and understand how each tool manipulate slices. In Flack go back to the empty canvas on your slice. You will see on the left the AMs that you chose in the beginning . There are some icons next to them to correspond to nodes. You can drag and drop nodes in your canvas. [[Image(flack-addnodes.png, 50%)]] You can press on the (i) button and look at all the information that you can set for your nodes. If you have more than one nodes in your canvas you can draw links between the nodes, and set parameters on that links. On the background Flack is creating the request specification documents that you will need to reserve the resources that are on your slice canvas. If you want to take a look at the RSpec created by flack you have to press at the button on the top right of your canvas that correspond to "Preview Request Rspec". [[Image(flack-preview.png, 50%)]] == 3. Make a ProtoGENI sliver == The first resource we are going to add to our slice is a ProtoGENI host. === 3a. Createsliver === Under the ''Tutorials/Omni/'' directory, there is a directory called ''rspecs'' that has all the necessary RSpecs for the tutorial. For this tutorial we are going to use ProtoGENI hosts from GPO's ProtoGENI, as well as Wide Area ProtoGENI hosts from Utah's ProtoGENI cluster. * If your ProtoGENI host is in the '''emulab.net'''(e.g. pg30.emulab.net), namespace then it belongs to Utah's cluster and you should use Utah's AM (nickname: pg-utah), and use '''rspecs/final/protogeni_utah_.rspec''' * If your ProtoGENI host is in the '''pgeni.gpolab.bbn.com'''(e.g. pc1.pgeni.gpolab.bbn.com), namespace then it belongs to GPO's cluster and you should use GPO's AM (nickname: pg-gpo), and use '''rspecs/final/protogeni_gpo__v02.rspec''' * '''Advanced Option''': If you are interested in creating your own RSpecs follow the instructions under [#ReservingProtoGENInodeswithFlack Reserving ProtoGENI nodes with Flack]. Then skip to the [#a3b.Sliverstatus Next Step]. gpousr21 was assigned host pc1.pgeni.gpolab.bbn.com so she should use pg_gpo.rspec: {{{ #!xml }}} * Now you are ready to reserve your host on the '''appropriate''' AM. For easy access and to be able to copy and paste AM URLs that are used in this tutorial, we made a [#AMURLTable table]. If your node is '''pg46.emulab.net''', you are sharing your node with Alice. Alice has already created the sliver for you, so you can run the 'createsliver' command, and its ok if it fails. {{{ omni.py createsliver -a gposlice## rspecs/final/ }}} The output should look like : {{{ #!xml geni@geni-vm:~/omni_tutorial$ omni.py createsliver -a http://www.emulab.net/protogeni/xmlrpc/am aliceslice rspecs/pg_utah.rspec FILL IN HERE }}} === 3b. Sliverstatus === We asked for an exclusive ProtoGENI host, which means that the node needs to be loaded with the right OS and booted, before our sliver is ready to use. This will take a while. We can check the status of our sliver, using the ''sliverstatus'' call. {{{ omni.py sliverstatus -a gposlice## }}} The status will probably be 'not ready', you can continue with the next steps of the tutorial, and we will come back to this node later. = II. Using Physical Topology to Influence Your Experiment = In this exercise we are going to test and see how the underlying network topology can affect the topology of your experiment. For this exercise we have already setup the networking portion of the exercise, so you just need to reserve your compute resources. == 1. Make a MyPLC sliver == For this exercise you would need to reserve two MyPlc hosts, each in a different AM. Under the rspecs directory (Tutorials/ExptWorkflow/gpousr##/rspecs/) there are the two MyPLC rspecs that you should use. * The name of the rspec is of the form myplc--.rspec. You should take a look in this [#AMURLTable table] to find out what is the nickname for the AM, and try to reserve the sliver. Also open your omni_config file and check how the nicknames are defined. * '''Advanced Option''': If you are interested in creating your own RSpecs follow the instructions under [#CreatingPlanetLabRequestRSpecsfromAdvertisementRSpecs Creating PL Request RSpecs from Ad. RSpecs]. Then skip to the [#a2.Logintothenodes---OmniScripting Next Step]. For example gpousr21 was assigned host bain.gpolab.bbn.com and this is what the rspec looks like: {{{ #!xml }}} * Now you are ready to reserve your host on the '''appropriate''' AM. For easy access and to be able to copy and paste AM URLs and nicknames that are used in this tutorial, we made a [#AMURLTable table]. {{{ omni.py createsliver -a gposlice## rspecs/ }}} The output should look like : {{{ #!xml geni@geni-tutorial:~/Tutorials/ExptWorkflow/gpousr10$ omni.py createsliver sliceomni10 rspecs/final/myplc-gpolab-ganel.rspec -a pl-gpo INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 expires within 1 day on 2011-11-04 06:57:31 UTC INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN INFO:omni:Creating sliver(s) from rspec file rspecs/final/myplc-gpolab-ganel.rspec for slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 INFO:omni:Asked http://myplc.gpolab.bbn.com:12346/ to reserve resources. Result: INFO:omni: INFO:omni: INFO:omni: INFO:omni: ------------------------------------------------------------ INFO:omni: Completed createsliver: Options as run: aggregate: pl-gpo framework: pgeni native: True Args: createsliver sliceomni10 rspecs/final/myplc-gpolab-ganel.rspec Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 expires within 1 day(s) on 2011-11-04 06:57:31 UTC Reserved resources on http://myplc.gpolab.bbn.com:12346/. INFO:omni: ============================================================ }}} Follow the same procedure to reserve your second myPLC host. == 2. Login to the nodes --- Omni Scripting == After reserving the nodes, you are ready to login. When reserving !PlanetLab resources, using a ProtoGENI clearinghouse, the login name that should be used to access the nodes is ''''not'''' the username. The login is listed as part of the sliverstatus call. For common functionality like this that is expected to be used often, omni gives you the capability of writing scripts and including omni as a library. Under the /home/geni/gcf directory there is a folder 'examples' that includes example python scripts that use Omni. One script that is available is the ''readyToLogin.py'' script that will return the exact command for logging-in to your nodes. {{{ readyToLogin -a sliceomni## }}} The script will return the actual command that you would need to use for logging in. For gpousr21 the script would return : {{{ ================================================================================ Aggregate [https://myplc.stanford.edu:12346] has a PlanetLab sliver. of-planet1.stanford.edu's pl_boot_state is: boot Login using: xterm -e ssh -i ./ssh/geni_key pgenigpolabbbncom_gposlice21@bain.gpolab.bbn.com & ================================================================================ }}} '''Note''': If your hosts are in Georgia Tech you would need to use the connection through ops. To do that run {{{ xterm -e ssh -i ssh/geni_key -F ssh/config pgenigpolabbbncom_gposlice##@ & }}} For gpousr21 that would be : {{{ xterm -e ssh -i ssh/geni_key -F ssh/config pgenigpolabbbncom_gposlice21@bain & }}} == 3. Test Different Topologies == The Mesoscale deployment can offer different topologies for communicating between hosts. We have provisioned two different subnets in the Mesoscale infrastructure, each using a different VLAN (one using 3715 and the other 3716). The two subnets that have been provisioned are '''10.42.144.0/24''' on 3715 and '''10.42.149.0/24''' on 3716. First of all let's see how we can figure out the IP of the hosts we reserved : * List all the interfaces on your host. You will see that there are many interfaces of the form eth1.XXXX {{{ /sbin/ifconfig }}} Part of the output would look like : {{{ eth1.1750:42147 Link encap:Ethernet HWaddr 00:B0:D0:E1:6F:78 inet addr:10.42.147.90 Bcast:10.42.147.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth1.1750:42148 Link encap:Ethernet HWaddr 00:B0:D0:E1:6F:78 inet addr:10.42.148.90 Bcast:10.42.148.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 }}} * Figure out the last octet of the IP address of your hosts. The way these MyPLC hosts are setup, is that they have multiple subinterfaces, each configured to be part of a different IP subnet. Almost all subnets in the hosts are in the form of 10.42.Y.0/24. You will notice that for all these subnets, your host has the same last octet. In the example above all the subinterfaces of eth1, will have an IP address that will end in '''90''' (10.42.147.'''90''', 10.42.148.'''90''') * Ping over 3715. After logging in to your hosts, ping from host1 to host2. Assuming that host2 has a last octet of YYY you should: {{{ ping 10.42.144.YYY }}} Notice the RTT on the packets. * Ping over 3716. After logging in to your hosts, ping from one host2 to host1. Assuming that host1 has XXX as it's last octet you should ping {{{ ping 10.42.149.XXX }}} * Notice the RTT on the packets and compare it with the above ping. = III. Run a Layer 2 Experiment = The mesoscale GENI resources are connected on Layer 2, which enables Layer 2, i.e. non-IP, experiments. In this exercise we are going to run a layer 2 ping program, where we are going to send raw Ethernet frames of a custom Ethernet type to a server and receive a reply. Currently MyPLC only supports IP experiments, so we will use our ProtoGENI host which we have reserved in the beginning. * Check that your sliver is ready {{{ omni.py sliverstatus -a }}} If you haven't reserved your own node, then try logging in with your credentials anyway. If you fail please let us know. * If your sliver is ready, login to the node (if your host is '''pg33''', '''pg32''' please read the notes): {{{ ssh -i ./ssh/geni_key @ }}} For Alice, that has reserved node pg46.emulab.net: {{{ ssh -i ./ssh/geni_key alice@pg46.emulab.net }}} '''NOTE 1:''' If your node is '''pg32.emulab.net''' or '''pg33.emulab.net''', you will need to do some extra work to login to the node. The control interface of these nodes is behind a firewall so you will login to your node through 'ops.pgeni.gpolab.bbn.com'. Run {{{ xterm -e ssh -i ./ssh/geni_key gpousr##@ & }}} * Check to see that the software has been downloaded : {{{ [alice@protogeni1 ~]$ pingPlus }}} * Test that the node has been configured correctly. The data interfaces in the ProtoGENI nodes are not configured. The install script that was run when you reserved the node should have configured it for you. {{{ [alice@protogeni1 ~]$ /sbin/ifconfig }}} This should list at least three interfaces, the loopback and the control interface and an interface with a name similar to eth#.#### Verify that the data interface is up : {{{ [alice@protogeni1 ~]$ /sbin/ifconfig }}} and note the name of the data interface, the data interface is the one that has an IP address in the 10.42.149.0/24 subnet: {{{ eth1.1750 Link encap:Ethernet HWaddr 00:1F:29:32:92:4D inet addr:10.42.149.146 Bcast:10.42.149.255 Mask:255.255.255.0 inet6 addr: fe80::21f:29ff:fe32:924d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:118 errors:0 dropped:0 overruns:0 frame:0 TX packets:115 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5428 (5.3 KiB) TX bytes:3482 (3.4 KiB) }}} In this case the name is 'eth1.1750'. * '''Run the Layer 2 Ping.''' We have pre-configured the network to forward along Layer2 packets of Ethernet type listed in your account sheet, so let's try pinging with that. The software that is going to send Layer 2 pings, is called pingPlus. There is a server running at a host with mac address `00:0c:29:7b:c5:b3`. Run the client : {{{ sudo /usr/local/bin/pingPlus 00:0c:29:7b:c5:b3 }}} For Alice the output would be : {{{ [alice@protogeni1 ~/pingPlus]$ sudo /usr/local/bin/pingPlus 00:0c:29:7b:c5:b3 eth1.1750 10136 RQ:'5019+6242' to 00:0c:29:7b:c5:b3. RL:5019+6242=11261 from 00:0c:29:7b:c5:b3. }}} Send a stream of packets, by specifying the number of packets as the last parameter : {{{ sudo ./pingPlus 00:0c:29:7b:c5:b3 10 }}} '''Note:'''If the program is stuck waiting for a reply for more than 1 minute, press '''Ctrl-C''' to exit and try again. Congratulations you ran a Layer two experiment across the country! = IV Using !OpenFlow in mesoscale = Another way to control the path that your packets are taking is with OpenFlow controllers. In this exercise we are going to use an OpenFlow controller that will deflect packets from one server to another one. We will start first by reserving an OpenFlow sliver. == 1. Make an OpenFlow sliver == In the previous step, we have used a pre-configured setup to run our test. We have reserved OpenFlow slivers and we are running some default controllers to route the packets for the above subnets and ethernet types. In this experiment you will reserve an OpenFlow sliver and point it to a controller to route your traffic. For the tutorial purposes we are already running the controller for you. The only thing you will have to do is point your OpenFlow sliver to the running controller. === 1a. !OpenFlow controller === In a typical !OpenFlow experiment, the first step is to figure out where you are going to run your controller. The !OpenFlow controller should be able to accept connections from switches. To make this tutorial simpler we have already setup the controllers that are running on a myPlc host at GPO. In the previous example we have pointed the slivers for subnets 10.42.144.0/24 and 10.42.149.0/24 to an !OpenFlow controller that acts like a layer 2 switch. This is why you were able to ping between your hosts. === 1b. !OpenFlow sliver === Until you have reserved an !OpenFlow sliver, traffic will not be forwarded between your hosts on your assigned subnet. Try pinging between the myPlc hosts from Exercise II but using the subnet that has been assigned to you. For example for Alice that was assigned subnet 133 she would try : {{{ ping 10.42.133.YYY }}} Since there is no OpenFlow sliver configured yet to forward packets in your subnet, ping should fail. '''Ask us to give you a slip of paper with the information about your OpenFlow sliver.''' * Personalize your rspec. There is a sample !OpenFlow rspec, under the rspecs folder ('''rspecs/openflow-tutorial-template.rspec'''), that you would need to modify in order to reserve the flowspace that has been assigned to you. In the beginning of the file there is a list of tags you would need to replace. More specifically * : Your username * : The port that your controller will be listening on on navis.gpolab.bbn.com * : Which core VLAN you are using for your experiment. * : The last octet of the subnet that has been assigned to you * : The ethtype that have been assigned to you for use in this exercise * Create the OpenFlow sliver. The flowspace for the tutorial is managed by a central AM running at GPO : {{{ omni.py createsliver gposliceXX ./rspecs/openflow-tutorial-template.rspec -a of-tut }}} * Try pinging again {{{ ping 10.42..YYY }}} Notice how the first ping packets have higher delay than the subsequent packets. This is because when the first packet goes through, the switches will ask your controller about how to handle the packet. Your controller will install a flow on the switch to handle this and all subsequent packets of the flow. The large delay reflects the roundtrip time between the switch and your controller. Subsequent packets will be forwarded directly by the switch based on the flow that your controller installed and thus their switching will be faster. === 1d. Try the Layer 2 ping using your controller === Try running the Layer 2 ping that you did before but using the that was assigned to you, in your OpenFlow slip. {{{ sudo /usr/local/bin/pingPlus 00:0c:29:7b:c5:b3 }}} = V. Cleanup resources = Although all your reservations, have expiration times, its always good practice to release the resources, after your experiment is over to make them available to other experimenters. === 1. Deletesliver === For each createsliver that you have run, you will need to run deletesliver to release the resources {{{ omni.py deletesliver -a sliceomni## omni.py deletesliver -a sliceflack## }}} For Alice this would look like {{{ # Delete ProtoGENI sliver omni.py deletesliver -a pg-utan aliceslice # Delete MyPLC slivers omni.py deletesliver -a pl-stanford aliceslice omni.py deletesliver -a pl-gpo aliceslice #Delete OpenFlow slivers omni.py deletesliver -a of-tut aliceslice }}} You can not delete your slice. Although this will be cleaned up when it expires, it should be an empty container and thus does not hold up any resources. Congratulations, you have finished the tutorial! Now you are ready to design and run your own experiments. Don't hesitate to [mailto:help@geni.net email us] with any questions you might have. = VI. Fill out the tutorial survey = We love to hear what you think so that we can improve the tutorials in the future. Please complete the [https://docs.google.com/spreadsheet/viewform?formkey=dHpkWWd3UXdFZ0tZa0Q5TkNNb3JOY0E6MA#gid=0 online survey] and get a temporary GENI tatoo! = VI. Get Your Own Account = The accounts, that you used in the above steps will be deactivated after the tutorial. If you do not already have an account at GPO's ProtoGENI cluster, you should get your own account so that you can further experiment with GENI. === 1a. Get a temporary account === To get a temporary account that will be deactivated on March 31st 2012, apply for an account at this page https://www.pgeni.gpolab.bbn.com/joinproject.php3. For Project name use : !GpoTutorial. === 1b. Get a permanent account === If you would like to run your own experiments in this infrastructure, please contact us at [mailto:help@geni.net] to get a permanent account. Look at the [http://trac.gpolab.bbn.com/gcf/wiki/OmniConfigure Omni Configuration page] about how to configure your Omni with your personal info. = Creating PlanetLab Request RSpecs from Advertisement RSpecs = 1. Use Omni to download and save the advertised RSpec from the aggregate you care about. a. In general the command is: {{{ $ omni.py -a -t ProtoGENI 2 -o listresources }}} For example, to get the request RSpec from the MyPLC at the GPO Lab: {{{ $ omni.py -a pl-gpo -t ProtoGENI 2 -o listresources }}} (Version 2 of the AM API renames the ProtoGENI v2 RSpecs as GENI v3 RSpecs so in the near future the command will become: {{{$ omni.py -t GENI 3 -o listresources}}}) b. The output of this command is: {{{ geni@geni-tutorial:~/Tutorials/Omni/gpousr20$ omni.py -a pl-gpo -t ProtoGENI 2 -o listresources INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Saving output to a file. INFO:omni:Substituting AM nickname pl-gpo with URL http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN INFO:omni:Listed resources on 1 out of 1 possible aggregates. INFO:omni:Writing to 'rspec-myplc-gpolab-bbn-com-12346-.xml' INFO:omni: ------------------------------------------------------------ INFO:omni: Completed listresources: Options as run: aggregate: pl-gpo framework: pgeni native: True output: True rspectype: ('ProtoGENI', '2') Args: listresources Result Summary: Retrieved resources from 1 aggregates. Wrote rspecs from 1 aggregates to 1 files Saved listResources RSpec at unspecified_AM_URN to file rspec-myplc-gpolab-bbn-com-12346-.xml. . INFO:omni: ============================================================ }}} 2. Copy and edit the RSpec file. a. Copy the advertisement RSpec file. The new file will become the request RSpec. In general this would be: {{{ cp }}} The value of {{{}}} appears in the Omni summary. In this case we will generate a request for the node "navis": {{{ cp rspec-myplc-gpolab-bbn-com-12346-.xml pl-gpo-navis.rspec }}} b. Edit the request Rspec file: {{{ emacs pl-gpo-navis.rspec & }}} or {{{ vi pl-gpo-navis.rspec }}} c. Edit the {{{}}} tag. i. In the {{{}}} tag, remove the {{{expires}}} and {{{generated}}} attributes. ii. In the {{{}}} tag, change the {{{type="advertisement"}}} attribute to {{{type="request"}}}. iii. In the {{{}}} tag, change 'ad' to 'request' in the schema location. That is, change this: {{{ xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/ad.xsd" }}} To this: {{{ xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd" }}} iv. The {{{}}} tag should now look like this (note that the whitespace has been adjusted for ease of reading): {{{ }}} d. Remove the {{{node}}} tags you do not want to request. i. For example to only reserve the node {{{navis.gpolab.bbn.com}}} remove the following text: {{{ .... .... .... .... }}} ii. At this point the entire file should look like this: {{{ }}} d. Edit the {{{}}} tag you are trying to reserve. i. Remove all {{{}}}, {{{}}}, {{{}}}, and {{{}}} tags which exist from the {{{}}} tag you are trying to reserve. ii. Add the attribute {{{client_id}}} to the {{{}}} tag you are trying to reserve. The value is your choice, so here we will use {{{client_id="navis"}}}. iii. The final request RSpec file should look like this: {{{ }}} e. Save the file. 3. Run rspeclint to verify that the file is correct. If it works, you should see no errors returned by the call. In general, this is: {{{ rspeclint http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd }}} For this example do: {{{ rspeclint http://www.protogeni.net/resources/rspec/2 http://www.protogeni.net/resources/rspec/2/request.xsd pl-gpo-navis.rspec }}} = Reserving ProtoGENI nodes with Flack = These instructions assume you have already created a slice using omni. 1. Login to GPO's ProtoGENI instance with your tutorial credentials a. Click on: https://www.pgeni.gpolab.bbn.com/login.php3 b. Use your GPO tutorial username and password as listed on the sheet of paper you were handed on the way into the tutorial. 2. Login to Flack. a. Open a separate browser window or tab. b. Click on: http://www.protogeni.net c. Scroll down to the large map in the middle of the page. d. Click "Login" e. In the pull down menu in the upper right hand corner select: pgeni.gpolab.bbn.com f. Click "Download" g. Enter the password from the sheet of paper in the box near the bottom. h. Click "OK" in the lower left hand corner. i. You are now logged in. 3. Reserve the ProtoGENI node listed on your sheet of paper. a. For a '''ProtoGENI Utah''' node, do the following: i. In the Resources window on the right, select the button for your slice. A window will open. ii. Click on "utahemulab.cm". iii. Find the node listed on the sheet of paper in the list of nodes on the left. iv. Drag your node onto the blank canvas on the right. v. Click on the blue "i" (Information) icon on the node. vi. Click "Add Install Service" vii. In the two boxes, enter the following filling in your username: "/home/" in "http://192.1.249.166:8383/gec12tutorial_fedora.tar.gz" viii. Click "Add Execute Service" ix. In the box, enter the following filling in your username: "cd /home//config_dir;./install.sh" xi. Confirm Rspec version is set to "2" in the pull-down menu in the upper right hand corner. xi. Click "Apply" '''Note''' : After hitting apply, click on the blue "i" button again, if you can't see the information you entered, then : a. Close this window. b. On your VM open the rspec with your favorite editor, and copy the whole rspec c. On your slice canvas on the top, there is an import button. From the list, choose the "Import from clipboard" option. d. The node should appear on your canvas, press the blue "i" button to verify that it is loaded correctly. xii. Click "Submit" a. For a '''ProtoGENI GPO''' node, do the following: i. In the Resources window on the right, select the button for your slice. A window will open. ii. Click on "bbn-pgeni.cm" (not "bbn-pgeni1.cm", "bbn-pgeni2.cm", or "bbn-pgeni3.cm"). iii. Find the node listed on the sheet of paper in the list of nodes on the left. iv. Drag your node onto the blank canvas on the right. v. Click on the blue "i" (Information) icon on the node. vi. Click "Add Install Service" vii. In the two boxes, enter the following filling in your username: "/home/" in "http://192.1.249.166:8383/gec12tutorial_ubuntu.tar.gz" viii. Click "Add Execute Service" ix. In the box, enter the following filling in your username: "cd /users/ ;sudo /bin/sh ./config_dir/install.sh" x. For the test image, enter: "urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops//UBUNTU1004-STD" xi. Choose Rspec version "0.2" from the pull-down menu in the upper right hand corner. xi. Click "Apply" xii. Click "Submit" 4. Confirm the reserved node is visible via omni. a. If you reserved a '''ProtoGENI Utah''' host, run: {{{ omni.py -a pg-utah -t ProtoGENI 2 listresources }}} b. If you reserved a '''ProtoGENI GPO''' host, run: {{{ omni.py -a pg-gpo -t ProtoGENI 0.2 listresources }}} 5. Note that you can also download the request RSpec from Flack for later use in a AM API client tool like Omni. i. In Flack, click on the magnifying glass in the upper right hand corner. ii. The request RSpec will appear in the window. iii. You can then choose to download the RSpec in a file or copy it to the clipboard. = AM URL Table = || AM || Nickname ||URL || || TUTORIAL AM |||||| || Clemson's MyPLC ||pl-clemson || http://myplc.clemson.edu:12346 || || GPO's ProtoGENI || pg-gpo ||http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am || || GPO's MyPLC || pl-gpo || http://myplc.gpolab.bbn.com:12346 || || GPO's Tutorial OF || of-tut ||https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1|| || Rutgers MyPLC || pl-rutgers || https://plc.orbit-lab.org:12346/ || || Stanford's MyPLC || pl-stanford || https://myplc.stanford.edu:12346 || || Utah's ProtoGENI || pg-utah || http://www.emulab.net/protogeni/xmlrpc/am || || Washington's MyPLC || pl-washington || https://of.cs.washington.edu:12346/ || || Wisconsin's MyPLC ||pl-wisconsin|| https://wings-openflow-1.wail.wisc.edu:12346/ || || OTHER || || || || !PlanetLab ||plc||http://www.planet-lab.org:12346 || || Kentucky's ProtoGENI || pg-ky ||https://www.uky.emulab.net/protogeni/xmlrpc/am ||