Changes between Initial Version and Version 1 of GENIEducation/SampleAssignments/Template/ExerciseLayout/DesignSetup

05/02/13 11:31:29 (8 years ago)



  • GENIEducation/SampleAssignments/Template/ExerciseLayout/DesignSetup

    v1 v1  
     1= [wiki:GENIEducation/SampleAssignments/Template/ExerciseLayout <EXERCISE TITLE>] =
     4<table border="0">
     6      <tr>
     7         <td>
     8         <a href=""> <img border="0" src="" alt="Hello GENI index"  height="90" title="Hello GENI Web server" />  </a>
     9       </td>
     10       <td>
     11         <a href=""> <img border="0" src="" alt="Hello GENI index"  height="90" title="Hello GENI Web server" />  </a>
     12       </td>
     13       <td>
     14         <a href=""> <img border="0" src="" alt="Hello GENI index"  height="90" title="Hello GENI Web server" />  </a>
     15       </td>
     16     </tr>
     17 </table>
     20= Configure and Initialize Services:Configure Omni =
     24<table border="0">
     25     <tr>
     26         <td>  <img border="0" src="" alt="Omni Client" width="100"/> <br/>
     27        </td>
     28        <td> <pre>   </pre> </td>
     30         <td> Omni is a tool that will help you reserve resources in GENI, using your GENI
     31credentials. The first step is to load into Omni your information.
     32Omni uses a configuration file, and there is a script that will automatically generate the file with
     33some default options and place it in the default place of `~/.gcf/`. 
     34  </td>
     35        <td> <pre>   </pre> </td>
     36    </tr>
     37 </table>
     43<table border="0">
     44     <tr>
     47Follow these steps:
     49  <li> In the GENI Portal, go to the `Profile` Tab. </li>
     50  <li> Scroll all the way to the end of the page, to the section titled ''Configure omni'' </li>
     51  <li> Click on the ''customized configuration data'' link </li>
     52  <li> If this is the <b> first time </b> you do  this:
     53   <ol type="a">
     54       <li> Press the <b> generate an SSL Cert</b> link </li>
     55       <li> Make sure you choose the first option </li>
     56   </ol>
     57  <li> In the next page, make sure you choose as your project, the project you just joined and click the ''Download omni bundle'' button, and select to save it.</li>
     58  <li> Open a terminal window </lo>
     59  <li> Run: <ul><li><code> -f portal </code></li></ul> </li>
     60 </ol>
     62       <td> <pre>   </pre> </td>
     63  <td>  <img border="0" src="" alt="Generate SSL cert" width="300"/>
     64        </td>
     65        <td> <pre>   </pre> </td>
     66    </tr>
     67 </table>
     71The output should look like:
     72  {{{
     73geni@GEC16-Tutorials:~$ -f portal
     74{'portal_bundle': '~/Downloads/', 'verbose': False, 'cert': '~/.ssl/geni_cert', 'framework': 'portal', '
     75configfile': '~/.gcf/omni_config', 'plkey': '~/.ssh/geni_pl_key', 'prkey': '~/.ssh/geni_key', 'pick_project': False}
     76INFO:omniconfig:Using configfile: /home/geni/.gcf/omni_config
     77INFO:omniconfig:Using portal bundle /home/geni/Downloads/
     78INFO:omniconfig:Private key stored at: /home/geni/.ssh/geni_key
     79INFO:omniconfig:Wrote omni configuration file at: /home/geni/.gcf/omni_config
     80geni@GEC16-Tutorials:~$ -f portal
     83== Look around the omni_config file  ==
     84Open the file `~/.gcf/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 `[pgch]` and  `[<username>]`.
     86In the `[<username>]` section, the information need for logging-in to reserved compute resources are provided. It includes your unique user URN and a public key that would be uploaded to the hosts that you reserve.
     88In the `[pgch]` 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 portal.
     90Another 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 gets a chance to provide short descriptive names to the URLs that are easier to memorize and use.
     92== Test Omni setup ==
     93In order to test that our configuration is correct, you can issue a `getversion`
     94command. For this step we have used ProtoGENI's AM, but you can use any
     95Aggregate Manager(AM).
     96  i. In the terminal type:
     97  {{{ getversion -a ig-gpo
     100  In GENI each AM can be contacted using a specific URL. In order to make it
     101  easier to talk to AMs, Omni uses nicknames; i.e. it maps each URL into an easy
     102  to remember nickname.  Nicknames are defined in each user's omni_config file.
     104  For the rest of the tutorial we are going to use aggregate nicknames.
     106=  Obtain Resources =
     107In this step we are going to setup a sample GENI experiment, in order to
     108get familiarized with most of the Omni commands.
     110== Create and renew a slice ==
     111The first thing to do when preparing to run a GENI experiment is to create a
     113  i. To create a slice type, use as `<slicename>` omniXXX, where XXX are your initials. :
     114  {{{
     115 createslice <slicename>
     116  }}}
     117  ii. To verify that your slice has been created and in general to keep track of
     118  your slices, use the `listmyslices`. You can figure out your username under the `Profile` tab. Type:
     119  {{{
     120 listmyslices <username>
     121  }}}
     122  iii. Renew your slice. To extend the lifetime of your slice type:
     123  {{{
     124 renewslice <slicename> YYYYMMDD
     125  }}}
     127==  Reserve resources, a.k.a create a sliver ==
     128The next step in a GENI experiment is to actually reserve resources. For this
     129experiment we are going to use the Aggregate manager of ProtoGENI in Utah.
     130  i. In Omni in order to see what each AM offers you can use the
     131  `listresources` command. Type:
     132   {{{
     133 listresources -a pg-utah -o
     135  The `-o` 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 :
     136  {{{
     137geni@GEC16-Tutorials:~$ listresources -a pg-utah -o
     138INFO:omni:Loading config file /home/geni/.gcf/omni_config
     139INFO:omni:Using control framework portal
     140INFO:omni:Substituting AM nickname pg-utah with URL, URN unspecified_AM_URN
     141INFO:omni:Saving output to a file.
     142INFO:omni:Substituting AM nickname pg-utah with URL, URN unspecified_AM_URN
     143INFO:omni:Listed advertised resources at 1 out of 1 possible aggregates.
     144INFO:omni:Substituting AM nickname pg-utah with URL, URN unspecified_AM_URN
     145INFO:omni: (PG log url - look here for details on any failures:
     146INFO:omni:Writing to 'rspec-www-emulab-net-protogeniv2.xml'
     147INFO:omni: ------------------------------------------------------------
     148INFO:omni: Completed listresources:
     150  Options as run:
     151                aggregate: ['pg-utah']
     152                framework: portal
     153                output: True
     154                project: SampleClass
     156  Args: listresources
     158  Result Summary: Queried resources from 1 of 1 aggregate(s).
     159Wrote rspecs from 1 aggregate(s) to 1 file(s)
     160Saved listresources RSpec at 'unspecified_AM_URN' (url '') to file rspec-www-emulab-net-protogeniv2.xml;  (PG log url - look here for details on any failures:
     161INFO:omni: ============================================================
     163  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 `rspec-www-emulab-net-protogeniv2.xml`. Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like.
     164  In order to see only available resources type
     165  {{{
     166 listresources -a pg-utah --available -o
     167  }}}
     168  i. To be able to reserve resources you will need to craft a request rspec.
     169  For this example we have created the rspec for you, use this rspec URL :[[BR]]
     170 . Type :
     171  {{{
     172 createsliver -a pg-utah <slicename> <rspec_url>
     173  }}}
     175  i. Look at your reserved resources. Type:
     176  {{{
     177 listresources -a pg-utah <slicename>
     178  }}}
     179  i. Extend the lifetime of your sliver:
     180  {{{ renewsliver -a pg-utah <slicename> YYYYMMDD
     182  }}}
     183  i. Check the status of your resources. Type:
     184  {{{
     185 sliverstatus -a pg-utah <slicename>
     186  }}}
     187  The `sliverstatus` command reports the status of your overall GENI slice. When
     188  the status is ready we are ready to continue to the next step.
     190= [wiki:GENIExperimenter/Tutorials/NSDI13/IntroToOmni/Execute Next: Run Experiment] =