Skip to content

Docker Usage

Johann Cohen-Tanugi edited this page Jul 20, 2023 · 6 revisions

RESSPECT can be installed and used in conjunction with the DESC tom_desc alert management system (see here). This wiki serves as an entry point, while this procedure is been evaluated.

Context

Currently, the alert management system is implemented as a tom_desc server that uses the tom_toolkit Django framework. It is dockerized and connects to a dockerized DB service using postgresql. As RESSPECT will eventually have (as far as I can picture it at this stage) a natural need to access the DESC alert management DB together with a practical need to move to its own DB implementation, it seems like a good idea to reproduce the same configuration for RESSPECT and its own DB.

Current status

The docker install proposed in the docker branch of RESSPECT closely follows the tom_desc setup. In order to get both services up and running, just clone both repos and then (assuming you also have docker installed on your system of course):

  • from the tom_desc root dir, execute sudo docker-compose up -d
  • from the RESSPECT root dir, execute sudo docker-compose up -d

That should start the 4 containers involved : tom_desc, its DB, resspect, and its DB. Some benefits of the current setup:

  • it allows development of resspect from the container, as the git cloned repo is bound as volume to the container (same goes with tom_desc)
  • it allows communication from resspect and tom_desc to both DB; this is crucial for RESSPECT which needs to update its own DB regularly, based on what the DESC alert Management System has saved in its own DB.

Finally, to enter the resspect container, execute sudo docker exec -it resspect bash and access the resspectdb by executing psql -h db -U admin resspectdb (the DB password is in the docker-compose.yml file.... of course proper security needs to be implemented if all this gain traction)

Usage

From there on, it is a matter of querying the tom_desc DB and updating the resspect DB. With Nicolas we tried such sequence using \COPY and temporary save in CSV format, but there is certainly a more straightforward way to do it, for instance with dedicated python code. If we agree that this is a framework to evaluate further, then there are some clear steps ahead:

  • define a RESSPECT schema (and try to get it as right as possible from the start on....)
  • transfer whatever flat file datasets are still useful for RESSPECT testing and development to the DB (this step should help get a comprehensive DB schema for step 1)
  • work the API to RESSPECT out, so that it uses the DB rather than the flat files
  • start investigating updating and resspect launching protocol and implementation.
Clone this wiki locally