Changes between Version 3 and Version 4 of ContainerFilesDoc


Ignore:
Timestamp:
Feb 15, 2015 10:47:23 AM (9 years ago)
Author:
Geoff Lawler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ContainerFilesDoc

    v3 v4  
    11This wiki page documents the files created by the DETER containerization system. I've created a simple containerized experiment, then looked at all the files generated, documenting the contents of the files below.
     2
     3== Per Experiment Static Files ==
    24
    35The sample experiment is Deter,muppetnet. The NS file and containerization command are:
     
    7779**children** - Not sure. Is a directory that has files which describe a DAG - relationships between pnodes, openvz, and container nodes. Mostly empty files in this experiment though as the network topology is minimal.
    7880
    79 **config.tgz** - This directory, {{{./containers}}} tarred and gzipped.
     81**config.tgz** - This directory, {{{./containers}}} tarred and gzipped. Untarred into {{{/var/containers/config}} on the pnode by {{{setup/hv/hv}}} after pnode boot.
    8082
    8183**converted.xml** - the same as {{{annotated.xml}}} minus the container information added.
     
    167169
    168170**wirefilters.yaml** - empty YAML file: {{{ {} }}}
     171
     172== Per Experiment Dynamic Files ==
     173
     174These files end up in {{{/space/local/containers}} (softlnked from {{{/var/containers}}} on the physical nodes and in {{{/var/containers}}} on the container nodes. Presumably this directoty gets populated by the experiment startup script invocation {{{sudo /share/containers/setup/hv/bootstrap /proj/Deter/exp/2x4-cont/containers/site.conf}}}.
     175
     176{{{
     177total 56
     178drwxr-xr-x  2 root    root 4096 Feb 15 08:06 bin
     179drwxr-xr-x 10 glawler root 4096 Feb 15 08:10 config
     180-rw-r--r--  1 root    root    0 Feb 15 08:10 configured
     181-rw-r--r--  1 root    root    9 Feb 15 08:06 eid
     182drwxr-xr-x  2 root    root 4096 Feb 15 08:06 etc
     183drwxr-xr-x  2 root    root 4096 Feb 15 08:09 images
     184drwxr-xr-x  7 root    root 4096 Feb 15 08:06 launch
     185drwxr-xr-x  2 root    root 4096 Feb 15 08:10 lib
     186drwxr-xr-x  2 root    root 4096 Feb 15 08:10 log
     187drwxr-xr-x  2 root    root 4096 Feb 15 08:07 mnt
     188drwxr-xr-x  6 root    root 4096 Feb 15 08:06 packages
     189-rw-r--r--  1 root    root    6 Feb 15 08:06 pid
     190drwxr-xr-x  7 root    root 4096 Feb 15 08:06 setup
     191drwxr-xr-x  4 root    root 4096 Feb 15 08:10 vde
     192drwxr-xr-x  2 root    root 4096 Feb 15 08:10 vmchannel
     193}}}
     194
     195** bin/info.py** - spits out basic information to stdout:
     196
     197{{{
     198[(buffynet) glawler@a:/var/containers/bin]$ ./info.py --all
     199NODE=a, PROJECT=Deter, EXPERIMENT=2x4-cont
     200TYPE=qemu
     201NAME=inf000, INET=10.0.0.4, MASK=255.255.255.0, MAC=00:00:00:00:00:04
     202NAME=control0, INET=172.16.183.35, MASK=255.240.0.0, MAC=00:66:00:00:b7:23
     203CONTROL=control0, INET=172.16.183.35, MASK=255.240.0.0, MAC=00:66:00:00:b7:23
     204}}}
     205
     206**/var/containers/launch/hv/hv** - container startup script. This is invoked after the emulab-configured event, which is triggered after the control network interface is configured. This is where it all starts. ***What does HV stand for?** "Hypervisor" maybe? This only runs on the pnode I'm assuming.
     207
     208**/etc/rc.local** - on the containers mounts the appropriate directories and calls a container-type specific bootstrap script and sets up routes (by calling /var/containers/launch/routes.py /var/containers/config) and calls the start command from the orginal NS file (if it exists).
     209
     210== /share/containers/ Files ==
     211
     212Documentation for select files from the containers repo is below.
     213
     214**setup/hv/bootstrap** - This is the file that gets executed as the DETER start_cmd on the pnodes once the experiment is swapped in. It reads the experiment-specific conf file then sets up the local containers working directory (in {{{/share/containers}}). It then installs various packages, both for DETER and platform specific things ("deter_data" and a VDE build). It then runs {{{var/containers/setup/hv/hv}}} to do actual work. This file is described below.
     215
     216**/var/containers/setup/hv/hv** - This script is invoked by the start_cmd script on the pnode after the node has booted and before the containers are up. It untars the ${EXP}/containers dir into {{{/var/containers/config}}} and writes the /etc/{init,init.d} containers control/start/stop script. It then reads the {{{children}}} file. It then calls the per-child setup script ({{/setup/hv/*}}} (although I don't see these). Finally it invokes the /etc/init/containers platform script. (On Ubuntu it uses "start containers".) This maps to /var/containers/launch/hv/hv, described below.
     217
     218**/var/containers/launch/hv/hv** - The script invoked by {{./setup/hv/hv}} on the pnode. It sets up tap pipes and bridges for connecting VDE switches between pnodes. It creates the vde switches. It then calls {{{/var/containers/launch/%s/hv}}} %s=child name for all existing files. There is one of these files for each type of container supported, embedded_pnode, qemu, openvz, and process. The qemu version is explained below.
     219
     220**/var/containers/launch/qemu/hv** - this file is invoked at the end of the launch sequence on a pnode to spawn the qemu containers that will run on that pnode. (The VDE networking is setup before this script is invoked.) Log is written to {{{/var/containers/log/hv_qemu.log}}}. Builds something called "vncboot" (don't know why this is needed). The script then reads the per-experiment YAML config files, mounts the qemu image on the phost (via qemu-nbd), then writes the config information to the qemu disk. This assumes an Ubuntu image, which is bad. There doesn't seem to be any OS/platform checking here at all. (This file writes rc.local to the qemu image.) Then it starts up some IRC-based control channel with a server running on boss. ??? There is no ircd running on boss now, so is this some sort of legacy command/control channel for containers?
     221