Skip to content
Carlos Brandt edited this page Aug 6, 2016 · 22 revisions

DaCHS on Docker

Here go the lines about encapsulating DaCHS in Docker container(s).

Dachs is composed by two living blocks: (1) the data access interface consulting (2) a Postgres database. Not all data is stored in the sql-db, but instead reside in files within Dachs directories tree. Typically, those files -- which we can say _connect_ both running blocks -- are placed inside Dachs's GAVO_ROOT/inputs.

A very relevant point is to have a way to persist data and keep datasets separated.

The files structure of Dachs goes like:

/var/gavo
├── cache
├── etc
│   ├── defaultmeta.txt
│   ├── userconfig.rd
│   └── ...
├── inputs
│   ├── DATASET_1
│   │   ├── data
│   │   └── q.rd
│   └── DATASET_2
│       ├── data
│       └── q.rd
├── logs
├── state
├── tmp
└── web
    └── templates
        └── root.html

, where DATASET_1 and DATASET_2 are hypothetical datasets with files q.rd named to describe the resources. Without loosing generality lots of files have been omitted in this (example files) tree and some other have been exposed, the reason is to call attention for those files carrying information of interest for persistence.

For instance, it would be nice to have DATASET_1 and DATASET_2 as "plugable" container/volumes. Also, site-dependent files like the ones in etc and web should compose the "main" container, but be editable.

Docker-DaCHS

The (main) container encapsulates the server itself, files and directories to run the software.

Detached config

To be able to have the settings independent from software installation -- for maintenance purposes, for example -- we would like to have files in /var/gavo/etc (remember file /etc/gavo.rc) and alike directories to be part of another docker volume.

Mobile datasets

Whenever a dataset is added to dachs-docker, an gavo import command should be run. For example, mounting DATASET_1 volume to /var/gavo/inputs/DATASET_1, should trigger the command:

$ gavo import /var/gavo/inputs/DATASET_1/q.rd
Clone this wiki locally