Changes between Version 17 and Version 18 of UsersGuide


Ignore:
Timestamp:
Oct 22, 2012 11:31:12 AM (12 years ago)
Author:
Ted Faber
Comment:

Use eaxctly 10 nodes. Containerize will now split 11 nodes.

Legend:

Unmodified
Added
Removed
Modified
  • UsersGuide

    v17 v18  
    1111=== Describing the Topology ===
    1212
    13 Our first example is a star topology.  We create a central node and connect 10 other nodes to it. It looks like this:
     13Our first example is a star topology.  We create a central node and connect 9 other nodes to it. It looks like this:
    1414
    1515[[Image(visualization-small.png)]]
     
    1717For 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.
    1818
    19 A 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.
     19A 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 10-node (9 satellites and one central node) physical experiment on DETER, although there are not many physical nodes on DETER with 10 interfaces (one interface for control traffic).
    2020
    2121{{{
     
    2626set center [$ns node]
    2727
    28 # Connect 10 satellites
    29 for { set i 0} { $i < 10 } { incr i} {
     28# Connect 9 satellites
     29for { set i 0} { $i < 9 } { incr i} {
    3030    # Create node n-1 (tcl n($i) becomes n-$i in the experiment)
    3131    set n($i) [$ns node]
     
    3939}}}
    4040 
    41 With 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.
     41With 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-8".  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.
    4242
    4343=== Creating The Containerized Experiment ===
     
    5353The 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}}}.
    5454
    55 With these default parameters {{{containerize.py}}} will put each node into an [http://openvz.org Openvz container] with about 10 containers per physical node.
     55With these default parameters {{{containerize.py}}} will put each node into an [http://openvz.org Openvz container] with at most 10 containers per physical node.
    5656
    5757Running the command above on users -- '''make sure you run it with a project you are a member of''' -- yields:
     
    7575[[Image(hilighted.png)]]
    7676
    77 The containers system has rewritten the description file and stored additional information in the experiment's per-experiment directory that will be used to create the 11 node experiment inside the single-node DETER experiment.  If you look at the ns file DETER has stored (the NS file tab on the experiment page), you will see this file:
     77The containers system has rewritten the description file and stored additional information in the experiment's per-experiment directory that will be used to create the 10 node experiment inside the single-node DETER experiment.  If you look at the ns file DETER has stored (the NS file tab on the experiment page), you will see this file:
    7878
    7979{{{
     
    180180== Advanced Usage ==
    181181
    182 The previous section showed how to create an experiment using only openvz containers packed 10 (or so) to a machine.  This section shows how to change those parameters.
     182The previous section showed how to create an experiment using only openvz containers packed 10 to a machine.  This section shows how to change those parameters.
    183183
    184184=== Using Other Container Types ===
     
    232232tb-add-node-attribute $center containers:node_type process
    233233
    234 # Connect 10 satellites
    235 for { set i 0} { $i < 10 } { incr i} {
     234# Connect 9 satellites
     235for { set i 0} { $i < 9 } { incr i} {
    236236    # Create node n-1 (tcl n($i) becomes n-$i in the experiment)
    237237    set n($i) [$ns node]
     
    258258When we swap it in, the experiment will have 10 satellite containers in qemu VMs and a central process that only forwards packets.  Again, you cannot log in to a process container, but you can use the qemu nodes as though they were physical machines.
    259259
    260 Another interesting mixture of containers is to put a physical node into the mix.  Here is a modified version of [attachment:example3.tcl our mixed topology] that places the {{{n-9}}} satellite on a physical computer, by setting its {{{containers:node_type}}} to {{embedded_pnode}}}.
     260Another interesting mixture of containers is to put a physical node into the mix.  Here is a modified version of [attachment:example3.tcl our mixed topology] that places the {{{n-8}}} satellite on a physical computer, by setting its {{{containers:node_type}}} to {{{embedded_pnode}}}.
    261261
    262262After creating that experiment:
     
    271271[[Image(embedded_pnode.png)]]
    272272
    273 The physical node {{{n-9}}} shows up in the DETER visualization, and otherwise acts as a physical node that is in a 11-node topology.  This experiment uses three different container types: physical nodes, ViewOS processes, and Qemu VMs.
     273The physical node {{{n-8}}} shows up in the DETER visualization, and otherwise acts as a physical node that is in a 10-node topology.  This experiment uses three different container types: physical nodes, ViewOS processes, and Qemu VMs.
    274274
    275275=== Setting Openvz Parameters ===
     
    325325tb-add-node-attribute $center containers:openvz_template ubuntu-12.04-x86_64
    326326
    327 # Connect 10 satellites
    328 for { set i 0} { $i < 10 } { incr i} {
     327# Connect 9 satellites
     328for { set i 0} { $i < 9 } { incr i} {
    329329    # Create node n-1 (tcl n($i) becomes n-$i in the experiment)
    330330    set n($i) [$ns node]