| 1 | = [wiki:GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ccn/Procedure/Setup Understanding the AM API using Named Data 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="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ccn/Procedure/Execute" alt="" title="" /> |
| 11 | <area shape="rect" coords="344,17,460,110" href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ccn/Procedure/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 Set up ssh keys and configure Omni === |
| 39 | |
| 40 | If your account is from the [http://portal.geni.net GENI Portal] follow the instructions [wiki:GENIExperimenter/Tutorials/jFed/GettingStarted_PartII_ccn/Procedure/omni-config here]. |
| 41 | |
| 42 | If your account is from the iMinds member authority (https://www.wall2.ilabt.iminds.be) follow the instructions [http://trac.gpolab.bbn.com/gcf/wiki/OmniConfigure/AutomaticProtoGENI here]. |
| 43 | |
| 44 | |
| 45 | {{{ |
| 46 | #!comment |
| 47 | |
| 48 | === 2.1 Pre-work: Ensure SSH keys are setup === |
| 49 | |
| 50 | 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. |
| 51 | |
| 52 | === 2.2 Configure Omni === |
| 53 | |
| 54 | |
| 55 | {{{ |
| 56 | #!html |
| 57 | <table> |
| 58 | <tr><td> |
| 59 | <ol type='a'> |
| 60 | <li>Login to the <a href="http://portal.geni.net"> GENI Portal </a> </li> |
| 61 | <li> Click on the `Profile tab` link on the top of your |
| 62 | screen. Then click on the `Configure omni` tab under |
| 63 | `PROFILE`.</li> |
| 64 | </ol> |
| 65 | </td><td> |
| 66 | <img |
| 67 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/ConfigureOmniTab.png" |
| 68 | width="400" /> |
| 69 | <br /> |
| 70 | <b>Figure 2-1</b> Click on the <i>Configure omni</i> tab under |
| 71 | <i>Profile</i>.</i> |
| 72 | </td></tr> |
| 73 | <tr><td> |
| 74 | <ol type='a' start='3'> |
| 75 | <li> Click on the `Download your omni data` button under step 2. </li> |
| 76 | </ol> |
| 77 | </td><td> |
| 78 | <img |
| 79 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/DownloadOmniDataButton.jpg" |
| 80 | width="400" /> |
| 81 | <br /> |
| 82 | <b>Figure 2-2</b> <i>Download your omni data</i> under step 2. |
| 83 | </td></tr> |
| 84 | <tr><td> |
| 85 | <ol type='a' start='4'> |
| 86 | <li> If this is the first time you try to access your GENI |
| 87 | certificate you will have to generate one. Click on the |
| 88 | `generate a certificate` link.</li> |
| 89 | </ol> |
| 90 | </td><td> |
| 91 | <img |
| 92 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/GenerateCertLink.jpg" |
| 93 | width="400" /> |
| 94 | <br /> |
| 95 | <b>Figure 2-3</b> Click on <i>Generate a certificate</i>.</i> |
| 96 | </td></tr> |
| 97 | <tr><td> |
| 98 | <ol type='a' start='5'> |
| 99 | <li> Unless you really understand how SSL certificates |
| 100 | work, choose the simple option. Click on the `Generate |
| 101 | Combined Certificate and Key File` button and then click on |
| 102 | `Close`. You will be taken back to the download page with |
| 103 | the warning. Reload the page to enable the download |
| 104 | button.</li> |
| 105 | </ol> |
| 106 | </td><td> |
| 107 | <img |
| 108 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/SimpleOption.jpg" |
| 109 | width="350"/> |
| 110 | <br /> |
| 111 | <b>Figure 2-4</b> Click on <i>Generate Combined Certificate and Key File</i>. |
| 112 | </td></tr> |
| 113 | <tr><td> |
| 114 | <ol type='a' start='6'> |
| 115 | <li> If you are a member of more than one project, select |
| 116 | which project you would like to be the default one for |
| 117 | running experiments in GENI. You can always change the |
| 118 | project that is used by the `-r` command line option of |
| 119 | Omni. Then click on `Download your omni data`.</li> |
| 120 | </ol> |
| 121 | </td><td> |
| 122 | <img |
| 123 | src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/OmniConfigure/Automatic/DownloadOmniData.jpg" |
| 124 | width="400"/> |
| 125 | <br /> |
| 126 | <b>Figure 2-5</b> Click on <i>Download your omni data</i>. |
| 127 | </td></tr> |
| 128 | </table> |
| 129 | <table> |
| 130 | <tr><td> |
| 131 | <ol type='a' start='7'> |
| 132 | <li> The bundle will be saved at <code>~/Downloads/omni.bundle</code> </li> |
| 133 | <li>Open a terminal window and type:<pre |
| 134 | class="wiki">omni-configure</pre>The cert and key files you need will |
| 135 | be installed in the appropriate folders.</li> |
| 136 | </ol> |
| 137 | </td></tr> |
| 138 | </table> |
| 139 | }}} |
| 140 | |
| 141 | }}} |
| 142 | == 3. Obtain Resources == |
| 143 | |
| 144 | |
| 145 | === 3.1 Create a slice === |
| 146 | |
| 147 | Create a slice using `omni` and the slice name of your choice. From now on that slice name will be referred to as `SLICENAME`. |
| 148 | {{{ |
| 149 | $ omni createslice SLICENAME |
| 150 | }}} |
| 151 | |
| 152 | === 3.2. Load a simple topology in jFed === |
| 153 | For this exercise, we will edit an existing RSpec file. Start by loading this predefined topology into jFed. |
| 154 | |
| 155 | {{{ |
| 156 | #!html |
| 157 | <table> |
| 158 | <tr><td> |
| 159 | <ol type='a'> |
| 160 | <li>In the Portal, launch jFed for this slice.</li> |
| 161 | <li>From the <b>jFed Experimenter Toolkit</b> menu (see figure), select the <b>Open URL</b> button.</li> |
| 162 | </ol> |
| 163 | </td> |
| 164 | <td> |
| 165 | <img border="0" |
| 166 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JFedLab1_1.png?format=raw" |
| 167 | width=400 alt="Import an RSpec into jFed" title="Import an RSpec into jFed" /> |
| 168 | <br /> |
| 169 | <b>Figure 3-1</b> <i>Import an RSpec into jFed.</i> |
| 170 | </td> |
| 171 | </tr> |
| 172 | </table> |
| 173 | <table> |
| 174 | <tr><td> |
| 175 | <ol type='a' start='3'> |
| 176 | <li>Enter the URL for the RSpec: <br> |
| 177 | <tt>http://www.gpolab.bbn.com/experiment-support/LabOne/ccnx/lab1ccn-3node-jfed-rawpc.xml</tt><br> |
| 178 | then click <b>Ok</b>.<br/> |
| 179 | </li> |
| 180 | <li>When jFed pops up a message asking you to pick a manager to use, select the manager listed on your worksheet from the |
| 181 | list. After you pick an aggregate manager, a network topology should appear |
| 182 | on the canvas. |
| 183 | |
| 184 | |
| 185 | <table id="Table_01" border="0" cellpadding="5" cellspacing="0"> |
| 186 | <tr> |
| 187 | <td> |
| 188 | <img border="0" |
| 189 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JFedLab1_2.png?format=raw" |
| 190 | width="400" alt="Pick Aggregate Manager" title="Pick Aggregate Manager" /> |
| 191 | <br /> |
| 192 | <b>Figure 3-2</b> <i>Pick an Aggregate Manager.</i> |
| 193 | </td> |
| 194 | <td> |
| 195 | Because this RSpec file contains a generic description of resources and does not specify any particular aggregate manager, jFed will pop up a message asking you to specify an aggregate to use: |
| 196 | <br/> |
| 197 | <i> |
| 198 | Assign these nodes now .... |
| 199 | </i> |
| 200 | </td> |
| 201 | </tr> |
| 202 | </table> |
| 203 | |
| 204 | </li> |
| 205 | </ol> |
| 206 | </td> |
| 207 | |
| 208 | |
| 209 | </tr></table> |
| 210 | }}} |
| 211 | |
| 212 | === 3.3. Modify the RSpec to automatically install and execute CCNX software === |
| 213 | |
| 214 | For this experiment, we need to install the following software on the nodes: |
| 215 | * The CCNX software (ccnx-0.6.2.tar.gz) |
| 216 | * Scripts that set up the CCNX software (ccnx-setup.tar.gz) |
| 217 | * Scripts used to pull atmospheric precipitation data using the CCNX protocol (ccnx-atmos.tar.gz) |
| 218 | |
| 219 | When the nodes start up, we need the following scripts to be executed: |
| 220 | * Script that sets up the node (node-setup) |
| 221 | * Script that sets up the ccnx protocol (ccnx-setup) |
| 222 | * Script that setup up ccnx protocol routes (add-precip-routes) |
| 223 | |
| 224 | We automate the installation and running of the proper software using `install` and `execute` scripts in the RSpec. These can be added by double clicking on a node, and then clicking a "+" under the "Boot scripts" tab. |
| 225 | |
| 226 | {{{ |
| 227 | #!comment |
| 228 | |
| 229 | Most of the nodes have an install script specified for each of the three pieces of software listed above which loads a tarball of software onto each node: |
| 230 | * `http://www.gpolab.bbn.com/experiment-support/ccnx-xen/ccnx-0.6.2.tar.gz` |
| 231 | * `http://www.gpolab.bbn.com/experiment-support/ccnx-xen/ccnx-atmos.tar.gz` |
| 232 | * `http://www.gpolab.bbn.com/experiment-support/ccnx-xen/ccnx-setup.tar.gz` |
| 233 | |
| 234 | Likewise, the nodes have execute scripts to configure the software on each node: |
| 235 | * `cd /tmp/ccnx-setup && ./node-setup` |
| 236 | * `cd /tmp/ccnx-setup && ./add-precip-routes router` |
| 237 | * `cd /tmp/ccnx-setup && ./ccnx-setup router 5` |
| 238 | }}} |
| 239 | |
| 240 | {{{ |
| 241 | #!html |
| 242 | <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> |
| 243 | You <i> DO NOT </i> have to specify install and execute scripts for the nodes as they have already been done for you. You can check this by clicking on the icons for these nodes. |
| 244 | <br/><br/> |
| 245 | In general, be very careful when entering this information. These commands will not |
| 246 | be executed until the nodes boot up and may fail silently. |
| 247 | </td></tr></table> |
| 248 | }}} |
| 249 | |
| 250 | |
| 251 | |
| 252 | {{{ |
| 253 | #!html |
| 254 | <table><tr> |
| 255 | <td colspan=2> |
| 256 | <ol type='a'> |
| 257 | <li>Click on each node to manipulate details of the node configuration. The execute commands below are found under the "Boot scripts" tab. |
| 258 | <br/><br/> |
| 259 | The <tt>ccnx-setup</tt> execute command takes as parameters the name of a single "barrier" node, which must be up in order for the experiment to start, and the number of nodes in the topology as follows: |
| 260 | <pre>ccnx-setup BARRIER_NODE NUM_NODES</pre> |
| 261 | We will continue to use the node <tt>router</tt> as the barrier node. |
| 262 | <br/><br/> |
| 263 | We will add two nodes to the topology, so go ahead and change the number of nodes from 3 to 5. |
| 264 | The new <tt>router</tt> execute command on <b>all three nodes</b> should be: |
| 265 | <pre>cd /tmp/ccnx-setup && ./ccnx-setup router 5</pre> |
| 266 | |
| 267 | </li> |
| 268 | </ol> |
| 269 | </td> |
| 270 | |
| 271 | <td colspan=2> |
| 272 | <img src="http://groups.geni.net/geni/raw-attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/LabOne_JFed_Fig3-2.png" width='500'/> |
| 273 | <br /> |
| 274 | <b>Figure 3-2</b> <i>Edit all three nodes</i> |
| 275 | </td> |
| 276 | </tr> |
| 277 | </table> |
| 278 | |
| 279 | |
| 280 | |
| 281 | <table><tr> |
| 282 | <td colspan=2> |
| 283 | <ol type='a' start='2'> |
| 284 | <li>Copy the <tt>user</tt> node by: |
| 285 | <ul> |
| 286 | <li>Click on the <tt>user</tt> node. </li> |
| 287 | <li>Press the <b>Duplicate</b> button. </li> |
| 288 | <li>A new node should appear. </li> |
| 289 | <li>Double click on the new node and rename it <tt>user0</tt>.</li> |
| 290 | <li>Remove each link connecting <tt>user0</tt> to the topology. Delete the link by right clicking on each link and selecting "Delete". You may need to move the nodes around to see the added links.</li> |
| 291 | <li>Look at the install and execute scripts. They should be the same as on the original <tt>user</tt> node.</li> |
| 292 | </ul> |
| 293 | </li> |
| 294 | <li>Copy the <tt>router</tt> node the same way setting the name of the new node to be <tt>router1</tt>. Be sure to delete the links from this node as well.</li> |
| 295 | </ol> |
| 296 | </td> |
| 297 | |
| 298 | <td colspan=2> |
| 299 | <img src="http://groups.geni.net/geni/raw-attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/LabOne_JFed_Fig3-3.png" width='500'/> |
| 300 | <br /> |
| 301 | <b>Figure 3-3</b> <i>Copy the <tt>router</tt> and <tt>user</tt> nodes.</i> |
| 302 | </td> |
| 303 | </tr> |
| 304 | </table> |
| 305 | <table><tr> |
| 306 | <td colspan=2> |
| 307 | <ol type='a' start='4'> |
| 308 | <li>Draw a link between the <tt>router</tt> and <tt>router1</tt> nodes.</li> |
| 309 | <li>Draw another link between the new <tt>router1</tt> node and the <tt>user0</tt> node.</li> |
| 310 | <li>The topology should look like Figure 3-4</li> |
| 311 | </ol> |
| 312 | </td> |
| 313 | |
| 314 | <td colspan=2> |
| 315 | <img src="http://groups.geni.net/geni/raw-attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/LabOne_JFed_Fig3-4.png" width='500'/> |
| 316 | <br /> |
| 317 | <b>Figure 3-4</b> <i>Draw links to connect the nodes.</i> |
| 318 | </td> |
| 319 | </tr> |
| 320 | </table> |
| 321 | |
| 322 | <table><tr> |
| 323 | <td colspan=2> |
| 324 | <ol type='a' start='7'> |
| 325 | <li>Let the aggregate selecting IP addresses for you. To do this, click on each link and set the "Configuration Type" field to "Auto".</li> |
| 326 | <li> |
| 327 | The <tt>add-precip-routes</tt> execute command takes as a parameter the name of the "next hop" node, which is the next node on the path to the <tt>data</tt> node: |
| 328 | <pre>add-precip-routes NEXT_HOP_NODE</pre> |
| 329 | |
| 330 | Edit the new <tt>router1</tt> node to point to <tt>router</tt>. |
| 331 | <br/><br/> |
| 332 | The new <tt>add-precip-routes</tt> execute command on <b>router1</b> should be: |
| 333 | <pre>cd /tmp/ccnx-setup && ./add-precip-routes router</pre> |
| 334 | </li> |
| 335 | <li> |
| 336 | Edit the new <tt>user0</tt> node to point to <tt>router1</tt>. |
| 337 | <br/><br/> |
| 338 | The new <tt>add-precip-routes</tt> execute command on <b>user0</b> should be: |
| 339 | <pre>cd /tmp/ccnx-setup && ./add-precip-routes router1</pre> |
| 340 | |
| 341 | </li> |
| 342 | </ol> |
| 343 | </td> |
| 344 | |
| 345 | <td colspan=2> |
| 346 | <img src="http://groups.geni.net/geni/raw-attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/LabOne_JFed_Fig3-5.png" width='500'/> |
| 347 | <br /> |
| 348 | <b>Figure 3-5</b> <i>Edit the next hop on <tt>router1</tt> and <tt>user0</tt>.</i> |
| 349 | </td> |
| 350 | </tr> |
| 351 | </table> |
| 352 | }}} |
| 353 | |
| 354 | |
| 355 | === 3.4. Export the modified request RSpec === |
| 356 | Now we will pull back some of the covers and inspect exactly what jFed 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. |
| 357 | |
| 358 | {{{ |
| 359 | #!html |
| 360 | <table><tr> |
| 361 | <td> |
| 362 | <ol type='a'> |
| 363 | <li>From the <i>jFed Experimenter Toolkit</i> window (see figure), select the <b>RSpec Editor</b> tab. This will bring up a window showing the |
| 364 | current RSpec -- please take a moment to inspect it. The `<node>` and `<link>` elements |
| 365 | contain the specification for the components we will request, and if you |
| 366 | look closely, you will be able to see the install and execute service |
| 367 | elements you added earlier. |
| 368 | </li> |
| 369 | |
| 370 | </ol> |
| 371 | </td> |
| 372 | <td> |
| 373 | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JFedLab1_7.png?format=raw" width='400'/> |
| 374 | <br/> |
| 375 | <b>Figure 3-5</b> View the final request RSpec |
| 376 | </td> |
| 377 | </tr></table> |
| 378 | |
| 379 | <table><tr> |
| 380 | <td> |
| 381 | <ol type='a'> |
| 382 | <li>Use the <b>Save to file</b> button (in the upper left) to |
| 383 | a local copy of your RSpec with the name <tt>ccn_precip.xml</tt>. We'll use this in the next step to |
| 384 | demonstrate how other client tools also use RSpec files to communicate |
| 385 | requests to aggregate managers.</li> |
| 386 | </ol> |
| 387 | </td> |
| 388 | <td> |
| 389 | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JFedLab1_8.png?format=raw" width='400'/> |
| 390 | <br/> |
| 391 | <b>Figure 3-6</b> Save the final request RSpec |
| 392 | </td> |
| 393 | </tr> |
| 394 | </table> |
| 395 | }}} |
| 396 | |
| 397 | |
| 398 | |
| 399 | === 3.6. Instantiate the new experiment using Omni === |
| 400 | |
| 401 | For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. |
| 402 | |
| 403 | From a terminal, please enter the command: |
| 404 | {{{ |
| 405 | $ omni -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE |
| 406 | }}} |
| 407 | 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. |
| 408 | |
| 409 | |
| 410 | If all is well, Omni should give you a number of informational messages, such as: |
| 411 | {{{ |
| 412 | INFO:omni:Loading config file /home/geni/.gcf/omni_config |
| 413 | }}} |
| 414 | |
| 415 | It should quickly proceed to the point where it makes the request to the remote manager: |
| 416 | {{{ |
| 417 | INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ... |
| 418 | }}} |
| 419 | |
| 420 | This step can sometimes be time-consuming, so please be patient. If it succeeds, within a couple of minutes Omni should report: |
| 421 | {{{ |
| 422 | INFO:omni: Completed createsliver: |
| 423 | }}} |
| 424 | |
| 425 | and your resource reservation is complete! |
| 426 | |
| 427 | |
| 428 | ---- |
| 429 | = [wiki:GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ccn/Procedure/Setup Introduction] = |
| 430 | = [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ccn/Procedure/Execute Next: Execute] = |