Changes between Version 17 and Version 18 of UsersGuide
- Timestamp:
- Oct 22, 2012 11:31:12 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersGuide
v17 v18 11 11 === Describing the Topology === 12 12 13 Our first example is a star topology. We create a central node and connect 10other nodes to it. It looks like this:13 Our first example is a star topology. We create a central node and connect 9 other nodes to it. It looks like this: 14 14 15 15 [[Image(visualization-small.png)]] … … 17 17 For 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. 18 18 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 1 1-node (10 satellites and one central node) physical experiment on DETER, although there are not many physical nodes on DETER with 10 interfaces.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 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). 20 20 21 21 {{{ … … 26 26 set center [$ns node] 27 27 28 # Connect 10satellites29 for { set i 0} { $i < 10} { incr i} {28 # Connect 9 satellites 29 for { set i 0} { $i < 9 } { incr i} { 30 30 # Create node n-1 (tcl n($i) becomes n-$i in the experiment) 31 31 set n($i) [$ns node] … … 39 39 }}} 40 40 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.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-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. 42 42 43 43 === Creating The Containerized Experiment === … … 53 53 The 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}}}. 54 54 55 With these default parameters {{{containerize.py}}} will put each node into an [http://openvz.org Openvz container] with a bout 10 containers per physical node.55 With these default parameters {{{containerize.py}}} will put each node into an [http://openvz.org Openvz container] with at most 10 containers per physical node. 56 56 57 57 Running the command above on users -- '''make sure you run it with a project you are a member of''' -- yields: … … 75 75 [[Image(hilighted.png)]] 76 76 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 1 1node 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: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 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: 78 78 79 79 {{{ … … 180 180 == Advanced Usage == 181 181 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.182 The 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. 183 183 184 184 === Using Other Container Types === … … 232 232 tb-add-node-attribute $center containers:node_type process 233 233 234 # Connect 10satellites235 for { set i 0} { $i < 10} { incr i} {234 # Connect 9 satellites 235 for { set i 0} { $i < 9 } { incr i} { 236 236 # Create node n-1 (tcl n($i) becomes n-$i in the experiment) 237 237 set n($i) [$ns node] … … 258 258 When 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. 259 259 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}}}.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-8}}} satellite on a physical computer, by setting its {{{containers:node_type}}} to {{{embedded_pnode}}}. 261 261 262 262 After creating that experiment: … … 271 271 [[Image(embedded_pnode.png)]] 272 272 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.273 The 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. 274 274 275 275 === Setting Openvz Parameters === … … 325 325 tb-add-node-attribute $center containers:openvz_template ubuntu-12.04-x86_64 326 326 327 # Connect 10satellites328 for { set i 0} { $i < 10} { incr i} {327 # Connect 9 satellites 328 for { set i 0} { $i < 9 } { incr i} { 329 329 # Create node n-1 (tcl n($i) becomes n-$i in the experiment) 330 330 set n($i) [$ns node]