| 1 | = [wiki:GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup Understanding the AM API using Content Centric Networking] = |
| 2 | {{{ |
| 3 | #!html |
| 4 | |
| 5 | |
| 6 | <div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;"> |
| 7 | <img id="Image-Maps_5201305222028436" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Setup.jpg?format=raw" usemap="#Image-Maps_5201305222028436" border="0" width="495" height="138" alt="" /> |
| 8 | <map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436"> |
| 9 | <area shape="rect" coords="18,18,135,110" href="./Setup" alt="" title="" /> |
| 10 | <area shape="rect" coords="180,18,297,111" href="./Execute" alt="" title="" /> |
| 11 | <area shape="rect" coords="344,17,460,110" href="./Finish" alt="" title="" /> |
| 12 | <area shape="rect" coords="493,136,495,138" href="http://www.image-maps.com/index.php?aff=mapped_users_5201305222028436" alt="Image Map" title="Image Map" /> |
| 13 | </map> |
| 14 | <!-- Image map text links - End - --> |
| 15 | |
| 16 | </div> |
| 17 | }}} |
| 18 | |
| 19 | |
| 20 | |
| 21 | == 1. Design the Experiment == |
| 22 | |
| 23 | {{{ |
| 24 | #!html |
| 25 | <table border="0"> |
| 26 | <tr> |
| 27 | <td > |
| 28 | <ol type='a'><li>In today's experiment you will use resources at the aggregate listed on the worksheet. If you don't have a worksheet use <i>Clemson InstaGENI (aka instageni.clemson.edu)</i> </li> |
| 29 | </li> |
| 30 | </ol> |
| 31 | </td> |
| 32 | </tr> |
| 33 | </table> |
| 34 | }}} |
| 35 | |
| 36 | == 2. Establish the Environment == |
| 37 | |
| 38 | === 2.1 Pre-work: Ensure SSH keys are setup === |
| 39 | |
| 40 | Verify that you have at least one public key associated with your account. To do that, after you login to the portal check under your Profile, under the `SSH keys` tab. If you do not have SSH keys associated yet, please follow the instructions on that tab of the Portal. |
| 41 | |
| 42 | === 2.2 Configure Omni === |
| 43 | |
| 44 | |
| 45 | {{{ |
| 46 | #!html |
| 47 | <table> |
| 48 | <tr><td> |
| 49 | <ol type='a'> |
| 50 | <li>Login to the <a href="http://portal.geni.net"> GENI Portal </a> </li> |
| 51 | <li> Click on the `Profile tab` link on the top of your |
| 52 | screen. Then click on the `Configure omni` tab under |
| 53 | `PROFILE`.</li> |
| 54 | </ol> |
| 55 | </td><td> |
| 56 | <img |
| 57 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/ConfigureOmniTab.png" |
| 58 | width="400" /> |
| 59 | <br /> |
| 60 | <b>Figure 2-1</b> Click on the <i>Configure omni</i> tab under |
| 61 | <i>Profile</i>.</i> |
| 62 | </td></tr> |
| 63 | <tr><td> |
| 64 | <ol type='a' start='3'> |
| 65 | <li> Click on the `Download your omni data` button under step 2. </li> |
| 66 | </ol> |
| 67 | </td><td> |
| 68 | <img |
| 69 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/DownloadOmniDataButton.jpg" |
| 70 | width="400" /> |
| 71 | <br /> |
| 72 | <b>Figure 2-2</b> <i>Download your omni data</i> under step 2. |
| 73 | </td></tr> |
| 74 | <tr><td> |
| 75 | <ol type='a' start='4'> |
| 76 | <li> If this is the first time you try to access your GENI |
| 77 | certificate you will have to generate one. Click on the |
| 78 | `generate a certificate` link.</li> |
| 79 | </ol> |
| 80 | </td><td> |
| 81 | <img |
| 82 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/GenerateCertLink.jpg" |
| 83 | width="400" /> |
| 84 | <br /> |
| 85 | <b>Figure 2-3</b> Click on <i>Generate a certificate</i>.</i> |
| 86 | </td></tr> |
| 87 | <tr><td> |
| 88 | <ol type='a' start='5'> |
| 89 | <li> Unless you really understand how SSL certificates |
| 90 | work, choose the simple option. Click on the `Generate |
| 91 | Combined Certificate and Key File` button and then click on |
| 92 | `Close`. You will be taken back to the download page with |
| 93 | the warning. Reload the page to enable the download |
| 94 | button.</li> |
| 95 | </ol> |
| 96 | </td><td> |
| 97 | <img |
| 98 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/SimpleOption.jpg" |
| 99 | width="350"/> |
| 100 | <br /> |
| 101 | <b>Figure 2-4</b> Click on <i>Generate Combined Certificate and Key File</i>. |
| 102 | </td></tr> |
| 103 | <tr><td> |
| 104 | <ol type='a' start='6'> |
| 105 | <li> If you are a member of more than one project, select |
| 106 | which project you would like to be the default one for |
| 107 | running experiments in GENI. You can always change the |
| 108 | project that is used by the `-r` command line option of |
| 109 | Omni. Then click on `Download your omni data`.</li> |
| 110 | </ol> |
| 111 | </td><td> |
| 112 | <img |
| 113 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/DownloadOmniData.jpg" |
| 114 | width="400"/> |
| 115 | <br /> |
| 116 | <b>Figure 2-5</b> Click on <i>Download your omni data</i>. |
| 117 | </td></tr> |
| 118 | </table> |
| 119 | <table> |
| 120 | <tr><td> |
| 121 | <ol type='a' start='7'> |
| 122 | <li> The bundle will be saved at <code>~/Downloads/omni.bundle</code> </li> |
| 123 | <li>Open a terminal window and type:<pre |
| 124 | class="wiki">omni-configure</pre>The cert and key files you need will |
| 125 | be installed in the appropriate folders.</li> |
| 126 | </ol> |
| 127 | </td></tr> |
| 128 | </table> |
| 129 | }}} |
| 130 | |
| 131 | == 3. Obtain Resources == |
| 132 | |
| 133 | |
| 134 | === 3.1 Create a slice === |
| 135 | |
| 136 | Create a slice using `omni` and the slice name of your choice. From now on that slice name will be referred to as `SLICENAME`. |
| 137 | {{{ |
| 138 | $ omni createslice SLICENAME |
| 139 | }}} |
| 140 | |
| 141 | === 3.2. Load a simple topology in Flack === |
| 142 | For this exercise, we will edit an existing RSpec file. Start by loading this predefined topology into Flack. |
| 143 | |
| 144 | {{{ |
| 145 | #!html |
| 146 | <table> |
| 147 | <tr><td> |
| 148 | <ol type='a'> |
| 149 | <li>In the Portal, launch Flack for this slice.</li> |
| 150 | <li>From the <b>Import</b> menu (see figure), select the <b>Import from the web</b> item.</li> |
| 151 | </ol> |
| 152 | </td> |
| 153 | <td> |
| 154 | <img border="0" |
| 155 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-import-small.png?format=raw" |
| 156 | alt="Import an RSpec into Flack" title="Import an RSpec into Flack" /> |
| 157 | <br /> |
| 158 | <b>Figure 3-1</b> <i>Import an RSpec into Flack.</i> |
| 159 | </td> |
| 160 | </tr> |
| 161 | </table> |
| 162 | <table> |
| 163 | <tr><td> |
| 164 | <ol type='a' start='3'> |
| 165 | <li>Enter the URL for the RSpec: <br> |
| 166 | <tt> http://www.gpolab.bbn.com/experiment-support/ccnx/ccn_precip_openvz_gec20.xml </tt> <br> |
| 167 | then click <b>Ok</b>.<br/> |
| 168 | </li> |
| 169 | <li>When Flack pops up a message asking you to pick a manager to use click <b>OK</b> and then select the manager listed on your worksheet from the |
| 170 | list. After you click <b>Accept</b>, and a network topology should appear |
| 171 | on the canvas. |
| 172 | |
| 173 | |
| 174 | <table id="Table_01" border="0" cellpadding="5" cellspacing="0"> |
| 175 | <tr> |
| 176 | <td> |
| 177 | <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"> |
| 178 | </td> |
| 179 | <td> |
| 180 | Because this RSpec file contains a generic description of resources and does not specify any particular aggregate manager, Flack will pop up a message asking you to specify an aggregate to use: |
| 181 | <br/> |
| 182 | <i> |
| 183 | There were resources detected without a manager selected, please select which manager you would like to use. |
| 184 | </i> |
| 185 | </td> |
| 186 | </tr> |
| 187 | </table> |
| 188 | |
| 189 | </li> |
| 190 | </ol> |
| 191 | </td> |
| 192 | |
| 193 | |
| 194 | </tr></table> |
| 195 | }}} |
| 196 | |
| 197 | === 3.3. Modify the RSpec to automatically install and execute CCNX software === |
| 198 | |
| 199 | For this experiment, we need to install the following software on the nodes: |
| 200 | * The CCNX software (ccnx-0.6.1-F15-x64.tar.gz) |
| 201 | * Scripts that set up the CCNX software (ccnx-setup.tar.gz) |
| 202 | * Scripts used to pull atmospheric precipitation data using the CCNX protocol (ccnx-atmos-F15-x64.tar.gz) |
| 203 | |
| 204 | When the nodes start up, we need the following scripts to be executed: |
| 205 | * Script that sets up the node (node-setup) |
| 206 | * Script that sets up the ccnx protocol (ccnx-setup) |
| 207 | * Script that setup up ccnx protocol routes (add-precip-routes) |
| 208 | |
| 209 | We automate the installation and running of the software using install and execute scripts in the RSpec. |
| 210 | |
| 211 | {{{ |
| 212 | #!html |
| 213 | <table><tr> |
| 214 | <td colspan=2> |
| 215 | <ol type='a'> |
| 216 | <li>Click on the the <i>i</i> button on the <b>collab node</b> (see figure) to manipulate details of the node configuration. |
| 217 | |
| 218 | |
| 219 | <table id="Table_01" border="0" cellpadding="5" cellspacing="0"> |
| 220 | <tr> |
| 221 | <td> |
| 222 | <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"> |
| 223 | </td> |
| 224 | <td> |
| 225 | When you open the node information, you should see options like those |
| 226 | in the figure. |
| 227 | </td> |
| 228 | </tr> |
| 229 | </table> |
| 230 | |
| 231 | |
| 232 | </li> |
| 233 | </ol> |
| 234 | </td> |
| 235 | </tr> |
| 236 | <tr> |
| 237 | <td colspan=2> |
| 238 | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-node-info-small.png?format=raw" width='400'/> |
| 239 | <br /> |
| 240 | <b>Figure 3-2</b> <i>Edit the nodes</i> |
| 241 | </td> |
| 242 | </tr> |
| 243 | </table> |
| 244 | |
| 245 | <table> |
| 246 | <tr><td colspan='2'> |
| 247 | <ol type='a' start='2'> |
| 248 | |
| 249 | <li>The way we will request installation of the proper software and execution |
| 250 | of our experiment is to add <i>install</i> and <i>execute</i> services. |
| 251 | </li> |
| 252 | </td> |
| 253 | </tr> |
| 254 | <tr> |
| 255 | <td colspan='2'> |
| 256 | <img width='800' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup/EditRspecCollabCropped.png?format=raw" /> |
| 257 | <br /> |
| 258 | <b>Figure 3-3</b> <i>Specify the install and execute scripts </i> |
| 259 | </td></tr> |
| 260 | |
| 261 | <tr> |
| 262 | <td colspan=2> |
| 263 | <ol type='a' start='3'> |
| 264 | <li> |
| 265 | First, select "<tt>+ Add Install Service</tt>" as shown. In the box the Install box enter (cut-and-paste): <br> |
| 266 | <pre>http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-0.6.1-F15-x64.tar.gz</pre> |
| 267 | and enter |
| 268 | <pre>/</pre> |
| 269 | in the box next to it (labeled 'in'). |
| 270 | <br> |
| 271 | <br> |
| 272 | Now, select "<tt>+ Add Install Service</tt>" again. This time add: <br> |
| 273 | <pre>http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-atmos-F15-x64.tar.gz</pre> |
| 274 | and enter <br> |
| 275 | <pre>/</pre> |
| 276 | in the box next to it (labeled 'in'). |
| 277 | <br> |
| 278 | <br> |
| 279 | Similarly, add a third install service: |
| 280 | <pre>http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-setup.tar.gz</pre> |
| 281 | and enter <br> |
| 282 | <pre>/tmp</pre> |
| 283 | in the box next to it (labeled 'in'). <strong> Note the different install directory this time. </strong> |
| 284 | <br> |
| 285 | <br> |
| 286 | |
| 287 | <li>In a similar manner, use the "<tt>+ Add Execute Service</tt>" button to add three execute services on this node: |
| 288 | <br> |
| 289 | <pre> |
| 290 | cd /tmp/ccnx-setup && ./node-setup |
| 291 | cd /tmp/ccnx-setup && ./add-precip-routes rsrchr |
| 292 | cd /tmp/ccnx-setup && ./ccnx-setup router 4 |
| 293 | </pre> |
| 294 | </li> |
| 295 | |
| 296 | <table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" width='50' height='50'/></td><td>Be very careful when entering this information -- these commands will not |
| 297 | be executed yet, so it will be some time before you will see any relevant |
| 298 | error messages if there is a mistake here.</td></tr></table> |
| 299 | </li> |
| 300 | </ol> |
| 301 | </td> |
| 302 | </tr> |
| 303 | </table> |
| 304 | |
| 305 | <table> |
| 306 | <tr><td> |
| 307 | <ol type='a' start='5'> |
| 308 | <li>Once both the <i>install</i> and <i>execute</i> services are specified, click <b>Apply</b>. |
| 309 | </li> |
| 310 | <li> You <i> DO NOT </i> have to specify install and execute scripts for the other nodes as they have already been done for you. You can check this by clicking on the i button next to the icons for these nodes. |
| 311 | |
| 312 | |
| 313 | </ol> |
| 314 | </td> |
| 315 | </tr> |
| 316 | |
| 317 | </table> |
| 318 | }}} |
| 319 | |
| 320 | |
| 321 | === 3.4. Add GEMINI extensions === |
| 322 | This assignment has the option of instrumenting the experiment and viewing graphs of traffic on links using the GENI Desktop. To prepare for this option, you need to turn on GEMINI extensions. Do this by |
| 323 | {{{ |
| 324 | #!html |
| 325 | <table> |
| 326 | <tr> |
| 327 | <td> |
| 328 | <ol type='a'> |
| 329 | <li> Select the tab in the middle panel of Flack with the 'puzzle piece' icon </li> |
| 330 | <li> Check the box "Use GEMINI Extensions" </li> |
| 331 | </ol> |
| 332 | </td> |
| 333 | <td> |
| 334 | <img width='500' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup/addGeminiExtensionsCropped.png?format=raw" /> |
| 335 | <br /> |
| 336 | <b>Figure 3-4</b> <i>Add GEMINI Extensions</i> |
| 337 | </td> |
| 338 | </tr> |
| 339 | </table> |
| 340 | }}} |
| 341 | |
| 342 | === 3.5. Export the modified request RSpec === |
| 343 | Now we will pull back some of the covers and inspect exactly what Flack has been doing for us when preparing the RSpecs for the experiments we design. Each node and link has a corresponding element in the RSpec, and the details of the component configuration (such as the install and execute services we requested above) are specified with attributes, or sometimes child elements, within those portions of the document. |
| 344 | |
| 345 | {{{ |
| 346 | #!html |
| 347 | <table><tr> |
| 348 | <td> |
| 349 | <ol type='a'> |
| 350 | <li>From the <i>View</i> menu (see figure), select the <b>Preview |
| 351 | request document(s)</b> item. This will bring up a window showing the |
| 352 | current RSpec -- please take a moment to inspect it. The XML elements |
| 353 | under the "<tt>flack</tt>" namespace were added for Flack's internal |
| 354 | use (containing information about the canvas layout, editing history, etc.), |
| 355 | and are ignored by aggregate managers. The `<node>` and `<link>` elements |
| 356 | contain the specification for the components we will request, and if you |
| 357 | look closely, you will be able to see the install and execute service |
| 358 | elements you added earlier. |
| 359 | </li> |
| 360 | |
| 361 | </ol> |
| 362 | </td> |
| 363 | <td> |
| 364 | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-view-small.png?format=raw" width='400'/> |
| 365 | <br/> |
| 366 | <b>Figure 3-5</b> View and save the final request RSpec |
| 367 | </td> |
| 368 | </tr></table> |
| 369 | |
| 370 | <table><tr> |
| 371 | <td> |
| 372 | <ol type='a'> |
| 373 | <li>Use the <b>Save to file</b> button (in the upper left) to |
| 374 | a local copy of your RSpec with the name <tt>lab1_rspec.xml</tt>. We'll use this in the next step to |
| 375 | demonstrate how other client tools also use RSpec files to communicate |
| 376 | requests to aggregate managers.</li> |
| 377 | </ol> |
| 378 | </td></tr> |
| 379 | </table> |
| 380 | }}} |
| 381 | |
| 382 | |
| 383 | |
| 384 | === 3.6. Instantiate the new experiment using Omni === |
| 385 | |
| 386 | For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. |
| 387 | |
| 388 | From a terminal, please enter the command: |
| 389 | {{{ |
| 390 | $ omni -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE |
| 391 | }}} |
| 392 | where {{{AM_NICKNAME}}} is the nickname for your assigned aggregate manager and {{{SLICENAME}}} is the name of the slice you created earlier (both of these are given on your worksheet). {{{RSPEC_FILE}}} should be replaced with the filename of the RSpec you saved in step 4. |
| 393 | |
| 394 | |
| 395 | If all is well, Omni should give you a number of informational messages, such as: |
| 396 | {{{ |
| 397 | INFO:omni:Loading config file /home/geni/.gcf/omni_config |
| 398 | }}} |
| 399 | |
| 400 | It should quickly proceed to the point where it makes the request to the remote manager: |
| 401 | {{{ |
| 402 | INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ... |
| 403 | }}} |
| 404 | |
| 405 | This step can sometimes be time-consuming, so please be patient. If it succeeds, within a couple of minutes Omni should report: |
| 406 | {{{ |
| 407 | INFO:omni: Completed createsliver: |
| 408 | }}} |
| 409 | |
| 410 | and your resource reservation is complete! |
| 411 | |
| 412 | |
| 413 | ---- |
| 414 | = [wiki:GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup Introduction] = |
| 415 | = [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Execute Next: Execute] = |