BioContainers / biocontainers-backend

Python backend for Biocontainers (Flask + MongoDB)
http://biocontainers.pro
Apache License 2.0
3 stars 1 forks source link
biocontainers ga4gh ga4gh-server rest-api restful-api

Python 3.4 License

BioContainers backed

The BioContainers backed for the Biocontainers Registry. The library defines two main components:

BioContainers Pipelines

The BioContainers pipelines contains the tools and workflows to insert quay.io and and dockerhub containers. In addition, it gets the information from containers recipes Dockefile or Conda recipes to annotate the containers.

Pre-requisites

Setting the environment

Before lunching the pipelines you should add to the PYTHONPATH the biocontainers-backend folder:

$ cd biocontainers-backend
$ export PYTHONPATH=$PYTHONPATH:./

Running the pipelines

The pipelines can be run using the following command:

python3.4 biocontainers/pipelines.py --config-file biocontainers/configuration.ini

This will prompt the following options:

  -q, --import-quayio             Import Quay.io Recipes
  -k, --import-docker             Import Docker Recipes
  -c, --config-file PATH
  -a, --config-profile TEXT       This option allow to select a config profile
  -db, --db-name TEXT             Name of the database
  -h, --db-host TEXT              Host the database
  -auth, --db-auth-database TEXT  Authentication database in Mongo
  -u, --db-user TEXT              Database root user
  -pw, --db-password TEXT         Database password
  -p, --db-port TEXT              Database port
  --help                          Show this message and exit.

BioContainers Flask API

Kubernetes deployment

In order to facilitate the testing and deployment of the BioContainers Registry Resource we have created a kubernetes helm charts deployment. This will enable easy deployment of the solution in a kubernetes cluster or in a local minikube instalation.

Prerequisites

Build the docker images

docker build -t ypriverol/biocontainers-api-py:1.0.0 .
docker push ypriverol/biocontainers-api-py:1.0.0
docker build -t ypriverol/biocontainers-pipelines-py:1.0.0 .
docker build -t ypriverol/biocontainers-pipelines-py:1.0.0

Running in minikube

Deploying the API is really simple using the Kubernetes configuration:

helm install -f helm-example-configs/minikube.yaml ./biocontainer-registry

Some important commands for kubernetes:

Remove container:

kubectl delete deployment biocontainers-pipelines-py

How to Validate the API

The API can be validated with the TRS validator tool: http://142.1.177.188:8080/trs/validator/debug?url=http://api.biocontainers.pro