Changes between Version 35 and Version 36 of GeniTmixTutorial


Ignore:
Timestamp:
03/01/13 13:44:11 (6 years ago)
Author:
Ben Newton
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GeniTmixTutorial

    v35 v36  
    66
    77
    8 == 1 Install Omni ==
    9 This tutorial will use Omni, which is a command line interface tool for reserving GENI resources.  If you do not already have Omni installed and set up, please follow Step 1 (Configuring Omni with your GENI Account) [wiki:GENIExperimenter/Tutorials/HelloOmni here].  Please note, it may take 30-45 minutes to get Omni installed and configured.  Also note when installing Omni, the ./omni-configure.py script may need to be run from your gcf/src directory, and you may need to create the .ssl subdirectory in your home directory. 
    10 
    11 == 2 Extra Omni Configuration ==
    12 === 2.1 Add gcf/src to path (optional but recommended) ===
    13 Although optional, it will be helpful to add the gcf/src directory to your path and python path.  To do this, replace "/path/to/gcf" in the lines below with the path to your copy of gcf, and add the lines to the end of your .profile file or equivalent.   
    14 {{{
    15 PATH="/path/to/gcf/src:$PATH"
    16 export PYTHONPATH="/path/to/gcf/src:$PATH"
    17 }}}
    18 
    19 Once you have added the lines and saved the file, run
    20 {{{
    21 source .profile
    22 }}}
    23 to setup the path environment variables for this session. This will be done automatically from now on.   
    24 
    25 If you don't make this change, you may need to add python in front of all the omni commands, and call them from within the gcf/src directory.
    26 
    27 === 2.2 Clear Passphrases (optional but recommended) ===
    28 We recommend that you clear the passphrase from your SSL certificate and/or your SSH key that you will use to login to your nodes.  This step is also optional, however, if you don't clear your passphrases some commands will require you to enter your it several times, which can become burdensome.  To clear the passphrases from your certificate and key run this script:
    29 
    30 {{{
    31 clear-passphrases.py
    32 }}}
     8== 1 Reserve Resources in Omni or GENI Portal ==
    339
    3410
    35 == 3 A Simple Tmix Experiment ==
    36 
    37 === 3.1 Reserve Resources ===
    38 The following is the request rspec for a simple two node network.  It requests two raw nodes named left and right, each with a single interface named left:if0 and right:if0 respectively. A link named left-right-lan connects these interfaces.
    39 {{{
    40 <rspec type="request"
    41     xmlns="http://www.geni.net/resources/rspec/3"
    42     xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1"
    43     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    44     xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1"
    45     xsi:schemaLocation="http://www.geni.net/resources/rspec/3
    46     http://www.geni.net/resources/rspec/3/request.xsd"> 
    47   <node client_id="left" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" exclusive="true">
    48     <sliver_type name="raw-pc">
    49       <disk_image name="urn:publicid:IDN+emulab.net+image+pgeni-gpolab-bbn-com//tmixUbuntu"/> 
    50     </sliver_type>
    51     <services>
    52         <execute command="/local/tmix-script.sh" shell="sh"/>     
    53         <install install_path="/local" url="http://www.cs.unc.edu/~bn/tmix-script.tar.gz"/>
    54     </services>
    55     <interface client_id="left:if0">
    56       <ip address="10.1.1.1" netmask="255.255.255.0" type=""/>
    57     </interface>
    58   </node>
    59   <node client_id="right" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" exclusive="true">
    60     <sliver_type name="raw-pc">
    61       <disk_image name="urn:publicid:IDN+emulab.net+image+pgeni-gpolab-bbn-com//tmixUbuntu"/>
    62     </sliver_type>
    63     <services>
    64 http://groups.geni.net/geni/attachment/wiki/GeniTmixTutorial/tmix-script.tar.gz?format=raw
    65         <execute command="/local/tmix-script.sh" shell="sh"/>     
    66         <install install_path="/local" url="http://www.cs.unc.edu/~bn/tmix-script.tar.gz"/>
    67     </services>
    68     <interface client_id="right:if0">
    69       <ip address="10.1.1.2" netmask="255.255.255.0" type=""/>
    70     </interface>
    71   </node>
    72   <link client_id="left-right-lan">
    73     <component_manager name="urn:publicid:IDN+emulab.net+authority+cm"/>
    74     <interface_ref client_id="left:if0"/>
    75     <interface_ref client_id="right:if0"/>
    76     <property source_id="left:if0" dest_id="right:if0"/>
    77     <property source_id="right:if0" dest_id="left:if0"/>
    78     <link_type name="lan"/>
    79   </link>
    80 </rspec>
    81 }}}
    82 
    83 Think of a unique name for your slice.  We recommend the slice name begin with your GENI username. 
    84 Create a new slice by issuing the following command with your unique slice name in place of <sliceName>.
    85 {{{
    86 omni.py createslice <sliceName>
    87 }}}
    88 Next, create a sliver with the resources requested in the rspec by issuing the following command where <sliceName> is again replaced with the unique slice name you have chosen. 
    89 {{{
    90 omni.py -a pg-utah <sliceName> two-nodes-tmix.rspec
    91 }}}
    92 Note: this and future steps assume your ~/.gcf/omni_config includes a mapping from nickname pg-utah to https://www.emulab.net:12369/protogeni/xmlrpc/am. If pg-utah causes issues, you can use the full url in the -a option.
    93 
    94 If the resources were successfully reserved the {{{Result Summary}}} from Omni should say: Got Reserved resources ...
    95 If there was an error you will see something like "Failed CreateSliver".
    96 
    97 Look back further in the output and you should see two lines which include "hostname=pc???.emulab.net".  These are the hostnames of the machines reserved for your experiment.  Make note of these hostnames for later use.   
    98 
    99 In addition to listing desired resources, the rspec also specifies a script to be run at boot time on the host.  This script configures the host for Tmix.
    100 
    101 === 3.2 Login to nodes ===
     11== 2 Login to nodes ==
    10212We suggest you now open two new terminal windows, one for each node. 
    10313To log into the nodes reserved in the previous step issue the following command for each node in one of the new windows. 
     
    10919It will take several minutes (likely around 7 minutes) for the requested hosts to be imaged, and fully boot.  If you are unable to login keep trying every couple of minutes. 
    11020
    111 === 3.3 Run Tmix ===
     21== 3 Run Tmix ==
    11222Make yourself root and move to the tmix directory by issuing the following commands on both nodes:
    11323{{{
     
    13242You will see Running for ???? seconds once tmix has started.
    13343
    134 === 3.3 Delete sliver ===
     44== 4 Delete sliver ==
    13545Once your experiment is complete and you have collected your results, you should return the reserved resources.  To do this, execute the following command:
    13646{{{