Changes between Version 19 and Version 20 of UsersGuide


Ignore:
Timestamp:
Oct 22, 2012 2:22:35 PM (12 years ago)
Author:
Ted Faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsersGuide

    v19 v20  
    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 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).
     19A 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).
    2020
    2121{{{
     
    4343=== Creating The Containerized Experiment ===
    4444
    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:
     45The 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:
    4646
    4747{{{
     
    105105
    106106The two files {{{/var/containers/pid}}} and {{{/var/containers/eid}}} contain the project name and experiment name.  Scripts can make use of these.
     107
     108The 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].
    107109
    108110At 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.
     
    161163While 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.
    162164
    163 Start commands give offer a simple workaround for detecting that all nodes in an experiment have started.  A script like this:
     165Start commands give offer a simple workaround for detecting that all nodes in an experiment have started.
    164166
    165167{{{
     
    172174}}}
    173175
    174 Making that script 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.
     176Making 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.
    175177
    176178=== Releasing Resources ===
     
    215217=== Mixing Containers ===
    216218
    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.
     219Mixing 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.
    218220
    219221{{{
     
    313315}}}
    314316
    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:
     317Each 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:
    316318
    317319{{{