Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/SystematicExprCaseStudy/InstallSoftware


Ignore:
Timestamp:
08/12/14 18:03:25 (7 years ago)
Author:
xliu@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/SystematicExprCaseStudy/InstallSoftware

    v1 v1  
     1[[PageOutline]]
     2
     3'''[http://groups.geni.net/syseng/wiki/XuanSandbox#ATutorialonSystematicExperimentalDesign A Tutorial on Systematic Experimental Design]'''
     4
     5
     6
     7{{{
     8#!html
     9
     10<div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;">
     11<img id="Image-Maps_5201305222028436" src="http://groups.geni.net/syseng/attachment/wiki/XuanSandbox/InstallSoftware/SingleNode.png?format=raw" usemap="#Image-Maps_5201305222028436" border="0" width="495" height="82" alt="" />
     12<map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436">
     13<area shape="rect" coords="12,12,132,73" href="http://groups.geni.net/syseng/wiki/XuanSandbox/InstallSoftware" alt="" title=""    />
     14<area shape="rect" coords="185,12,313,73" href="http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo" alt="" title=""    />
     15<area shape="rect" coords="364,12,490,73" href="http://groups.geni.net/syseng/wiki/XuanSandbox/ScalingUp" alt="" title=""    />
     16<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" />
     17</map>
     18<!-- Image map text links - End - -->
     19
     20</div>
     21}}}
     22
     23
     24
     25Our goal is to setup a layer-3 virtual network with multiple virtual routers. Hence, the first step is to install the routing software. There are various options, such as [http://www.xorp.org `XORP`] and [http://www.quagga.net `Quagga`]. In this tutorial, we will install XORP to enable routing functionalities on nodes.
     26
     27Sometimes it may take a long time to install software on a node, so it is always good to start with one node to test out the whole installation process. The figure below provides an overview of the software installation to a VM. This process turns a generic VM into a software router.
     28
     29[[Image(XuanSandbox/InstallSoftware:softwareinstall-flow.png)]]
     30
     31= 1. Reserve a VM with Standard Image =
     32
     33Assume we have a slice created already. We want to reserve a XenVM running a standard Ubuntu image as the basis of the software router. 
     34
     35== a. Create VM from an InstaGENI ==
     36
     37Launch Flack for your slice, and reserve a virtual machine from one of the aggregates (e.g., InstaGENI aggregate at Clemson).
     38
     39[[Image(XuanSandbox/InstallSoftware:portal-slice.png)]]
     40
     41[[Image(XuanSandbox/InstallSoftware:flack-alloc-vm.png)]]
     42
     43
     44{{{
     45#!html
     46<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"></td><td> Please go to <a href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure/DesignSetup">HowToReserveVM</a> for details on how to reserve a VM from an aggregate.</td></tr></table>
     47  </li>
     48</ol>
     49</td>
     50</tr>
     51</table>
     52}}}
     53
     54
     55
     56
     57== b. Select a Standard Image ==
     58
     59Click [[Image(XuanSandbox/InstallSoftware:info.jpg)]] to edit the property of the VM.
     60
     61Select the disk image that is to be loaded to the VM. In this tutorial, we select '''Ubuntu 12.04 LTS'''.
     62
     63[[Image(XuanSandbox/InstallSoftware:flack-vm-property.png, 48%, nolink)]]
     64
     65Click [[Image(XuanSandbox/InstallSoftware:apply.png)]] to save the change.
     66
     67== c. Reserve the VM ==
     68
     69Click [[Image(XuanSandbox/InstallSoftware:flack-submit.png)]] to send the VM reservation request.
     70
     71
     72
     73
     74== d. Login to the VM ==
     75
     76Once the VM allocation is ready (i.e., the canvas turns into green in Flack), we are able to login to the node from a terminal using `ssh`.
     77{{{
     78ssh username@hostname -p xxxxx
     79}}}
     80
     81
     82{{{
     83#!html
     84<table border="0" cellpadding="0" cellspacing="0">
     85<tr>
     86<td><img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"></td>
     87<td>  You can find information on how to login to GENI hosts from <a href="http://groups.geni.net/geni/wiki/HowTo/LoginToNodes">HOWTOLOGIN</a>.</td></tr></table>
     88  </li>
     89</ol>
     90</td>
     91</tr>
     92</table>
     93}}}
     94
     95
     96= 2. Manual Installation =
     97
     98In this tutorial, we will install `XORP 1.8.5` on `Ubuntu 12.04`, and the installation takes the following steps:
     99
     100 * Install Dependencies
     101{{{
     102$sudo apt-get update
     103$sudo apt-get install libssl-dev
     104$sudo apt-get install ncurses-dev
     105$sudo apt-get install libpcap-dev
     106$sudo apt-get install g++ traceroute
     107$sudo apt-get install scons
     108}}}
     109 * Download XORP source files
     110{{{
     111$cd ~/
     112$wget http://www.xorp.org/releases/current/xorp-1.8.5-src.tar.bz2
     113$tar jvxf xorp-1.8.5-src.tar.bz2
     114}}}
     115
     116 * Compile and build `XORP`
     117{{{
     118$cd xorp
     119$scons
     120$sudo scons install
     121}}}
     122
     123 * Verify the `XORP` installation (Optional)
     124{{{
     125$scons check
     126}}}
     127
     128
     129The whole installation process without the last optional step will take about 40 minutes to complete. Running `scons check` will probably take another hour to complete. If everything goes smoothly, you should be able to find the directory `xorp` under path `/usr/local/`.
     130
     131
     132{{{
     133#!html
     134<table border="0" cellpadding="0" cellspacing="0">
     135<tr>
     136<td><img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"></td>
     137<td>  If you try to install other version of XORP, please check the <a href="http://www.xorp.org XORP Official Website">XORP Official Website</a> for details on the dependencies and installation instructions. </td></tr></table>
     138  </li>
     139</ol>
     140</td>
     141</tr>
     142</table>
     143}}}
     144
     145= 3. Create Custom Image =
     146
     147From the manual installation procedure, we learned that it is not efficient to login to every VM and then install `XORP`. An alternative way is to create a custom image of `Ubuntu 12.04 LTS` with `XORP` pre-installed, and save this custom image for future usage. We can create InstaGENI custom image via either Flack or Omni, details can be found at [http://groups.geni.net/geni/wiki/HowTo/ManageCustomImagesInstaGENI ManageCustomImageInstaGENI].
     148
     149Here we use Flack to create InstaGENI custom image of `Ubuntu 12.04` that has `XORP` pre-installed.
     150
     151In Flack, for the same VM that we have just installed `xorp`, go to it's node property (i.e., clicking [[Image(XuanSandbox/InstallSoftware:info.jpg)]]), and click the button "Create Image".
     152
     153[[Image(XuanSandbox/InstallSoftware:flack-vm-customimage.png, 60%, nolink)]]
     154
     155In about 10 minutes, you will get an email that has image information similar to the following:
     156{{{
     157Image URN: urn:publicid:IDN+instageni.clemson.edu+image+ch-geni-net:LabwikiWithXORP
     158Image URL: https://www.instageni.clemson.edu/image_metadata.php?uuid=21a48773-f7cc-11e3-aa57-000000000000
     159}}}
     160
     161
     162{{{
     163#!html
     164<table border="0" cellpadding="0" cellspacing="0">
     165<tr>
     166<td><img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"></td>
     167<td>  The custom image with XORP preinstalled with URL below is ready for use, if you want to skip Step 2 (Manual Installation). </td></tr></table>
     168  </li>
     169</ol>
     170</td>
     171</tr>
     172</table>
     173}}}
     174
     175
     176{{{
     177https://www.instageni.clemson.edu/image_metadata.php?uuid=21a48773-f7cc-11e3-aa57-000000000000
     178}}}
     179
     180
     181If your are going to use the same slice in the next step, now it's time to release the VM resource.
     182 * Use Omni
     183{{{
     184$ omni.py -a <aggregate name> deletesliver <slicename>
     185}}}
     186
     187 * Use Flack
     188  * Press the '''Delete''' button in the bottom of your canvas.
     189  * Select '''Delete at used manager''' and '''confirm''' your selection.
     190
     191
     192= 4. Verify InstaGENI Custom Image =
     193
     194Now let's load the custom image created in Step 3.
     195
     196Create a new VM in Flack, and edit the node property. Instead of selecting an advertised image as we did in step 1.b, we will use the URL to the custom image we just created in step 3. Copy an paste the following URL
     197to the URL field.
     198
     199{{{
     200https://www.instageni.clemson.edu/image_metadata.php?uuid=21a48773-f7cc-11e3-aa57-000000000000
     201}}}
     202
     203
     204[[Image(XuanSandbox/InstallSoftware:flack-load-customimage.png, 60%, nolink)]]
     205
     206Apply the change, and submit the VM reservation request in Flack.
     207
     208Once the VM is ready to login, we can verify the XORP installation.
     209
     210{{{
     211xuanliu@xen:$ cd /usr/local/xorp/sbin
     212xuanliu@xen:/usr/local/xorp/sbin$ ls
     213bgp_xrl_shell_funcs.sh  fea_xrl_shell_funcs.sh  xorp_profiler  xorpsh
     214call_xrl                rib_xrl_shell_funcs.sh  xorp_rtrmgr
     215}}}
     216
     217= 5. Cleanup the Slice =
     218
     219After verify the `XORP` installation, we can cleanup the slice for next step.
     220
     221 * Use Omni
     222{{{
     223$ omni.py -a <aggregate name> deletesliver <slicename>
     224}}}
     225
     226 * Use Flack
     227  * Press the '''Delete''' button in the bottom of your canvas.
     228  * Select '''Delete at used manager''' and '''confirm''' your selection.
     229
     230
     231
     232[http://groups.geni.net/syseng/wiki/XuanSandbox#ATutorialonSystematicExperimentalDesign Overview]
     233
     234[http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo Step II: Small Topology]