Changes between Initial Version and Version 1 of ReferenceGuide


Ignore:
Timestamp:
Oct 16, 2012 10:41:06 AM (12 years ago)
Author:
Ted Faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ReferenceGuide

    v1 v1  
     1[[TOC]]
     2
     3= Reference Guide =
     4
     5This document describes the details of the commands and data structures that make up the containers system.  The [UserGuide User Guide /Tutotial] provides useful context about the workflows and goals of the system that inform these technical details.
     6
     7== containerize.py ==
     8
     9The {{{containerize.py}}} command creates a DETER experiment made up of containers.  The {{{containerize.py}}} program is available from {{{/share/containers/containerize.py}}} on {{{users.isi.deterlab.net}}}.  A sample invocation is:
     10
     11{{{
     12$ /share/containers/containerize.py MyProject MyExperiment ~/mytopology.tcl
     13}}}
     14
     15It will create a new experiment in {{{MyProject}}} called {{{MyExperiment}}} containing the experiment topology in {{{mytopology.tcl}}}.  All the topology creation commands supported by DETER are supported by the conatainerization system, but [https://trac.deterlab.net/wiki/Tutorial/Advanced emulab/DETER program agents] are not.  [https://trac.deterlab.net/wiki/Tutorial/CreatingExperiments#Startingyourapplicationautomatically Emulab/DETER start commands] '''are''' supported.
     16
     17Containers will create an experiment in a group if the project parameter is of the form ''project''/''group''.  To start an experiment in the {{{testing}}} group of the {{{DETER}}} project, the first parameter is specified as {{{DETER/testing}}}.
     18
     19Either an [https://trac.deterlab.net/wiki/nscommands ns2 file] or a [http://fedd.deterlab.net/wiki/TopDl topdl] description is supported.  Ns2 descriptions must end with {{{.tcl}}} or {{{.ns}}}.  Other files are assumed to be topdl descriptions.
     20
     21
     22By default, {{{containerize.py}}} program will partition the topology into openvz containers, packed 10 containers per physical computer.  If the topology is already partitioned - at least one element has a {{{conatiners::partition}}} atttribute - {{{containerize.py}}} will not partition it.  The {{{--force-partition}}} flag causes {{{containerize.py}}} to partition the experiment regardless of the presence of {{{containers:partition}}} attributes.
     23
     24If container types have been assigned to nodes using the {{{containers:node_type}}} attribute, {{{containerize.py}}} will respect them.  Valid container types for the {{{containers:node_type}}} attribute or the {{{--default-container}}} parameter are:
     25
     26|| __Parameter__ || __Container__ ||
     27|| {{{embedded_pnode}}} || Physical Node ||
     28|| {{{qemu}}} || Qemu VM ||
     29|| {{{openvz}}} || Openvz Container ||
     30|| {{{process}}} || ViewOS process ||
     31
     32The {{{containerize.py}}} command takes several parameters that can change its behavior:
     33
     34 {{{--default-container}}}=''kind''::
     35  Containerize nodes without a container type into ''kind''.  If no nodes have been assigned containers, this puts all them into ''kind'' containers.
     36 {{{--force-partition}}}::
     37  Partition the experiment whether or not it has been paritioned already
     38 {{{--packing=}}}''int''::
     39  Attempt to put ''int'' containers into each physical node.  The default {{{--packing}}} is 10.
     40 {{{--config=}}}''filename''::
     41  Read configuration variables from ''filename'' the configuration values are discussed [ReferenceGuide#SiteConfigurationFile below].
     42 {{{--pnode-types=}}}''type1[,type2...]''::
     43  Override the site configuration and request nodes of ''type1'' (or ''type2'' etc.) as host nodes.
     44 {{{--end-node-shaping}}}::
     45   Attempt to do end node traffic shaping even in containers connected by VDE switches.  This works with qemu nodes, but not process nodes.  Topologies that include both openvz nodes and qemu nodes that shape traffic should use this.
     46 {{{--vde-switch-shaping}}}::
     47   Do traffic shaping in VDE switches.  Probably the default, but that is controlled in [ReferenceGuide#SiteConfigurationFile the site configuration].
     48 {{{--image}}}::
     49   Construct a visualization of the virtual topology and leave it in the experiment directories (default)
     50 {{{--no-image}}}::
     51   Do not construct a visualization of the virtual topology and leave it in the experiment directories
     52 {{{--debug}}}::
     53  Print additional diagnostics and leave failed DETER experiments on the testbed
     54 {{{--keep-tmp}}}::
     55   Do not remove temporary files - for debugging only
     56
     57This invocation:
     58
     59{{{
     60$ ./containerize.py --packing 25 --default-container=qemu --force-partition DeterTest faber-packem ~/experiment.xml
     61}}}
     62
     63takes the topology in {{{~/experiment.xml}}} (which must be topdl), packs it into 25 qemu containers per physical node, and creates an experiment called !DeterTest/faber-packem that can be swapped in.  If {{{experiment.xml}}} were already partitioned, it will be re-partitioned.  If some nodes in that topology were assigned to openvz nodes already, those nodes will be still be in openvz containers.
     64
     65The result of a successful {{{containerize.py}}} run is a DETER experiment that can be swapped in.
     66
     67More detailed examples are available in [UserGuide the tutorial]
     68
     69== Site Configuration File ==
     70
     71The site configuration file is an attribute value pair file parsed by a [file:///usr/local/share/doc/python2.7/library/configparser.html python ConfigParser] that sets overall container parameters.  Many of these have legacy internal names.
     72
     73The default site configuration is in {{{/share/containers/site.conf}}} on {{{users.isi.deterlab.net}}}.
     74
     75Acceptable values (and their DETER defaults) are:
     76
     77  backend_server::
     78    The IRC server used as a backend coordination service for grandstand.  Will be replaced by MAGI.  Default: {{{boss.isi.deterlab.net:6667}}}
     79  grandstand_port::
     80    Port that third party applications can contact grandstand on.  Will be replaced by MAGI.  Default: {{{4919}}}
     81  maverick_url::
     82    Default image used by qemu containers.  Default: {{{http://scratch/benito/pangolinbz.img.bz2}}}
     83  url_base::
     84    Base URL of the DETER web interface on which users can see experiments.  Default: {{{http://www.isi.deterlab.net/}}}
     85  qemu_host_hw::
     86    Hardware used by containers.  Default: {{{pc2133,bpc2133,MicroCloud}}}
     87  xmlrpc_server::
     88    Host and port from which to request experiment creation. Default: {{{boss.isi.deterlab.net:3069}}}
     89  qemu_host_os::
     90    OSID to request for qemu container nodess. Default: {{{Ubuntu1204-64-STD}}}
     91  exec_root::
     92    Root of the directory tree holding containers software and libraries.  Developers often change this. Default: {{{/share/containers}}}
     93  openvz_host_os::
     94    OSID to request for openvz nodes. Default {{{CentOS6-64-openvz}}}
     95  openvz_guest_url::
     96    Location to load the openvz template from.  Default: {{{ %(exec_root)s/images/ubuntu-10.04-x86.tar.gz}}}
     97  switch_shaping::
     98    True if switched containers (see below) should do traffic shaping in the VDE switch that connects them.  Default: {{{true}}}
     99  switched_containers::
     100    A list of the containers that are networked with VDE switches.  Default: {{{qemu,process}}}