Container Description File

Name

Container Description File -- Describe containes to Manager configuration container wizard

Synopsis


[CONFIG]
native_tree=/location/of/opts/in/native/system
container_tree=/location/of/opts/in/containerized/systems

[container-name]
path=/path/to/container
usropt=usr-opt-for-that-container
bindings=native,native:container...
....

      

INTRODUCTION

Configuring the manager for an experiment is a complex process and the initial set of configuration tools is quite simplistic. The container wizard allows users to define containers that can be used to run programs and event loggers using a configuration file to define the set of containers and how to specify them and their bindings for /usr/opt as well as other bindings that might be required to make that container work correctly (e.g. bindings needed to make the module system work within the container.

The wizard can use the information in this configuration file to present options for the version of NSCLDAQ to setup within the container as well as provide the option to make other filesystem bindings.

See the ContainerWizard (1daq) man page for more information about what the container wizard does, and where it looks for its configuration file.

Configuration file format

The configuration file format used is .ini (or .toml if you prefer). In that format the file has sections which are introduced by [sectionname] and each section has a number of key=value pairs.

A mandatory [CONFIG] section describes where the /usr/opt directories live in both native and containerized file systems. This information is used by the wizard to enumerate the versions of NSCLDAQ that are installed to present them as options to the user. The keys in this section are mandatory and are:

native_tree

Where the /usr/opt directories live in the native file system.

container_tree

where the /usr/opt directories get mapped in the containerized systems. Note that this binding will automatically be made by the wizard.

Subsequent sections are container names to present to the user. These sections have both mandatory and optional keys:

path (Mandatory)

The value of this key is the path to the container image in the host filesystem.

usropt (Mandatory)

The directory that should be bound to /usr/opt in the container. This binding will be made relative to the native_tree value in the [CONFIG] section. For example, if native_tree is /usr/opt and usropt is opt-buster, if selected, the container will bind /usr/opt/opt-buster:/usr/opt.

bindings (Optional)

If specified these are additional bindings that will be made when the container is activated. The value is a comma separated list of bindings. Each binding is of the form nativepath or nativepath:containerpath. The first form will bind nativepath to the same location in the container filesystem. The second form will bind nativepath to containerpath in the container filesystem.

EXAMPLE

This example shows a configuration file that's part of the FRIB configuration file:

Example 1. Sample Container Configuration File


[CONFIG]
native_tree=/usr/opt
container_tree=/non-container

[jessie]
path=/usr/opt/nscl-jessie.img
usropt=opt-jessie
bindings=/usr/opt/include_modules-jessie.sh:/etc/profile.d/module.sh

[buster]
path=/usr/opt/nscl-buster.img
usropt=opt-buster
bindings=/mnt/misc/sw/indep,/mnt/misc/sw/x86_64/all,/usr/lib/x86_64-linux-gnu/modulecmd.tcl

         

The [CONFIG] section specifies that the directory that contains the container /usr/opt trees is /usr/opt and that this will be mapped into all containrs at /non-container. Two containers are defined: jessie and buster.

As an example, activating the buster container will be done with a command like:


singularity instance start --bind /usr/opt:/non-container \
   --bind /usr/opt/opt-buster:/usr/opt \
   --bind /mnt/misc/sw/indep \
   --bind /mnt/misc/sw/x86_64/all \
   --bind /usr/lib/x86_64-linux-gnu/modulecmd.tcl \
       /usr/opt/nscl-buster.img buster