Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/GettingStarted_PartII_Hadoop/Procedure/DesignSetup


Ignore:
Timestamp:
03/07/14 10:22:11 (10 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/GettingStarted_PartII_Hadoop/Procedure/DesignSetup

    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<tr><td>
     119        <ol type='a' start='7'>
     120           <li> The bundle will be saved at <code>~/Downloads/omni-bundle.zip</code> </li>
     121<li>Open a terminal window and type:<pre
     122class="wiki">omni-configure</pre>The cert and key files you need will
     123be installed in the appropriate folders.</li>
     124</ol>
     125</td></tr>
     126</table>
     127}}}
     128
     129== 3.  Obtain Resources ==
     130
     131
     132=== 3.1 Create a slice ===
     133
     134Create a slice using `omni` and the slice name of your choice.  From now on that slice name will be referred to as `SLICENAME`.
     135{{{
     136$ omni createslice SLICENAME
     137}}}
     138
     139=== 3.2. Load a simple topology in Flack ===
     140For this exercise, we will edit an existing RSpec file.  Start by loading this predefined topology into Flack.
     141
     142{{{
     143#!html
     144<table>
     145<tr><td>
     146  <ol type='a'>
     147    <li>In the Portal, launch Flack for this slice.</li>
     148    <li>From the <b>Import</b> menu (see figure), select the <b>Import from the web</b> item.</li>
     149  </ol>
     150  </td>
     151  <td>
     152     <img border="0"
     153        src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-import-small.png?format=raw"
     154        alt="Import an RSpec into Flack"  title="Import an RSpec into Flack" />
     155     <br />
     156     <b>Figure 3-2</b> <i>Import an RSpec into Flack.</i>
     157  </td>
     158</tr>
     159<tr><td>
     160  <ol type='a' start='3'>
     161    <li>Enter the URL corresponding to the rack type you are using
     162    then click <b>Ok</b>.<br/>
     163      <table border='1'>
     164      <tr>
     165      <th><b>Aggregate Type</b></th>
     166      <th><b>RSpec URL</b></th>
     167      </tr>
     168      <tr><td>
     169      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" alt='InstaGENI' width="75" height="75" />
     170      </td><td>
     171      <tt class="wiki">http://www.gpolab.bbn.com/exp/UnderstandAMAPI/ig/understandAMAPI_ig.rspec</tt>
     172      </td></tr>
     173      <tr><td>
     174      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" alt='ExoGENI'  width="75" height="75" />
     175      </td><td>
     176      <tt class="wiki">http://www.gpolab.bbn.com/exp/UnderstandAMAPI/eg/understandAMAPI_eg.rspec</tt>
     177      </tr>
     178      </table>
     179    </li>
     180    <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
     181    list.  After you click <b>Accept</b>, and 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 src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note">
     189               </td>
     190<td>
     191Because 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:
     192<br/>
     193<i>
     194There were resources detected without a manager selected, please select which manager you would like to use.
     195</i>
     196</td>
     197        </tr>
     198</table>
     199
     200    </li>
     201  </ol>
     202</td>
     203
     204
     205</tr></table>
     206}}}
     207
     208=== 3.3. Modify the RSpec to automatically install and execute network test software ===
     209
     210For this experiment, we'd like some additional software
     211(`Apache`, `iperf`, and a couple of custom scripts) loaded
     212onto the VMs to perform traffic measurements. 
     213
     214{{{
     215#!html
     216
     217<table><tr>
     218<td>
     219  <ol type='a'>
     220     <li>Click on the the <i>i</i> button on the <b>client node</b> (see figure) to manipulate details of the node configuration.
     221
     222
     223<table id="Table_01" border="0" cellpadding="5" cellspacing="0">
     224        <tr>
     225                <td>
     226                        <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note">
     227               </td>
     228<td>
     229When you open the node information, you should see options like those
     230in the figure.  The controls available to you will vary depending on the
     231types of the aggregate manager and the component, but many features are
     232widely available throughout GENI.
     233</td>
     234        </tr>
     235</table>
     236
     237
     238     </li>
     239  </ol>
     240</td>
     241<td>
     242  <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-node-info-small.png?format=raw" width='400'/>
     243     <br />
     244     <b>Figure 3-3</b> <i>Edit the nodes</i>
     245</td>
     246</tr>
     247
     248<tr><td>
     249  <ol type='a' start='2'>
     250
     251<li>The way we will request installation of the proper software and execution
     252of our experiment is to add <i>install</i> and <i>execute</i> services.
     253</li>
     254<li>
     255First, select "<tt>+ Add Install Service</tt>" as shown.  Complete the "Archive URL and a location" using the appropriate information from the following table.
     256
     257      <table border='1'>
     258      <tr>
     259      <th><b>Aggregate Type</b></th>
     260      <th><b>Archive URL</b></th>
     261      <th><b>Installation Location</b></th>
     262      </tr>
     263      <tr><td>
     264      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" alt='InstaGENI' width="75" height="75" />
     265      </td><td>
     266      <tt class="wiki">http://www.gpolab.bbn.com/exp/UnderstandAMAPI/ig/underAMAPI_ig.tar.gz</tt></td>
     267      <td><tt class='wiki'>/local</tt>
     268      </td></tr>
     269      <tr><td>
     270      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" alt='ExoGENI'  width="75" height="75" />
     271      </td><td>
     272      <tt class="wiki">http://www.gpolab.bbn.com/exp/UnderstandAMAPI/eg/underAMAPI_eg.tar.gz</tt></td>
     273      <td><tt class='wiki'>/local</tt>
     274      </td></tr>
     275      </table>
     276  </li>
     277  <li>Similarly, please use the "<tt>+ Add Execute Service</tt>" button to request
     278that the appropriate command be executed at boot time.
     279      <table border='1'>
     280      <tr>
     281      <th><b>Aggregate Type</b></th>
     282      <th><b>Client Install Script</b></th>
     283      <th><b>Server Install Script</b></th>
     284      <th><b>Shell</b></th>
     285      </tr>
     286      <tr><td>
     287      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" alt='InstaGENI' width="75" height="75" />
     288      </td>
     289      <td><tt class="wiki">sudo /local/install-script.sh</tt></td>
     290      <td><tt class="wiki">sudo /local/install-script.sh</tt></td>
     291      <td><tt class='wiki'>sh</tt></td>
     292      </tr>
     293      <tr><td>
     294      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" alt='ExoGENI'  width="75" height="75" />
     295      </td>
     296      <td><tt class="wiki">sudo /local/install-client.sh</tt></td>
     297      <td><tt class="wiki">sudo /local/install-server.sh</tt></td>
     298      <td><tt class='wiki'>sh</tt></td>
     299      </tr>
     300      </table>
     301
     302<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
     303be executed yet, so it will be some time before you will see any relevant
     304error messages if there is a mistake here.</td></tr></table>
     305  </li>
     306</ol>
     307</td>
     308<td>
     309   <table>
     310   <td><img width='400' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-services-small.png?format=raw" />
     311     <br />
     312     <b>Figure 3-4</b> <i>Specify the tarball and install script</i>
     313   </td>
     314   </tr>
     315   </table>
     316</td></tr>
     317
     318<tr><td>
     319  <ol type='a' start='6'>
     320  <li>Once both the <i>install</i> and <i>execute</i> services are specified, please
     321choose <b>Apply</b>. 
     322  </li>
     323  <li><b>Repeat the previous five steps on the server node</b> to add the appropriate <i>install</i> and
     324<i>execute</i> services.
     325  </li>
     326  <li> In addtion, on the server node, click on the <i>link</i> tab
     327      and select <b>Routable Control IP</b> as shown in the figure.
     328  </li>
     329</ol>
     330</td>
     331        <td>
     332        <img
     333      src="http://groups.geni.net/geni/attachment/wiki/GENIEducation/SampleAssignments/UnderstandAMAPI/Graphics/publicIP_labeled_v1.png?format=raw"
     334      alt="Select the 'Routable Control IP' button"  width="400"
     335      title="Select the 'Routable Control IP' button" /> </a>
     336         <br/>
     337         <b>Figure 3-5</b> On the <i>Link</i> tab, select the
     338      "Routable Control IP" button.
     339       </td>
     340
     341</tr>
     342</table>
     343}}}
     344
     345If you have time, it would be instructive to download the `underAMAPI_*.tar.gz` file yourself, and inspect the contents.  You will see the `install-script.sh` file referred to in the execute service, and this is a good example of how you can ask for GENI components to perform tasks for you without any manual intervention.  This is a very useful facility for large experiments!
     346
     347
     348
     349=== 3.4. Export the modified request RSpec ===
     350Now 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.
     351
     352{{{
     353#!html
     354<table><tr>
     355<td>
     356   <ol type='a'>
     357   <li>From the <i>View</i> menu (see figure), select the <b>Preview
     358request document(s)</b> item.  This will bring up a window showing the
     359current RSpec -- please take a moment to inspect it.  The XML elements
     360under the "<tt>flack</tt>" namespace were added for Flack's internal
     361use (containing information about the canvas layout, editing history, etc.),
     362and are ignored by aggregate managers.  The `&lt;node&gt;` and `&lt;link&gt;` elements
     363contain the specification for the components we will request, and if you
     364look closely, you will be able to see the install and execute service
     365elements you added earlier.
     366   </li>
     367   <li>Use the <b>Save to file</b> button (in the upper left) to
     368a local copy of your RSpec with the name <tt>lab1_rspec.xml</tt>.  We'll use this in the next step to
     369demonstrate how other client tools also use RSpec files to communicate
     370requests to aggregate managers.</li>
     371   </ol>
     372   </td>
     373   <td>
     374      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-view-small.png?format=raw" width='400'/>
     375         <br/>
     376         <b>Figure 3-6</b> View and save the final request RSpec
     377   </td>
     378</tr></table>
     379}}}
     380
     381=== 3.5. Instantiate the new experiment using Omni ===
     382
     383For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. 
     384
     385From a terminal, please enter the command:
     386{{{
     387$ omni -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE
     388}}}
     389where {{{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.
     390
     391
     392If all is well, Omni should give you a number of informational messages, such as:
     393{{{
     394INFO:omni:Loading config file /home/geni/.gcf/omni_config
     395}}}
     396
     397It should quickly proceed to the point where it makes the request to the remote manager:
     398{{{
     399INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...
     400}}}
     401
     402This step can sometimes be time-consuming, so please be patient.  If it succeeds, within a couple of minutes Omni should report:
     403{{{
     404INFO:omni: Completed createsliver:
     405}}}
     406
     407and your resource reservation is complete!
     408
     409
     410----
     411= [wiki:GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure Introduction] =
     412= [wiki:GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure/Execute Next:  Execute] =