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 = |
| 6 | Before 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 = |
| 13 | Omni is a tool that will help you reserve resources in GENI, using your GENI |
| 14 | account. The first step is to load into Omni your account information. |
| 15 | Omni uses a configuration file, and there is a script that will automatically generate the file with |
| 16 | some default options and place it in the default place of `~/.gcf/`. Follow |
| 17 | these 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 | {{{ |
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. |
| 28 | When prompted for a passphrase, type the passphrase in your slip. You might be asked for a passphrase |
| 29 | multiple times. '''Note:''' If you have taken other tutorials, you might have |
| 30 | configured omni with other accounts, select to overwrite existing setting if |
| 31 | asked |
| 32 | |
| 33 | The output should look like: |
| 34 | {{{ |
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 = |
| 61 | When Omni talks to different authorities in GENI, it will need to identify you |
| 62 | as a valid GENI user, so it will ask you for your passphrase multiple times. |
| 63 | 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. |
| 64 | a. In the terminal run |
| 65 | {{{ |
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 = |
| 127 | In this step we are going to run through a sample GENI experiment, in order to |
| 128 | get familiarized with most of the Omni commands. |
| 129 | |
| 130 | == 4a. Create and renew a slice == |
| 131 | The first thing to do when preparing to run a GENI experiment is to create a |
| 132 | slice. |
| 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 == |
| 149 | The next step in a GENI experiment is to actually reserve resources. For this |
| 150 | experiment 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 | {{{ |
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 | }}} |