Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup


Ignore:
Timestamp:
06/18/14 22:42:23 (10 years ago)
Author:
Vic Thomas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Setup

    v1 v1  
     1= [http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure Understanding the AM API] =
     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="./DesignSetup" 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
     40Verify 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.zip</code> </li>
     123<li>Open a terminal window and type:<pre
     124class="wiki">omni-configure</pre>The cert and key files you need will
     125be 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
     136Create 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 ===
     142For 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-2</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>
     180Because 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>
     183There 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
     199For 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
     204When 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
     209We 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>
     225When you open the node information, you should see options like those
     226in 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-3</b> <i>Edit the nodes</i>
     241</td>
     242</tr>
     243</table>
     244
     245<table>
     246<tr><td>
     247  <ol type='a' start='2'>
     248
     249<li>The way we will request installation of the proper software and execution
     250of our experiment is to add <i>install</i> and <i>execute</i> services.
     251</li>
     252</td>
     253<td>
     254   <table>
     255   <td><img width='800' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/EditRspecCollabCropped.tiff?format=raw" />
     256     <br />
     257     <b>Figure 3-4</b> <i>Specify the tarball and install script</i>
     258   </td>
     259   </tr>
     260   </table>
     261</td></tr>
     262
     263<tr>
     264<td colspan=2>
     265<ol  type='a' start='3'>
     266<li>
     267First, select "<tt>+ Add Install Service</tt>" as shown.  In the box the Install box enter (cut-and-paste): <br>
     268  &emsp <tt> http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-0.6.1-F15-x64.tar.gz </tt> <br>
     269and enter <br>
     270  &emsp <tt> / </tt> <br>
     271in the box next to it (labeled 'in').
     272<br>
     273<br>
     274Now, select "<tt>+ Add Install Service</tt>" again.  This time add: <br>
     275   &emsp <tt> http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-atmos-F15-x64.tar.gz </tt> <br>
     276and enter <br>
     277  &emsp <tt> / </tt> <br>
     278in the box next to it (labeled 'in').
     279<br>
     280<br>
     281Similarly, add a third install service: <br>
     282   &emsp <tt> http://www.gpolab.bbn.com/experiment-support/ccnx/ccnx-setup.tar.gz </tt>  <br>
     283and enter <br>
     284  &emsp <tt> /tmp </tt> <br>
     285in the box next to it (labeled 'in').  <strong> Note the different install directory this time. </strong>
     286<br>
     287<br>
     288
     289  <li>In a similar manner, use the "<tt>+ Add Execute Service</tt>" button to add three execute services on this node: <br>
     290   &emsp <tt> cd /tmp/ccnx-setup &&  ./node-setup <tt> <br>
     291   &emsp <tt> cd /tmp/ccnx-setup &&  ./add-precip-routes rsrchr <tt> <br>
     292   &emsp <tt> cd /tmp/ccnx-setup && ./ccnx-setup router 4 <tt> <br>
     293  </li>
     294
     295<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
     296be executed yet, so it will be some time before you will see any relevant
     297error messages if there is a mistake here.</td></tr></table>
     298  </li>
     299</ol>
     300</td>
     301</tr>
     302</table>
     303
     304<table>
     305<tr><td>
     306  <ol type='a' start='5'>
     307  <li>Once both the <i>install</i> and <i>execute</i> services are specified, click <b>Apply</b>. 
     308  </li>
     309  <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.
     310
     311 
     312</ol>
     313</td>
     314</tr>
     315
     316</table>
     317}}}
     318
     319
     320=== 3.4. Add GEMINI extensions ===
     321This 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
     322{{{
     323#!html
     324<table>
     325  <tr>
     326    <td>
     327      <ol type='a'>
     328       <li> Select the tab in the middle panel of Flack with the 'gear" icon </li>
     329       <li> Check the box "Use GEMINI Extensions" </li>
     330       </ol>
     331     </td>
     332     <td>
     333         <img width='500' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/addGeminiExtensionsCropped.tiff?format=raw" />
     334              <br />
     335              <b>Figure 3-4</b> <i>Specify the tarball and install script</i>
     336      </td>
     337  </tr>
     338</table>
     339}}}
     340
     341=== 3.4. Export the modified request RSpec ===
     342Now 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.
     343
     344{{{
     345#!html
     346<table><tr>
     347<td>
     348   <ol type='a'>
     349   <li>From the <i>View</i> menu (see figure), select the <b>Preview
     350request document(s)</b> item.  This will bring up a window showing the
     351current RSpec -- please take a moment to inspect it.  The XML elements
     352under the "<tt>flack</tt>" namespace were added for Flack's internal
     353use (containing information about the canvas layout, editing history, etc.),
     354and are ignored by aggregate managers.  The `&lt;node&gt;` and `&lt;link&gt;` elements
     355contain the specification for the components we will request, and if you
     356look closely, you will be able to see the install and execute service
     357elements you added earlier.
     358   </li>
     359
     360   </ol>
     361   </td>
     362   <td>
     363      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-view-small.png?format=raw" width='400'/>
     364         <br/>
     365         <b>Figure 3-6</b> View and save the final request RSpec
     366   </td>
     367</tr></table>
     368
     369<table><tr>
     370<td>
     371   <ol type='a'>
     372   <li>Use the <b>Save to file</b> button (in the upper left) to
     373a local copy of your RSpec with the name <tt>lab1_rspec.xml</tt>.  We'll use this in the next step to
     374demonstrate how other client tools also use RSpec files to communicate
     375requests to aggregate managers.</li>
     376   </ol>
     377</td></tr>
     378</table>
     379}}}
     380
     381
     382
     383=== 3.5. Instantiate the new experiment using Omni ===
     384
     385For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. 
     386
     387From a terminal, please enter the command:
     388{{{
     389$ omni -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE
     390}}}
     391where {{{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.
     392
     393
     394If all is well, Omni should give you a number of informational messages, such as:
     395{{{
     396INFO:omni:Loading config file /home/geni/.gcf/omni_config
     397}}}
     398
     399It should quickly proceed to the point where it makes the request to the remote manager:
     400{{{
     401INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...
     402}}}
     403
     404This step can sometimes be time-consuming, so please be patient.  If it succeeds, within a couple of minutes Omni should report:
     405{{{
     406INFO:omni: Completed createsliver:
     407}}}
     408
     409and your resource reservation is complete!
     410
     411
     412----
     413= [wiki:GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure Introduction] =
     414= [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GettingStarted_PartII_ccn/Procedure/Execute Next:  Execute] =