Changes between Version 1 and Version 2 of UsersGuide


Ignore:
Timestamp:
Oct 15, 2012 10:49:51 AM (7 years ago)
Author:
Ted Faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsersGuide

    v1 v2  
    33This document describes the workflow and commands to create an use a containerized experiment.  We work through a couple examples showing the major features of the containers system.  Detailed descriptions of the commands and configuration files are in the [wiki:Reference reference section].
    44
    5 == Creating An Experiment ==
     5== A Conatinerized Experiment ==
     6
     7This example will walk through creating an experimental topology starting with how to describe a topology through building and using the containerized experiment.
     8
     9=== Describing the Topology ===
    610
    711Our first example is a star topology.  We create a central node and connect 10 other nodes to it. It looks like this:
    812
     13[[Image(visualization-small.png)]]
     14
     15For this example we will use the standard DETER topology descriptions.  If you have never used DETER, you should work through the [https://trac.deterlab.net/wiki/Tutorial DETER tutorial] first.  The container system is largely compatible with the physical DETER interface.
     16
     17A DETER-compatible ns2 description of that topology is [attachnemt:example1.tcl attached to this page].  You can download it to {{{users.isi.deterlab.net}}} and follow along.  It is a simple loop, along with the standard DETER boilerplate.  This file can be used to create a 11-node (10 satellites and one central node) physical experiment on DETER, although there are not many physical nodes on DETER with 10 interfaces.
     18
     19{{{
     20source tb_compat.tcl
     21set ns [new Simulator]
     22
     23# Create the center node (named by its variable name)
     24set center [$ns node]
     25
     26# Connect 10 satellites
     27for { set i 0} { $i < 10 } { incr i} {
     28    # Create node n-1 (tcl n($i) becomes n-$i in the experiment)
     29    set n($i) [$ns node]
     30    # Connect center to $n($i)
     31    ns duplex-link $center $n($i) 100Mb 10ms DropTail
     32}
     33
     34# Creation boilerplate
     35$ns rtptoto Static
     36$ns run
     37}}}
     38 
     39With the detailed experiment description in front of us, we see a few more details.  The central node is named "center" and each satellite is names "n-0", "n-1"... through "n-9".  Each connection is a 100 Mb/s link with a 10ms delay.  The round trip time from n-0 to center will be 20 ms and from n-0 to n-1 will be 40 ms.
     40
     41=== Creating The Containerized Experiment ===
     42
     43The container system will build the containerized experiment on top of a DETER physical experiment.  We do this by running a command from the shell on {{{users.isi.deterlab.net}}}.  With a copy of the [attachment:example1.tcl example topology] in your home directory, the following command will create the containerized experiment:
     44
     45{{{
     46$ /share/containers/containerize.py DeterTest exmaple1 ~/example1.tcl
     47}}}
     48
     49The first two parameters are the project and experiment name to hold the DETER experiment.  This invocation will create an experiment called {{{experiment1}}} in the {{{DeterTest}}} project.  As with any DETER experiment, you must be a member of the project with appropriate rights to create an experiment in it.  {{{containerize.py}}} expecte there to be no experiment with that name, and it will fail if one exists.  To remove an experiment you can terminate it through the web interface or use the {{{endexp}}} command.  Terminating an experiment is more final than swapping one out, so be sure that you want to replace the old experiment.  You can also resolve the conflict by renaming your new containerized experiment.
     50
     51The last parameter is the file containing the topology.  That can be an ns2 file, like [attachment:example1.tcl our example], or a [http://fedd.deterlab.net/wiki/TopDl topdl] description.  An ns2 description must end in {{{.tcl}}} or {{{.ns}}}.
     52
     53Running the command above on users -- '''make sure you run it with a project you are a member of''' -- yields:
     54
     55{{{
     56users:~$ /share/containers/containerize.py DeterTest example1 ~/example1.tcl
     57Containerized experiment DeterTest/example1 successfully created!
     58Access it via http://www.isi.deterlab.net//showexp.php3?pid=DeterTest&eid=example1
     59}}}
     60
     61Now we can see what a containerized experiment looks like.
     62
     63=== The Contents of a Containerized Experiment ===
     64
     65If you follow the link to that {{{containerize.py}}} prints, you will see a standard DETER experiment page that looks like this:
     66