Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/RunHelloOmni


Ignore:
Timestamp:
01/26/15 13:44:54 (9 years ago)
Author:
rrhain@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/RunHelloOmni

    v1 v1  
     1
     2
     3[[PageOutline]]
     4= Hello Omni =
     5
     6{{{
     7#!html
     8<table border="0" >
     9 <tr>
     10    <td width="350" valign="top">
     11<h3 align="left"> <u>Overview: </u> </h3>
     12Welcome to GENI. This page will guide you through your first GENI experiment. <br>This is a very simple tutorial with one server and one client that are connected with a Layer 2 link. <br>
     13<img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/HelloGENIOverviewDiag.png?format=raw" alt="Hello GENI topology"  align="center" height="65" title="Hello GENI topology" />
     14     </td>
     15 <td> <pre>   </pre> </td>
     16    <td width="350" valign="top">
     17<h3 align="left"> <u>Prerequisites: </u></h3>
     18 For this tutorial you need an active GENI account. If you don't have an account yet <a href="http://groups.geni.net/geni/wiki/SignMeUp"> sign up! </a>
     19
     20    </td>
     21  </tr>
     22  <tr>
     23    <td width="350" valign="top">
     24<h3 align="left"> <u>Tools: </u></h3>
     25All the tools will already be installed at your nodes. For your reference we are going to use:
     26     <ul>
     27       <li> The <a href="http://httpd.apache.org/" target="_blank"> Apache HTTP server </a> and the <a href="http://www.gnu.org/software/wget/" target="_blank"> wget utility </a> </li>
     28       <li> The <a href="http://en.wikipedia.org/wiki/Iperf " target="_blank"> iperf utility </li>
     29      </ul>
     30     </td>
     31 <td> <pre>   </pre> </td>
     32    <td width="350" valign="top">
     33    <h3 align="left"> <u>Where to get help: </u></h3>
     34      For problems with omni please subscribe/email to the <a href="http://lists.geni.net/mailman/listinfo/omni-users" target="_blank"> omni users mailing list </a>
     35      For any questions or problem with the tutorial please email <a href="mailto:help@geni.net?Subject=Help%20with%20HelloGENI%20tutorial"> help@geni.net </a>
     36    </td>
     37  </tr>
     38</table>
     39}}}
     40
     41== Step-by-step Instructions ==
     42
     43{{{
     44#!html
     45<table  border="0" cellpadding="0" cellspacing="0">
     46  <tr>
     47     <td valign="top" align="left">
     48        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/design.png?format=raw" width="150" alt="Design/Setup"></a>
     49      </td>
     50      <td>
     51         <h3><u> Step 1: Configure Omni: </u></h3>
     52         If this is the first time you are using Omni, you will need to download, install and configure it first by following these instructions:
     53           <table border="0">
     54   
     55      <tr>
     56       <td>
     57        <a href="[http://trac.gpolab.bbn.com/gcf/wiki/Omni" target="Omni">
     58<img border="0" src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Omni/omni-pic.png" alt="Omni web page"  height="120" title="Omni command line tool" />  </a>
     59       </td>
     60       <td >
     61         <ol type="a">
     62            <li><b> Download </b> <a href="http://trac.gpolab.bbn.com/gcf/wiki/GettingGcf"> the latest release of Omni. </a>. The Omni client is part of the <a href="http://trac.gpolab.bbn.com/gcf/wiki"> GENI Control Framework</a> (GCF) software package. </li>
     63            <li> <b> Install </b> GCF/Omni by following <a href="http://trac.gpolab.bbn.com/gcf/wiki/QuickStart" target="_blank"> these instructions </a></li>
     64            <li>  <b> Configure </b>  Omni using <a href="http://trac.gpolab.bbn.com/gcf/wiki/OmniConfigure/Automatic" target="_blank"> these instructions </a>. For the rest of the instructions, it is assumed that you followed the default configuration of omni. If you have customized it in any way, please adjust the instructions accordingly.
     65          </ol>
     66       </td>
     67 
     68    </tr>
     69 </table>
     70     <ol type="a" start="4">
     71        <li>  <b>Verify that you have the necessary credential and key files </b>. Run: <br>
     72<code>
     73     ls ~/.ssh ~/.ssl
     74</code> <br>
     75     According to what type of account you have, the output varies slightly. For example if you have an account at the <a href="http://portal/geni.net" target="_blank" >GENI Experimenter Portal </a> the output looks like : <br>
     76<code>
     77geni@geni-vm:~$ ls ~/.ssh ~/.ssl <br><br>
     78/home/geni/.ssh: <br>
     79geni_cert_portal_key      geni_key_portal    <br> 
     80geni_cert_portal_key.pub  geni_key_portal.pub <br><br>
     81
     82/home/geni/.ssl:<br>
     83geni_cert_portal.pem<br>
     84</code> <br> <br>
     85
     86    <table border="1">
     87       <caption> Files under ~/.ssh and ~/.ssl if omni is configured with a portal account </caption>
     88      <tr><td>geni_cert_portal.pem </td><td> Cleartext certificate, i.e. does not require any passphrase </td></tr>
     89      <tr><td>geni_key_portal, geni_cert_portal_key</td><td> Private keys that you can use to login to the nodes </td></tr>
     90   <tr><td>geni_key_portal.pub, geni_cert_portal_key.pub </td><td>The corresponding public keys that will be uploaded to the nodes </td></tr>
     91    </table><br>
     92
     93   <b>Note:</b> Depending on the setup of your host you might see more files than the ones listed above.
     94    </li>
     95 
     96   <li> <b>Optional - Look around the omni_config file </b><br>
     97   Open the file <code>~/.gcf/omni_config</code> using either vim or emacs. Close to the top of the file you will see two parameters called <code>default_cf</code> and <code>users</code>. Your username should be at least listed in the <code>users</code> section. Look for the sections in the file that are named <code>&lt default_cf &gt</code> and  <code>&lt username &gt</code>. <br><br>
     98   
     99   In the <code>&lt username &gt</code> section, the information need for logging-in to reserved compute resources is provided. It includes your unique user URN and at least one public key that would be uploaded to the hosts that you reserve.<br><br>
     100
     101   In the <code>&lt default_cf  &gt</code> section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from the Clearinghouse where you have a GENI Account. <br><br>
     102</li>
     103</ol>
     104       
     105     <h3><u> Step 2: Launch your experiment: </u></h3>
     106               Now that you have configured Omni we are ready to design our experiment, which going over most of the Omni commands.
     107<ol type="a">
     108  <li><b>Create a slice</b>. The first thing to do when preparing to run a GENI experiment is to create a slice. Name your slice something like <b>xxxomni</b> (where xxx are your initials). Your slicename in general should be something memorable but <b>not</b> your username. Type:<br>
     109  <code>
     110  omni.py createslice &lt slicename &gt
     111  </code><br>
     112  </li>
     113  <li><b>Verify that your slice was created</b>. Use the <code>listmyslices</code> command, of omni: <br>
     114  <code>
     115  omni.py listmyslices &lt username &gt
     116  </code> </li>
     117   <li><b>Renew your slice</b>. To extend the lifetime of your slice. Type:<br>
     118   <code>
     119  omni.py renewslice &lt slicename &gt &lt YYYYMMDD &gt
     120    </code> <br>
     121  The slice lifetime is typically short and when your slice expires, all reserved resources at the time are also released. <b>Note</b>: your resources might have a shorter lifetime than your slice.
     122   </li>
     123   
     124  <li><b> See available resources.</b> For this experiment we are going to use the Aggregate manager of Nysernet.  In order to see what each AM offers you can use the <code>listresources</code> command. Type:<br>
     125   <code>
     126 omni.py listresources -a nysernet-ig -o
     127 </code><br>
     128   The <code>-o</code> option will save the output to a file. The filename is chosen by Omni and printed as part of the output. The output will look like : <br>
     129   <code>
     130geni@geni-VirtualBox:~$ omni.py listresources -a nysernet-ig -o<br>
     13120:13:35 INFO    : Loading agg_nick_cache file '/home/rrhain/.gcf/agg_nick_cache'<br>
     13220:13:35 INFO    : Loading config file '/home/rrhain/.gcf/omni_config'<br>
     13320:13:35 INFO    : Using control framework portal<br>
     13420:13:35 INFO    : Member Authority is https://ch.geni.net/MA (from config)<br>
     13520:13:35 INFO    : Slice Authority is https://ch.geni.net/SA (from config)<br>
     13620:13:35 INFO    : Substituting AM nickname nysernet-ig with URL https://instageni.nysernet.org:12369/protogeni/xmlrpc/am/2.0, URN urn:publicid:IDN+instageni.nysernet.org+authority+cm<br>
     13720:13:36 INFO    : Saving output to a file.<br>
     13820:13:38 INFO    : Listed advertised resources at 1 out of 1 possible aggregates.<br>
     13920:13:38 INFO    :  (PG log url - look here for details on any failures: https://www.instageni.nysernet.org/spewlogfile.php3?logfile=889fd9841968d3b891afc5b2cc36bd94)<br>
     14020:13:38 INFO    : Writing to 'rspec-instageni-nysernet-org.xml'<br>
     14120:13:38 INFO    :  ------------------------------------------------------<br>
     14220:13:38 INFO    :  Completed listresources:<br>
     143<br>
     144<pre>
     145  Options as run:<br>
     146                aggregate: ['nysernet-ig']
     147                framework: portal
     148                output: True
     149                project: tutorial
     150</pre>
     151<br>
     152  Args: listresources<br>
     153<br>
     154  Result Summary: Queried resources from 1 of 1 aggregate(s).<br>
     155Wrote rspecs from 1 aggregate(s) to 1 file(s)<br>
     156Saved listresources RSpec from 'urn:publicid:IDN+instageni.nysernet.org+authority+cm' (url 'https://instageni.nysernet.org:12369/protogeni/xmlrpc/am/2.0') to file rspec-instageni-nysernet-org.xml;<br> 
     15720:13:38 INFO    :  ======================================================<br>
     158</code><br>
     159  In the last line of the output Omni will tell you the name of the file that output is saved at. In the example above this would be <code>rspec-instageni-nysernet-org.xml</code>. This file is a <a href="http://groups.geni.net/geni/wiki/GENIExperimenter/RSpecs" target="_blank">  SPECification document(RSpec) </a>, and in particular an advertisement rspec. Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like. In order to see only available resources type:<br>
     160  <code>
     161  omni.py listresources -a nysernet-ig --available -o
     162  </code></li>
     163  <li><b>Reserve resources</b> To be able to reserve resources you will need to craft a <a href="http://groups.geni.net/geni/wiki/GENIExperimenter/RSpecs" target="_blank">  request rspec</a>. For this example we have created the rspec and post it on the web for you to use. If you want to take a look to the rspec itself, you can directly visit the rspec URL. Type:<br>
     164  <code>
     165    omni.py createsliver -a nysernet-ig &lt slicename &gt http://www.gpolab.bbn.com/experiment-support/HelloGENI/hellogeni.rspec
     166  </code></li>
     167  <li><b>See the reserved resources</b>. You can use the <code>listresources</code> command, to see what resources are reserved at an Aggregate. <br>
     168  <code>
     169   omni.py listresources -a nysernet-ig &lt slicename &gt
     170  </code></li>
     171  <li><b>Optional- Extend the lifetime of your reservation</b>.  The lifetime of your reservation can never exceed the lifetime of your slice and is usually set to a default value. For the purpose of this exercise you don't need to renew your reservation. <b>Note</b> After reserving your resources, renewing your slice <b>will not</b> automatically renew your slivers, so you will have to manually renew them if you decide you need them longer. If you wanted to do this, the command would look like:<br>
     172   <code>
     173omni.py renewsliver -a nysernet-ig &lt slicename &gt  &lt YYYYMMDD &gt
     174  </code></li>
     175<li><b>Check the status of your resources</b>. Type:<br>
     176
     177   <code>
     178  omni.py sliverstatus -a nysernet-ig  &lt slicename &gt
     179  </code><br>
     180  The <code>sliverstatus</code> command reports the status of each individual resource that you reserved as well as the status of your overall GENI sliver. The status reported usually reflects the status of your resource, for example if you hav reserved a host, then status <code>ready</code> means that the host is booted and ready, i.e. you can login to it. When the status is <code>ready</code> for the whole sliver, in the summary of the output there will be something like:
     181  <code> ... has overall SliverStatus: ready...</code>
     182  When you see this you are ready to continue to the next step.
     183   </li></ol>             
     184                 
     185          </td>
     186       </tr>
     187</table>
     188}}}
     189
     190{{{
     191#!html
     192<table  border="0" cellpadding="0" cellspacing="0">
     193  <tr>
     194     <td valign="top" align="left">
     195        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/execute.png?format=raw" height="150" alt="Execute"></a>
     196      </td>
     197      <td>
     198         <h3><u> Step 3: View Results: </u></h3>
     199         For this example experiment we used the install script facility to automatically install the necessary software and kick-off the experiment. In this very simple setup, we have installed and launched a
     200<a href="[http://en.wikipedia.org/wiki/Web_server" target="_blank"> web server </a> as well as an <a href="http://en.wikipedia.org/wiki/Iperf" target="_blank"> iperf server</a>, on the server host. On the client, we have started some processes to test both of these services. To view the results of this experiment:
     201            <table border="0">
     202              <tr>
     203                <td >
     204                 <ol type="a">
     205            <li> Follow <a href="http://groups.geni.net/geni/wiki/HowTo/LoginToNodes" target="_blank"> these instructions</a> and log in to the server node.  Get the control interface IP address by typing <b> ifconfig</b>. This IP address should be accessible from the internet. In a web browser, type the IP address found from <b>ifconfig</b>.</li>
     206            <li> Click the <b>Web Server Statistics</b> link to look at statistics. Refresh the page a couple of times to see how the statistics change as the client requests documents.</li>
     207            <li> Click the <b>Logs from the iperf Server</b> link to see the statistics from the iperf transfers.</li>
     208           </ol>
     209                </td>
     210     
     211             </tr>
     212           </table>
     213              <h3><u> Optional Step 4: Manually generate traffic: </u></h3>
     214             While conducting experiments in GENI, you will often want to run commands directly on the nodes. In this optional step, you will log in to a node and issue commands directly to it.
     215              <ol type="a">
     216                 <li>  Follow <a href="http://groups.geni.net/geni/wiki/HowTo/LoginToNodes" target="_blank"> these instructions</a> and log in to the client node </li>
     217                 <li> When you have successfully logged in, run this command:<br>
     218<code>
     219iperf -c server -P 2
     220</code> <br>
     221    This task shouldn't take more than 30 seconds. Change the number after the ` -P ` argument and watch how the performance is affected while you change the number of parallel TCP connections.
     222     </li>
     223   <li> Scroll all the way down the server iperf log, and look at the logs for your transfers. </li>
     224   </ol>
     225                     
     226          </td>
     227       </tr>
     228</table>
     229}}}
     230
     231{{{
     232#!html
     233<table  border="0" cellpadding="0" cellspacing="0">
     234  <tr>
     235     <td valign="top" align="left">
     236        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/finish.png?format=raw"  width="150" alt="Execute"></a>
     237      </td>
     238       <td>
     239              <h3><u> Step 5: Cleanup experiment: </u></h3>
     240           After you are done with your experiment, you should always release your resources so that other experimenters can use
     241the resources. In order to cleanup your slice, type :<br>
     242<code>omni deletesliver -a  nysernet-ig &lt slicename &gt </code><br>
     243Wait and after a few moments all the resources will have been released. Notice that your slice is still there. There is no way to delete a slice, it will be removed automatically after its expiration date, but remember that a slice is just an empty container so it doesn't take up any resources.
     244
     245                     
     246          </td>
     247       </tr>
     248</table>
     249}}}
     250
     251=  What's next? =
     252Congratulations! You have finished your first GENI Experiment. Now that you are more familiar with GENI concepts you can:
     253  * continue with more [wiki:GENIExperimenter/Tutorials advanced tutorials]
     254  * learn more about how to use Jacks by following the [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartI/Procedure A First Experiment Using GENI and Jacks Tool]
     255  * start with your own experiment. This tutorial showed you the basic steps for running an experiment. Use Jacks to create your own topology, take a look at the [wiki:HowTo/WriteInstallScript instructions about how to write your own install scripts] to automate your expriment.