Changes between Version 3 and Version 4 of GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure/DesignSetup


Ignore:
Timestamp:
08/08/13 15:41:33 (6 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure/DesignSetup

    v3 v4  
    224224}}}
    225225
    226 === 3.2 (optional) Renew your slice  ===
    227 Slices and the resources within them are reserved until their individual ''expiration times''.  Renewing allows you to extend the expiration time of your slice and the resources in them.
    228 {{{
    229 #!html
    230 
    231 <table id="Table_01" border="0" cellpadding="5" cellspacing="0">
    232         <tr>
    233                 <td>
    234                         <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" width="50" height="50" alt="Warning">
    235                </td>
    236 <td>Slices and the resources within them have <i>distinct</i> expiration times.  You must renew <b>both</b> the slice and the resources separately.
    237 </td>
    238         </tr>
     226
     227
     228Now that you are a member of a project, you can create a slice and reserve resources.
     229
     230== 4. Create a slice ==
     231
     232{{{
     233#!html
     234<table border="0" cellpadding="0" cellspacing="0">
     235  <tr>
     236    <td>
     237      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" />
     238    </td>
     239    <td>If you are following on from the Getting Started with GENI I tutorial, and the slice you created then has not yet expired, you can reuse the same slice -- skip ahead to step 2 (Import a simple experiment).</td>
     240  </tr>
    239241</table>
    240242}}}
    241243
    242 {{{
    243 #!html
    244 <table border="0">
    245       <tr>
    246 
     244Otherwise, you will need to create a new slice, which can be done through the GENI Portal, as follows:
     245
     246{{{
     247#!html
     248<table border="0">
     249   
     250      <tr>
     251        <td>
     252
     253        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalSimpleLayer2Example/Graphics/createslice_3.png?format=raw" alt="Create a GENI Slice"  height="200" title="Create a GENI Slice" />
     254       </td>
    247255       <td >
    248256         <ol>
    249            <li>On the <i>Slice</i> page, select the <b>Renew slice only</b> radio button.</li>
    250 <li>Click on the date below.  In the calendar that pops up, select a date in the near future.</li>
    251 <li>Press <b>Renew</b> to renew the slice.  Renewing the slice now allows the resources to have longer initial expiration times.</li>
    252 
    253          </ol>
    254        </td>
    255         <td>
    256         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/renew_slice_v2.png?format=raw" alt="Renew slice"  width="600" title="Renew Slice" />
    257 <br />
    258          <b>Figure 3-2</b> <i>Renew the slice.</i></i>
    259        </td>
    260       </tr>
    261  </table>
    262 }}}
    263 
    264 
    265 === 3.3 Reserve Two Virtual Machines at One Aggregate ===
    266 The Portal is integrated with a tool, Flack, which allows you to draw topologies of GENI resources and then reserve them.
    267 
    268 
    269 {{{
    270 #!html
    271 <table border="0">
    272    
    273       <tr>
    274        <td >
    275          <ol>
    276             <li>On the <i>Slice</i> tab, press the <b>Flack</b> button.  Flack will open in a new tab.</li>
    277           </ol>
    278        </td>
    279        <td>
    280 
    281         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIEducation/SampleAssignments/LabZero/Graphics/launch_flack_v3.png?format=raw" alt="Launch Flack"  width="600" title="Launch Flack" />
    282 <br />
    283          <b>Figure 3-3</b> <i>Launch Flack</i>
    284        </td>
    285     </tr>
    286       <tr>
    287 
    288        <td >
    289          <ol start='2'>
    290             <li>Wait for Flack to load.  You should see: your username, the slice name, and a list of aggregates.  Flack should look like the picture to the right.</li>
    291           </ol>
    292        </td>
    293        <td>
    294 
    295         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/Flack_login_v1.png?format=raw" alt="Flack"  height="350" title="Flack" />
    296 <br />
    297          <b>Figure 3-4</b> <i>Flack after it has loaded.</i>
    298        </td>
    299     </tr>
    300     <tr>
    301        <td >
    302          <ol start='3'>
    303             <li>Find the aggregate listed on your worksheet.  </li>
    304             <li>Click the <b>VM</b> box next to that aggregate and drag it onto the canvas.</li>
    305             <li>Repeat the above step.  You should now see two VM boxes on the canvas.</li>
    306             <li>Now click near one of the VM boxes on the canvas, then click and drag towards the other VM.  Release when you reach the other VM.  You should now see a line and a box representing a link connecting the two VMs.</li>
    307             <li>The canvas should now look like the picture on the right.</li>
    308             <li>To edit the name of each VM, click the <b>i</b> in the circle.</li>
    309           </ol>
    310        </td>
    311        <td>
    312 
    313         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/oneam_twovmlink_highlight_v2.png?format=raw" alt="Two VMs connected by a link."  height="350" title="Two VMs connected by a link." />
    314 <br />
    315          <b>Figure 3-5</b> <i>Two VMs connected by a link.</i>
    316        </td>
    317     </tr>
    318       <tr>
    319 
    320        <td >
    321          <ol start='9'>
    322 
    323 
    324             <li>In the field at the top, replace "VM" with "client".</li>
    325 <li>If you are using an ExoGENI rack, set the "Sliver Type" to "EC2Small".
    326 <table id="Table_03" border="0" cellpadding="5" cellspacing="0">
    327         <tr>
    328                 <td>
    329                         <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" width="50" height="50" alt="ExoGENI">
    330                </td>
    331                <td>ExoGENI allows you to reserve machines of various sizes.  We will use small ones for this tutorial to conserve resources.</td>
    332                    
    333         </tr>
    334 </table>
    335 </li>
    336 
    337          </ol>
    338        </td>
    339        <td>
    340 
    341         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/label_client_EG_highlight_v2.png?format=raw" alt="Relabel VM"  height="350" title="Relabel VM" />
    342 <br />
    343          <b>Figure 3-6</b> <i>Edit the name of the VM.  Set the Sliver Type on ExoGENI racks.</i>
    344        </td>
    345     </tr>
    346     <tr>
    347        <td >
    348          <ol start='11'>
    349             <li>Now click on "Interfaces and Links" (this is the middle tab with the "link" symbol").</li>
    350             <li>Enter the Desired IP Address for this node which is listed on your worksheet.</li>
    351             <li>Enter the Desired Mask of <i>255.255.255.0</i>.</li>
    352             <li>Then Press "Apply" at the bottom of the screen.</li>
    353             <li>Repeat the above six steps for the second VM, labeling it "server" and setting the server's Desired IP Address.</li>
    354           </ol>
    355        </td>
    356        <td>
    357 
    358         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/label_client_IP_highlight_v3.png?format=raw" alt="Relabel VM"  height="350" title="Relabel VM" />
    359 <br />
    360          <b>Figure 3-7</b> <i>Edit the IP Address and Mask of the VM. </i>
    361        </td>
    362     </tr>
    363 
    364 
    365     <tr>
    366        <td >
    367          <ol start='16'>
    368             <li>Click the Submit button near the bottom of the page.  When prompted, confirm you want to actually reserve resources. </li>
    369           </ol>
    370        </td>
    371        <td>
    372 
    373         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/oneam_twovmlink_labeled_highlight_v1.png?format=raw" alt="Two VMs connected by a link"  height="350" title="Two VMs connected by a link" />
    374 <br />
    375          <b>Figure 3-8</b> <i>Two VMs connected by a link.</i>
    376        </td>
     257            <li> Go to the <i>Home</i> tab. </li>
     258           <li> Press the <b>Create Slice</b> button for this project.</li>
     259            <li> <FONT COLOR="black">As a slice name use the slice name on your worksheet (the slice name should be of the form <code>portal##</code>), you can leave the description empty and press <b>Create Slice</b></font>
     260            </li>
     261 
     262
     263          </ol>
     264       </td>
     265       
    377266    </tr>
    378267 </table>
    379268}}}
    380269
    381 
    382 === 3.4 Check Whether Virtual Machines are Ready to be Used ===
    383 {{{
    384 #!html
    385 <table>
    386     <tr>
    387        <td >
    388          <ol>
    389             <li>After clicking the Submit button, wait for the canvas to turn green.  (This may take awhile.)</li>
    390             <li>The canvas should now look like the picture on the right.</li>
    391           </ol>
    392        </td>
    393        <td>
    394 
    395         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/oneam_twovmlink_ready.png?format=raw" alt="Resources are ready"  height="350" title="Resources are ready" />
    396 <br />
    397          <b>Figure 3-9</b> <i>Two VMs connected by a link are reserved and ready to login.</i>
    398        </td>
    399     </tr>
    400 
    401 
    402  </table>
    403 }}}
     270== 4.1. Import a simple experiment ==
     271
     272{{{
     273#!html
     274<p>For this exercise, we will start with a prepared rspec file.</p>
     275
     276<table><tr>
     277<td>
     278  <p>You should load this topology into Flack:</p>
     279  <ol>
     280    <li>From the "Import" menu (see figure), select the "Import from the web" item.</li>
     281    <li>Enter the URL corresponding to the rack type you are using and open it:
     282      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" width="75" height="75" /><b> InstaGENI</b></p>
     283      <pre class="wiki">http://protogeni.net/gec17tut2.rspec</pre>
     284      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" width="75" height="75" /><b> ExoGENI</b></p>
     285      <pre class="wiki">http://protogeni.net/gec17tut2eg.rspec</pre>
     286    </li>
     287    <li>Because this file contains a generic description of resources and does
     288    not specify any particular aggregate manager, Flack will report
     289    "There were resources detected without a manager selected, please select which manager you would like to use."
     290    Select "OK", and then choose the manager listed on your worksheet from the
     291    list.  Then select "Accept", and a network topology (which might look
     292    familiar if you have completed earlier tutorials) should appear
     293    on the canvas.</li>
     294  </ol>
     295</td>
     296<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-import-small.png?format=raw" /></td>
     297</tr></table>
     298}}}
     299
     300== 4.2. Modify the experiment to automatically install and execute network test software ==
     301
     302{{{
     303#!html
     304<table><tr>
     305<td><p>1. For this sample experiment, we'd like some additional software
     306(<tt>Apache</tt>, <tt>iperf</tt>, and a couple of custom scripts) loaded
     307onto the VMs to perform traffic measurements.  In Flack, you can manipulate
     308the details of the request for a node or link with the "<tt>i</tt>" button
     309on the relevant component on the canvas (see figure).  Do this now on the
     310client node.</p></td>
     311<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-node-info-small.png?format=raw" /></td>
     312</tr></table>
     313
     314<table><tr>
     315<td><p>2. When you open the node information, you should see options like those
     316in the figure.  The controls available to you will vary depending on the
     317types of the aggregate manager and the component, but many features are
     318widely available throughout GENI.</p>
     319
     320<p>3. The way we will request installation of the proper software and execution
     321of our experiment is to add <i>install</i> and <i>execute</i> services.
     322First, select "<tt>+ Add Install Service</tt>" as shown.  Flack will now
     323prompt you for an "Archive URL" and a location for installation.  For this
     324experiment, please enter the appropriate URL:
     325      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" width="75" height="75" /><b> InstaGENI</b></p>
     326      <pre class="wiki">http://protogeni.net/gec17tut2.tar.gz</pre>
     327      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" width="75" height="75" /><b> ExoGENI</b></p>
     328      <pre class="wiki">http://protogeni.net/gec17tut2eg.tar.gz</pre>
     329and ask for this to be installed in:
     330<pre class="wiki">
     331/local
     332</pre></p>
     333
     334<p>4. Similarly, please use the "<tt>+ Add Execute Service</tt>" button to request
     335that the appropriate command:
     336      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" width="75" height="75" /><b> InstaGENI</b></p>
     337      <pre class="wiki">sudo /local/install-script.sh</pre>
     338      <p><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" width="75" height="75" /><b> ExoGENI</b></p>
     339      <p><pre class="wiki">/local/install-client.sh</pre>(client node only)
     340      <pre class="wiki">/local/install-server.sh</pre>(server node only)</p>
     341be executed using
     342<pre class="wiki">
     343sh
     344</pre></p>
     345
     346<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" /></td><td>Be very careful when entering this information -- these commands will not
     347be executed yet, so it will be some time before you will see any relevant
     348error messages if there is a mistake here.</td></tr></table>
     349
     350<p>5. Once both the "install" and "execute" services are specified, please
     351choose "Apply".  Then repeat the procedure to add the same "install" and
     352"execute" services on the server node.</p>
     353
     354<p>If you have time, it would be instructive to download the "<tt>gec17tut2.tar.gz</tt>" file yourself, and inspect the contents.  You will see the <tt>install-script.sh</tt> 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!</p>
     355</td>
     356<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-services-small.png?format=raw" /></td>
     357</tr></table>
     358}}}
     359
     360== 4.3. Export the modified request RSpec ==
     361{{{
     362#!html
     363<p>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.</p>
     364
     365<table><tr>
     366<td>
     367<ol>
     368<li>From the "View" menu (see figure), select the "Preview
     369request document(s)" item.  This will bring up a window showing the
     370current rspec -- please take a moment to inspect it.  The XML elements
     371under the "<tt>flack</tt>" namespace were added for Flack's internal
     372use (containing information about the canvas layout, editing history, etc.),
     373and are ignored by aggregate managers.  The "node" and "link" elements
     374contain the specification for the components we will request, and if you
     375look closely, you will be able to see the install and execute service
     376elements you added earlier.</li>
     377<li>Use the "Save to file" button (in the upper left) to
     378make a local copy of your rspec.  We'll use this in the next step to
     379demonstrate how other client tools also use rspec files to communicate
     380requests to aggregate managers.</li>
     381</ol>
     382</td>
     383<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-view-small.png?format=raw" /></td>
     384</tr></table>
     385}}}
     386
     387== 5. Instantiate the new experiment using Omni ==
     388
     389For this step, we'll change the approach a bit and switch to a new client tool: the command line Omni client.  From a terminal, please enter the command:
     390
     391{{{
     392$ omni.py -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE
     393}}}
     394
     395where {{{AM_NICKNAME}}} is the nickname for your assigned aggregate manager and {{{SLICENAME}}} is the name of the slice you created at the portal (both of these are given on your worksheet).  {{{RSPEC_FILE}}} should be replaced with the filename of the rspec you saved in step 4.
     396
     397
     398If all is well, Omni should give you a number of informational messages, such as:
     399{{{
     400INFO:omni:Loading config file /home/geni/.gcf/omni_config
     401}}}
     402
     403It should quickly proceed to the point where it makes the request to the remote manager:
     404{{{
     405INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...
     406}}}
     407
     408This step can sometimes be time-consuming, so please be patient.  If it succeeds, within a few minutes Omni should report:
     409{{{
     410INFO:omni: Completed createsliver:
     411}}}
     412
     413and your sliver is complete!
    404414
    405415