Changes between Version 1 and Version 2 of GEC15Agenda/IntroToOmni/Instructions


Ignore:
Timestamp:
10/16/12 00:27:41 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC15Agenda/IntroToOmni/Instructions

    v1 v2  
    11[[PageOutline]]
    22
    3 = 1. Using Omni =
    4 == 1a. Configure Omni ==
    5 In order to configure Flack, you needed to login to your account in Emulab and instruct Flack to load your user information (certificate and public keys).
    6 For Omni we need to do something similar. Omni uses a configuration file, and there is a script that will automatically generate the file with
    7 some default options and place it in the default place of ~/.gcf/.
    8 
    9 Go back to your browser, and go to the ProtoGENI WebUI tab. On the left of your screen, there should be a link "Download your cert".
    10 
    11 [[Image(download_cert.png)]]
    12 
    13 Click on that and select the option about downloading as a pem file.
    14 Press '''`Ctrl-s`''' to save this page. Save it under ~/.ssl/geni_cert.pem. You will need to type the path, instead of navigating to the folder.
    15 
    16 [[Image(save_cert.png, 40%)]]
    17 
    18 Open a terminal window and type :
    19 {{{
     3[[PageOutline]]
     4
     5= Prework =
     6Before we start with the Omni tutorial, please follow these steps:
     7  a. Login to the VM
     8  a. Run Firefox
     9  a. Open all bookmarks under the Intro to Omni bookmark folder
     10  a. Open a terminal window
     11
     12= 1. Configure Omni =
     13Omni is a tool that will help you reserve resources in GENI, using your GENI
     14account. The first step is to load into Omni your account information.
     15Omni uses a configuration file, and there is a script that will automatically generate the file with
     16some default options and place it in the default place of `~/.gcf/`. Follow
     17these steps:
     18 a. In the web browser login to `www.pgeni.gpolab.bbn.com` using the information
     19 in the paper slip
     20 a. On the menu on the left, press `Download your cert` [[Image(download_cert.png)]]
     21 a. Select the option about downloading as a pem file.
     22 a. Press '''`Ctrl-s`''' to save this page. Type `~/.ssl/geni_cert.pem` [[Image(save_cert.png, 40%)]]
     23 a. In the terminal type:
     24  {{{
    2025omni-configure.py
    2126}}}
    22 This should configure your Omni, with your downloaded certificate and create an ssh key pair for logging in to nodes.
    23 When prompted for a passphrase, type the same passphrase you used in Flack. You might be asked for a passphrase
    24 multiple times.
    25 
    26 The output should look like:
    27 {{{
     27  This should configure your Omni, with your downloaded certificate and create an ssh key pair for logging in to nodes.
     28When prompted for a passphrase, type the passphrase in your slip. You might be asked for a passphrase
     29multiple times. '''Note:''' If you have taken other tutorials, you might have
     30configured omni with other accounts, select to overwrite existing setting if
     31asked
     32
     33  The output should look like:
     34  {{{
    2835geni@geni-vm:~$ omni-configure.py
    2936{'framework': 'pg', 'configfile': '~/.gcf/omni_config', 'plkey': '~/.ssh/geni_pl_key', 'cert': '~/.ssl/geni_cert', 'verbose': False}
     
    5158Another 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.
    5259
    53 == 1b. Clear the passphrase from your cert ==
    54 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 and your ssh key. There is a script to clear the passphrases. Run :
    55 {{{
     60= 2. Clear the passphrase from your cert =
     61When Omni talks to different authorities in GENI, it will need to identify you
     62as a valid GENI user, so it will ask you for your passphrase multiple times.
     63Omni 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 and your ssh key. There is a script to clear the passphrases.
     64  a. In the terminal run
     65  {{{
    5666clear-passphrases.py
    5767}}}
    5868
    59 Use the same passphrase(password) as in Flack, you might be prompted for a passphrase multiple times make sure you always use the same passphrase.
    60 
    61 The output should look like
    62 {{{
     69  Use the passphrase given to you in the paper slip, you might be prompted for a passphrase multiple times make sure you always use the same passphrase.
     70
     71  The output should look like
     72  {{{
    6373geni@geni-vm:~$ clear-passphrases.py
    6474Do you want to remove the passphrase from your cert (/home/geni/.ssl/geni_cert.pem) [Y,n]?y
     
    7989}}}
    8090
    81 Verify that you have the necessary credential and key files
     91  b. Verify that you have the necessary credential and key files
    8292     {{{
    8393     ls ~/.ssh ~/.ssl
     
    98108   || geni_key.pub || The corresponding public key that will be uploaded to the nodes ||
    99109
    100 == 1c. Test Omni setup ==
    101 In order to test that our configuration is correct, you can issue a getversion
     110== 3. Test Omni setup ==
     111In order to test that our configuration is correct, you can issue a `getversion`
    102112command. For this step we have used !PlanetLab's AM, but you can use any
    103113Aggregate Manager(AM).
    104 {{{
    105 omni.py getversion -a http://www.planet-lab.org:12346
    106 }}}
    107 
    108 Or equivalently using the !PlanetLab nickname:
    109 {{{
     114  a. In the terminal type:
     115  {{{
    110116omni.py getversion -a plc
    111117}}}
    112 
    113 For the rest of the tutorial we are going to use aggregate nicknames.
    114 == 1d. Omni Commands ==
    115 
    116 === Listresources in Omni ===
    117 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
    118 {{{
     118  In GENI each AM can be contacted using a specific URL. In order to make it
     119  easier to talk to AMs, Omni uses nicknames; i.e. it maps each URL into an easy
     120  to remember nickname. For example the PlanetLab AM listens for requests at
     121  `http://www.planet-lab.org:12346`, however you can use the nickname `plc` to
     122  refer to that URL. Nicknames are defined in each user's omni_config file.
     123
     124  For the rest of the tutorial we are going to use aggregate nicknames.
     125
     126= 4. Run an experiment using Omni =
     127In this step we are going to run through a sample GENI experiment, in order to
     128get familiarized with most of the Omni commands.
     129
     130== 4a. Create and renew a slice ==
     131The first thing to do when preparing to run a GENI experiment is to create a
     132slice.
     133  i. To create a slice type, use the `<slicename>` given in your paper slip:
     134  {{{
     135  omni.py createslice <slicename>
     136  }}}
     137  ii. To verify that your slice has been created and in general to keep track of
     138  your slices, use the list_my_slices command. use the <username> given in your
     139  paper slip. Type:
     140  {{{
     141  omni.py list_my_slices <username>
     142  }}}
     143  iii. Renew your slice. To extend the lifetime of your slice type:
     144  {{{
     145  omni.py renewslice <slicename> 20121025
     146  }}}
     147
     148== 4b. Reserve resources, a.k.a create a sliver ==
     149The next step in a GENI experiment is to actually reserve resources. For this
     150experiment we are going to use the Aggregate manager of ProtoGENI in Utah.
     151  i. In Omni in order to see what each AM offers you can use the
     152  `listresources` command. Type:
     153   {{{
    119154 omni.py listresources -a pg-utah -o
    120155}}}
    121 
    122 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 :
    123 {{{
     156  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 :
     157  {{{
    124158geni@geni-vm:~$ omni.py listresources -a pg-utah -o
    125159INFO:omni:Loading config file /home/geni/.gcf/omni_config
     
    145179INFO:omni: ============================================================
    146180}}}
    147 
    148 Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like.
    149 
    150 === Listmyslices in Omni ===
    151 Both Flack and Omni can see all the slices that are created by a user. In Flack there is a list of slices under the user on the left side of the window.
    152 In order to see your active slices with Omni, you will have to use the `listmyslices` command.
    153 {{{
    154 omni.py listmyslices <username>
    155 }}}
    156 
    157 You should see the slice that you created through Flack.
     181  Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like.
     182  In order to see only available resources resources type
     183  {{{
     184  omni.py listresources -a pg-utah --available -o
     185  }}}
     186  ii. To be able to reserve resources you will need to craft a request rspec.
     187  For this example we have created the rspecs for you, use the rspec URL given
     188  in your paper slip. Type :
     189  {{{
     190  omni.py createsliver -a pg-utah <slicename> <rspec_url>
     191  }}}
     192  iii. Look at your reserved resources. Type:
     193  {{{
     194  omni.py listresources -a pg-utah <slicename>
     195  }}}
     196  iv. Check the status of your resources. Type:
     197  {{{
     198  }}}
    158199
    159200== 1e. Logging Into the nodes -- Omni Scripting ==