Changes between Version 18 and Version 19 of GiB-gettingStarted


Ignore:
Timestamp:
09/28/12 19:02:14 (12 years ago)
Author:
Vic Thomas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GiB-gettingStarted

    v18 v19  
    66
    77
    8 === Install GENI-in-a-Box ===
     8== Install GENI-in-a-Box ==
    99''Please make sure you have [https://www.virtualbox.org VirtualBox] Version 4.1.16 or later installed on your computer.''
    1010
     
    1616
    1717
    18 === Get Started with a Simple Experiment ===
    19 
    20 1. You will be automatically logged into the GENI-in-a-Box virtual machine when it starts up.   Open up a terminal window by clicking on the icon for a terminal on top of the screen.
     18== Get Started with a Simple Experiment ==
     19
     20=== Discover Resources ===
     21
     22We start by finding out the aggregates available to us inside GENI-in-a-Box and learning about the resources advertised by these aggregates:
     231. After you are logged into the GENI-in-a-Box virtual machine, open up a terminal window by clicking on the icon for a terminal on top of the screen.
    2124
    22252. In the terminal window, use Omni to list the aggregates available to you using the command {{{omni.py listaggregates}}}.   You should see something like this in your terminal window:
     
    4346}}}
    4447
    45 Look at the Result Summary from Omni.  You'll see that Omni found one aggregate available to you at URL {{{http://geni-in-a-box.net:8001}}}.  This is the aggregate you will use to run your experiments.
     48Look at the {{{Result Summary}}} from Omni.  You'll see that Omni found one aggregate available to you at URL {{{http://geni-in-a-box.net:8001}}}.  This is the aggregate you will use to run your experiments.
    4649
    47503. Now, let's find out the resources advertised by this aggregate using the command {{{omni.py -a http://geni-in-a-box.net:8001 listresources}}}:
     
    121124$
    122125}}}
    123 The output of the command is the ''advertisement Rspec'' from the GENI-in-a-Box aggregate.  You'll see the aggregate advertises six compute resources.   Only two are shown here for readability reasons but you will find the complete advertisement rspec [attachment:gib-advert.rspec here].  Look at the description of the first resource in the spec.   This compute resources is an openVZ container running Fedora 15 image (or an Ubuntu 10 image if you are using the Ubuntu flavor of GENI-in-a-Box).  The  resource has four network interfaces: {{{eth0}}} through {{{eth3}}}.  {{{eth0}}} is a control interface and is not available to the experimenter.  All six compute resources advertised by this aggregate are identical.  You can therefore use this aggregate to create experiment topologies with up to six nodes and up to three links per node.
    124 
    125 4. We are now ready to run an experiment using these resources.  We'll start with a very simple experiment that consists of two hosts connected to one another by a single link.   When the hosts come up they execute an experimenter specified script that:
     126The output of the command is the ''advertisement rspec'' from the GENI-in-a-Box aggregate.  You'll see the aggregate advertises six compute resources.   Only two are shown here for readability reasons but you will find the complete advertisement rspec [attachment:gib-advert.rspec here].  Look at the description of the first resource in the rspec.   This compute resources is an openVZ container running Fedora 15 image (or an Ubuntu 10 image if you are using the Ubuntu flavor of GENI-in-a-Box).  The  resource has four network interfaces: {{{eth0}}} through {{{eth3}}}.  {{{eth0}}} is a control interface and is not available to the experimenter.  All six compute resources advertised by this aggregate are identical.  You can therefore use this aggregate to create experiment topologies with up to six nodes and up to three links per node.
     127
     128=== Running an Experiment ===
     129We are now ready to run an experiment using these resources.  We'll start with a very simple experiment that consists of two hosts connected to one another by a single link.   When the hosts come up they execute an experimenter specified script that:
    126130    * Downloads and installs iperf on each host.
    127     * Runs iperf in server mode on the host named 'left' and iperf in client mode on the host named 'right'.  The outputs of the iperf commands are written to /tmp/iperf-srv.log and /tmp/iperf-client.log on the respective hosts.
    128 We will ssh into these hosts to view these logs.
     131    * Runs iperf in server mode on one host and and in client mode on the other host.  The outputs of the iperf commands are written to /tmp/iperf-server.log and /tmp/iperf-client.log on the respective hosts.
     132As a part of this experiment we will ssh into these hosts to view these logs.
    129133
    130134The request rspec for this experiment (and other examples of request rspecs) are in the directory {{{~/geni-in-a-box}}}.
     
    135139example-scripts      install-example.rspec  out.log        three-nodes-lan.rspec
    136140}}}
    137 We'll use the spec file called two-nodes-iperf.rspec.  You can view it [attachment:two-nodes-iperf.rspec here] or inside the VM.  This rspec requests two nodes called left and right, each of which has one network interface called left:if0 on node left and right:if0 on node right.  The {{{<install>}}} element in the rspec asks the aggregate to download a [attachment:iperf-execute-script.sh script] from the specified URL, uncompress and untar it,  and save it in the /local directory.  The <execute> element asks the aggregate to execute the specified script when the hosts come up.  In this case the script to be executed is the one that was installed in /local.
     141We'll use the rspec file called two-nodes-iperf.rspec.  You can view it [attachment:two-nodes-iperf.rspec here] or inside the VM.  This rspec requests two hosts called {{{left}}} and {{{right}}}.  Host {{{left}}} has one interface called {{{left:if0}}} and host {{{right}}} has one interface called {{{right:if0}}}.  The two interfaces are connected by a link called {{{left-right-lan}}}.   The {{{<install>}}} element in the rspec asks the GENI-in-a-Box aggregate manager to download a [attachment:iperf-execute-script.sh script] from the specified URL, uncompress and untar it,  and save it in the /local directory.  The {{{<execute>}}} element asks the aggregate to execute the specified script when the hosts come up.  In this case the script to be executed is the one that was installed in {{{/local}}}.
     142
     143The following steps will walk you through running this experiment:
     1441. First we need to create a slice using the command {{{omni.py createslice myslice}}} where {{{myslice}}} is the name or our slice (of course you can give you slice some other name).
     145{{{
     146$ omni.py createslice myslice
     147INFO:omni:Loading config file /home/gibuser/.gcf/omni_config
     148INFO:omni:Using control framework gib_ch
     149INFO:omni:Created slice with Name myslice, URN urn:publicid:IDN+geni:gpo:gcf+slice+myslice, Expiration 2012-09-28 23:49:43
     150INFO:omni: ------------------------------------------------------------
     151INFO:omni: Completed createslice:
     152
     153  Options as run:
     154                framework: gib_ch
     155                getversionCacheName: /home/gibuser/.gcf/get_version_cache.json
     156
     157  Args: createslice myslice
     158
     159  Result Summary: Created slice with Name myslice, URN urn:publicid:IDN+geni:gpo:gcf+slice+myslice, Expiration 2012-09-28 23:49:43
     160 
     161INFO:omni: ============================================================
     162$
     163}}}
     164
     1652. We now send our [wiki:two-nodes-iperf.rspec request rspec] to the GENI-in-a-Box aggregate manager using the command {{{omni.py -a http://geni-in-a-box.net:8001 createsliver myslice two-nodes-iperf.rspec}}}.  If our request is successful, the aggregate manager will allocate the requested resources to our slice.  In GENI parlance the resources allocated to our slice are called slivers.
    138166
    139167
     
    1431713. Now, let's find out the GENI AM API version and GENI Rspecs version supported by this aggregate using the command {{{omni.py -a http://geni-in-a-box.net:8001 get version}}}:
    144172{{{
    145 $omni.py  -a http://geni-in-a-box.net:8001 getversion
     173$ omni.py  -a http://geni-in-a-box.net:8001 getversion
    146174INFO:omni:Loading config file /home/gibuser/.gcf/omni_config
    147175INFO:omni:Using control framework gib_ch