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

08/08/13 15:41:33 (6 years ago)



  • GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure/DesignSetup

    v3 v4  
    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
    231 <table id="Table_01" border="0" cellpadding="5" cellspacing="0">
    232         <tr>
    233                 <td>
    234                         <img src="" 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>
     228Now that you are a member of a project, you can create a slice and reserve resources.
     230== 4. Create a slice ==
     234<table border="0" cellpadding="0" cellspacing="0">
     235  <tr>
     236    <td>
     237      <img src="" />
     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>
    242 {{{
    243 #!html
    244 <table border="0">
    245       <tr>
     244Otherwise, you will need to create a new slice, which can be done through the GENI Portal, as follows:
     248<table border="0">
     250      <tr>
     251        <td>
     253        <img border="0" src="" 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>
    253          </ol>
    254        </td>
    255         <td>
    256         <img border="0" src="" 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 }}}
    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.
    269 {{{
    270 #!html
    271 <table border="0">
    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>
    281         <img border="0" src="" 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>
    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>
    295         <img border="0" src="" 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>
    313         <img border="0" src="" 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>
    320        <td >
    321          <ol start='9'>
    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="" 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>
    333         </tr>
    334 </table>
    335 </li>
    337          </ol>
    338        </td>
    339        <td>
    341         <img border="0" src="" 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></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>
    358         <img border="0" src="" 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>
    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>
    373         <img border="0" src="" 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>
     263          </ol>
     264       </td>
    377266    </tr>
    378267 </table>
    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>
    395         <img border="0" src="" 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>
    402  </table>
    403 }}}
     270== 4.1. Import a simple experiment ==
     274<p>For this exercise, we will start with a prepared rspec file.</p>
     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="" width="75" height="75" /><b> InstaGENI</b></p>
     283      <pre class="wiki"></pre>
     284      <p><img src="" width="75" height="75" /><b> ExoGENI</b></p>
     285      <pre class="wiki"></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>
     296<td><img src="" /></td>
     300== 4.2. Modify the experiment to automatically install and execute network test software ==
     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="" /></td>
     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>
     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="" width="75" height="75" /><b> InstaGENI</b></p>
     326      <pre class="wiki"></pre>
     327      <p><img src="" width="75" height="75" /><b> ExoGENI</b></p>
     328      <pre class="wiki"></pre>
     329and ask for this to be installed in:
     330<pre class="wiki">
     334<p>4. Similarly, please use the "<tt>+ Add Execute Service</tt>" button to request
     335that the appropriate command:
     336      <p><img src="" width="75" height="75" /><b> InstaGENI</b></p>
     337      <pre class="wiki">sudo /local/</pre>
     338      <p><img src="" width="75" height="75" /><b> ExoGENI</b></p>
     339      <p><pre class="wiki">/local/</pre>(client node only)
     340      <pre class="wiki">/local/</pre>(server node only)</p>
     341be executed using
     342<pre class="wiki">
     346<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="" /></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>
     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>
     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></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>
     356<td><img src="" /></td>
     360== 4.3. Export the modified request RSpec ==
     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>
     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>
     383<td><img src="" /></td>
     387== 5. Instantiate the new experiment using Omni ==
     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:
     392$ -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE
     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.
     398If all is well, Omni should give you a number of informational messages, such as:
     400INFO:omni:Loading config file /home/geni/.gcf/omni_config
     403It should quickly proceed to the point where it makes the request to the remote manager:
     405INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...
     408This step can sometimes be time-consuming, so please be patient.  If it succeeds, within a few minutes Omni should report:
     410INFO:omni: Completed createsliver:
     413and your sliver is complete!