Changes between Initial Version and Version 1 of GEC17Agenda/GettingStartedWithGENI_II/ObtainResources


Ignore:
Timestamp:
07/19/13 22:45:44 (11 years ago)
Author:
Gary Wong
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/GettingStartedWithGENI_II/ObtainResources

    v1 v1  
     1= Obtain Resources: create a slice and reserve resources =
     2Introduction: [wiki:GEC17Agenda/GettingStartedWithGENI_II Getting Started with GENI and the GENI Portal]
     3{{{
     4#!html
     5<table id="Table_01" height="205" border="0" cellpadding="0" cellspacing="0">
     6        <tr>
     7                <td>
     8                        <a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/SetupAccount"><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/design_on.png?format=raw" width="76" height="76" alt="Design/Setup"></a>
     9               </td>
     10               <td>
     11<ul>
     12             <li><b>Part I: Design/Setup</b></li>
     13             <ul>
     14                 <li><a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/SetupAccount">Step 1: Establish Management Environment: Setup your GENI account and join a GENI Project</a></li>
     15                 <li><b><a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/ObtainResources">Step 2: Obtain Resources: Create a slice and reserve resources</a></b></li>
     16             </ul></ul>
     17               </td>
     18        </tr>
     19        <tr>
     20                <td>
     21                        <a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/ExecuteExperiment"><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/execute.png?format=raw" width="76" height="72" alt="Execute"></a>
     22                </td>
     23                <td>
     24             <ul>
     25<li>Part II: Execute</li>
     26             <ul>
     27                 <li><a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/ExecuteExperiment">Execute Experiment: Login to nodes and monitor the experiment execution</a> </li>
     28             </ul></ul>
     29                </td>
     30        </tr>
     31        <tr>
     32                <td>
     33                        <a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/TeardownExperiment"><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/finish.png?format=raw" width="76" height="57" alt="Finish"></a>
     34                </td>
     35
     36                <td>
     37             <ul>
     38             <li>Part III: Finish</li>
     39             <ul>
     40                 <li><a href="http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/TeardownExperiment">Teardown Experiment: Delete Resources</a></li>
     41             </ul></ul>
     42                </td>
     43
     44        </tr>
     45</table>
     46
     47}}}
     48
     49
     50
     51= Instructions =
     52
     53Now that you are a member of a project, you can create a slice and reserve resources.
     54
     55== 4. Create a slice ==
     56
     57{{{
     58#!html
     59<table border="0" cellpadding="0" cellspacing="0">
     60  <tr>
     61    <td>
     62      <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" />
     63    </td>
     64    <td>If you are following on from the Flack 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>
     65  </tr>
     66</table>
     67}}}
     68
     69Otherwise, you will need to create a new slice, which can be done through the GENI Portal, as follows:
     70
     71{{{
     72#!html
     73<table border="0">
     74   
     75      <tr>
     76        <td>
     77
     78        <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" />
     79       </td>
     80       <td >
     81         <ol>
     82            <li> Go to the <i>Home</i> tab. </li>
     83           <li> Press the <b>Create Slice</b> button for this project.</li>
     84            <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>
     85            </li>
     86 
     87
     88          </ol>
     89       </td>
     90       
     91    </tr>
     92 </table>
     93}}}
     94
     95== 4.1. Import a simple experiment ==
     96
     97{{{
     98#!html
     99<p>For this exercise, we will start with a prepared rspec file.</p>
     100
     101<table><tr>
     102<td>
     103  <p>You should load this topology into Flack:</p>
     104  <ol>
     105    <li>From the "Import" menu (see figure), select the "Import from the web" item.</li>
     106    <li>Enter the following URL and open it:
     107      <pre class="wiki">http://protogeni.net/gec17tut2.rspec</pre>
     108    </li>
     109    <li>Because this file contains a generic description of resources and does
     110    not specify any particular aggregate manager, Flack will report
     111    "There were resources detected without a manager selected, please select which manager you would like to use."
     112    Select "OK", and then choose the manager listed on your worksheet from the
     113    list.  Then select "Accept", and a network topology (which might look
     114    familiar if you have completed earlier tutorials) should appear
     115    on the canvas.</li>
     116  </ol>
     117</td>
     118<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-import-small.png?format=raw" /></td>
     119</tr></table>
     120}}}
     121
     122== 4.2. Modify the experiment to automatically install and execute network test software ==
     123
     124{{{
     125#!html
     126<table><tr>
     127<td><p>1. For this sample experiment, we'd like some additional software
     128(<tt>Apache</tt>, <tt>iperf</tt>, and a couple of custom scripts) loaded
     129onto the VMs to perform traffic measurements.  In Flack, you can manipulate
     130the details of the request for a node or link with the "<tt>i</tt>" button
     131on the relevant component on the canvas (see figure).  Do this now on the
     132client node.</p></td>
     133<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-node-info-small.png?format=raw" /></td>
     134</tr></table>
     135
     136<table><tr>
     137<td><p>2. When you open the node information, you should see options like those
     138in the figure.  The controls available to you will vary depending on the
     139types of the aggregate manager and the component, but many features are
     140widely available throughout GENI.</p>
     141
     142<p>3. The way we will request installation of the proper software and execution
     143of our experiment is to add <i>install</i> and <i>execute</i> services.
     144First, select "<tt>+ Add Install Service</tt>" as shown.  Flack will now
     145prompt you for an "Archive URL" and a location for installation.  For this
     146experiment, please enter the URL:
     147<pre class="wiki">
     148http://protogeni.net/gec17tut2.tar.gz
     149</pre>
     150and ask for this to be installed in:
     151<pre class="wiki">
     152/local
     153</pre></p>
     154
     155<p>4. Similarly, please use the "<tt>+ Add Execute Service</tt>" button to request
     156that the command:
     157<pre class="wiki">
     158sudo /local/install-script.sh
     159</pre>
     160be executed using
     161<pre class="wiki">
     162sh
     163</pre></p>
     164
     165<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
     166be executed yet, so it will be some time before you will see any relevant
     167error messages if there is a mistake here.</td></tr></table>
     168
     169<p>5. Once both the "install" and "execute" services are specified, please
     170choose "Apply".  Then repeat the procedure to add the same "install" and
     171"execute" services on the server node.</p>
     172
     173<p>If you have time, it would be instructive to download the "<tt>hellogeni-install</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>
     174</td>
     175<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-services-small.png?format=raw" /></td>
     176</tr></table>
     177}}}
     178
     179== 4.3. Export the modified request RSpec ==
     180{{{
     181#!html
     182<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>
     183
     184<table><tr>
     185<td>
     186<ol>
     187<li>From the "View" menu (see figure), select the "Preview
     188request document(s)" item.  This will bring up a window showing the
     189current rspec -- please take a moment to inspect it.  The XML elements
     190under the "<tt>flack</tt>" namespace were added for Flack's internal
     191use (containing information about the canvas layout, editing history, etc.),
     192and are ignored by aggregate managers.  The "node" and "link" elements
     193contain the specification for the components we will request, and if you
     194look closely, you will be able to see the install and execute service
     195elements you added earlier.</li>
     196<li>Use the "Save to file" button (in the upper left) to
     197make a local copy of your rspec.  We'll use this in the next step to
     198demonstrate how other client tools also use rspec files to communicate
     199requests to aggregate managers.</li>
     200</ol>
     201</td>
     202<td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/PortalOmniExample/ObtainResources/flack-view-small.png?format=raw" /></td>
     203</tr></table>
     204}}}
     205
     206== 5. Instantiate the new experiment using Omni ==
     207
     208For this step, we'll change the approach a bit and switch to a new client tool: the command line Omni client.
     209
     210=== 5.1. Configure Omni ===
     211
     212 1. Go to your browser tab with the GENI Portal page.
     213 1. On that page, select the tab labeled "Profile".  This is on the upper right of the page.
     214 1. Scroll down to the section labeled "Option 1: Automatic omni configuration".
     215 1. Click on "customized configuration data" in Step 2 of this section.
     216 1. Make sure your default project is "ICDCS13".  If not, make that your default.
     217 1. Click "Download omni bundle" and "save" the file.  The file is saved in your Downloads folder.
     218 1. Open a terminal window and type {{{omni-configure.py -f portal}}}.  The cert and key files you need will be installed in the appropriate folders.
     219   
     220=== 5.2. Send the {{{CreateSliver}}} request to the AM ===
     221
     222Once Omni is installed and configured, bringing up the sliver you designed earlier is a one-step procedure.  Just enter the command:
     223
     224{{{
     225$ omni.py -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE
     226}}}
     227
     228where {{{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.
     229
     230
     231If all is well, Omni should give you a number of informational messages, such as:
     232{{{
     233INFO:omni:Loading config file /home/geni/.gcf/omni_config
     234}}}
     235
     236It should quickly proceed to the point where it makes the request to the remote manager:
     237{{{
     238INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...
     239}}}
     240
     241This step can sometimes be time-consuming, so please be patient.  If it succeeds, within a few minutes Omni should report:
     242{{{
     243INFO:omni: Completed createsliver:
     244}}}
     245
     246and your sliver is complete!
     247
     248= [wiki:GEC17Agenda/GettingStartedWithGENI_II/ExecuteExperiment Next: Inspect the experiment execution] =