项目作者: BioContainers

项目描述 :
Python backend for Biocontainers (Flask + MongoDB)
高级语言: Python
项目地址: git://github.com/BioContainers/biocontainers-backend.git
创建时间: 2018-11-13T12:02:43Z
项目社区:https://github.com/BioContainers/biocontainers-backend

开源协议:Apache License 2.0

下载


Python 3.4 License

BioContainers backed

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

  • BioContianers pipelines
  • BioContainers Restful API

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

  • MongoDB
  • Python > 3.4

Setting the environment

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

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

Running the pipelines

The pipelines can be run using the following command:

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

This will prompt the following options:

  1. -q, --import-quayio Import Quay.io Recipes
  2. -k, --import-docker Import Docker Recipes
  3. -c, --config-file PATH
  4. -a, --config-profile TEXT This option allow to select a config profile
  5. -db, --db-name TEXT Name of the database
  6. -h, --db-host TEXT Host the database
  7. -auth, --db-auth-database TEXT Authentication database in Mongo
  8. -u, --db-user TEXT Database root user
  9. -pw, --db-password TEXT Database password
  10. -p, --db-port TEXT Database port
  11. --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

  • Build the service
  1. docker build -t ypriverol/biocontainers-api-py:1.0.0 .
  2. docker push ypriverol/biocontainers-api-py:1.0.0
  • Build the pipelines:
  1. docker build -t ypriverol/biocontainers-pipelines-py:1.0.0 .
  2. docker build -t ypriverol/biocontainers-pipelines-py:1.0.0

Running in minikube

Deploying the API is really simple using the Kubernetes configuration:

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

Some important commands for kubernetes:

Remove container:

  1. 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