Changes between Version 19 and Version 20 of UsersGuide
- Timestamp:
- Oct 22, 2012 2:22:35 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersGuide
v19 v20 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 [attach nemt: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).19 A DETER-compatible ns2 description of that topology is [attachment: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 {{{ … … 43 43 === Creating The Containerized Experiment === 44 44 45 The 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:45 The 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 named {{{experiment1.tcl}}}, the following command will create the containerized experiment: 46 46 47 47 {{{ … … 105 105 106 106 The two files {{{/var/containers/pid}}} and {{{/var/containers/eid}}} contain the project name and experiment name. Scripts can make use of these. 107 108 The rest of the contents of that directory are primarily used internally by the implementation, but a more detailed listing is in the [ReferenceGuide#Per-experimentDirectory reference guide]. 107 109 108 110 At this point, as with any DETER experiment, the topology does not have any resources attached. To get the resources, swap the experiment in from the web interface or using the {{{swapexp}}} command. … … 161 163 While start commands that make use of shell syntax for multiple commands and file redirection will generally work, syntax errors will cause them to fail silently. Because of this, and because containerized experiments cannot have as long a start command string, we recommend that if you are doing anything more complex than calling a single program, you script this and run the script from the per-expriment directory or your home directory. 162 164 163 Start commands give offer a simple workaround for detecting that all nodes in an experiment have started. A script like this:165 Start commands give offer a simple workaround for detecting that all nodes in an experiment have started. 164 166 165 167 {{{ … … 172 174 }}} 173 175 174 Making th at scriptthe start command of all nodes will put the time that each local container came up in the the {{{startup}}} directory under the per-experiment directories. For example, {{{n-0.example1.DeterTest}}} will create {{{/proj/DeterTest/exp/example1/startup/n-0}}}. An experimenter can monitor that directory on {{{users}}} and know which nodes are up.176 Making the script above the start command of all nodes will put the time that each local container came up in the the {{{startup}}} directory under the per-experiment directories. For example, {{{n-0.example1.DeterTest}}} will create {{{/proj/DeterTest/exp/example1/startup/n-0}}}. An experimenter can monitor that directory on {{{users}}} and know which nodes are up. 175 177 176 178 === Releasing Resources === … … 215 217 === Mixing Containers === 216 218 217 Mixing containers requires the experimenter to assign container types in their topology assignment. This is done by attaching an attribute to nodes. The attribute is named {{{containers:node_type}}} it takes the same values as the [UsersGuide#UsingOtherContainerTypes --default-container parameter to containerize.py]. If the experiment definition is in [http://fedd.isi.deterlab.net/wiki/TopDl topdl] the attribute can be attached using the [http://fedd.deterlab.net/wiki/TopdlLibrary#SharedFunctions standard topdl routines]. Attaching the attribute in ns2 is done using the DETER {{{tb-add-node-attribute}}} command.219 Mixing containers requires the experimenter to assign container types in their topology description. This is done by attaching an attribute to nodes. The attribute is named {{{containers:node_type}}} it takes the same values as the [UsersGuide#UsingOtherContainerTypes --default-container parameter to containerize.py]. If the experiment definition is in [http://fedd.isi.deterlab.net/wiki/TopDl topdl] the attribute can be attached using the [http://fedd.deterlab.net/wiki/TopdlLibrary#SharedFunctions standard topdl routines]. Attaching the attribute in ns2 is done using the DETER {{{tb-add-node-attribute}}} command. 218 220 219 221 {{{ … … 313 315 }}} 314 316 315 Each of these parameters can be set on individual nodes using attributes. The attribute to set a template on a node is {{{containers:openvz_template}} and the attribute to set the disk space is {{{containers:openvz_diskspace}}}. [attachment:example5.tcl This example] shows setting these openvz parameters per node:317 Each of these parameters can be set on individual nodes using attributes. The attribute to set a template on a node is {{{containers:openvz_template}}} and the attribute to set the disk space is {{{containers:openvz_diskspace}}}. [attachment:example5.tcl This example] shows setting these openvz parameters per node: 316 318 317 319 {{{