Git Product home page Git Product logo

monarch-stack's Introduction

monarch-stack

Specification for deploying monarch services with docker-compose

Host Environment

The docker-compose commands require a host with the following:

  • Docker Engine > 19.03.0
  • Docker Compose > 1.25.5
  • User in the docker group, with group access to GIDs 8983 (solr) and 14728 (scigraph)
  • Directory with > 500 GB space to store current and previous data releases

Downloading Service Data and Configs

Data and configuration files can be downloaded by running make. If running directly on the host this will require gcc and pigz. Alternatively, this can be run with docker

Fetching all data

ARCHIVE=https://archive.monarchinitiative.org/202003 \
UI_RELEASE=https://github.com/monarch-initiative/monarch-ui/releases/download/v1.0.2/static-assets.tar.gz \
DATADIR=./data \
make all

Or with docker:

docker run \ 
     --workdir /usr/src/ \
     --volume `pwd`:/usr/src/ \
     monarchinitiative/gcc-pigz:10.1  \
        /bin/sh -c 'umask 0002 && \
          ARCHIVE=https://archive.monarchinitiative.org/202003 \
          UI_RELEASE=https://github.com/monarch-initiative/monarch-ui/releases/download/v1.0.2/static-assets.tar.gz \
          DATADIR=/srv/monarch \
          make'

Directory structure

The data directory will have the following structure:

/path/to/data/

  • solr/
  • solr-old/
  • scigraph-data/
  • scigraph-data-old/
  • scigraph-ontology/
  • scigraph-ontology-old/
  • owlsim/
  • owlsim-old/
  • monarch-ui/
  • monarch-ui-old/

Each directory contains data and configuration files needed for the Monarch services. The -old directories contain the files for the previous run of make or will be empty if this is the first time running make.

Fetching data for a single service

Data for a single service can be fetched by changing the make target:

make fetch_solr

See make list to view all targets

Running Docker Compose

All Monarch services can be composed by running

DATADIR=/path/to/data/ docker-compose up

Note that owlsim takes 12 minutes to initialize, followed by a warm up query generated by the biolink container which takes an additional ~20 minutes.

In practice, our backend services change infrequently so it is useful to separate data providing backend services (solr, scigraph-data, scigraph-ontology, owlsim) and our API and front end (biolink, monarch-ui). Therefore, these can be composed independently:

DATADIR=/path/to/data docker-compose -f services/monarch-app.yml up
DATADIR=/path/to/data docker-compose -f services/backend.yml up

Testing

Tests are a WIP, but the services/ compose files contain healthchecks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.