Skip to content

"Proxy" TES for handling task distribution and decorating TES calls with authorization headers

License

Notifications You must be signed in to change notification settings

soumyadipDe/proTES

 
 

Repository files navigation

proTES

Synopsis

Flask microservice implementing the Global Alliance for Genomics and Health (GA4GH) Task Execution Service (TES) API specification.

Description

proTES is an proxy-like implementation of the GA4GH TES OpenAPI specification based on Flask and Connexion built for distributing TES tasks over different TES service instances.

proTES is part of ELIXIR, a multinational effort at establishing and implementing FAIR data sharing and promoting reproducible data analyses and responsible data handling in the Life Sciences. Infrastructure and IT support are provided by ELIXIR Finland at the CSC, the TESK service is being developed and maintained by ELIXIR UK at the EBI in Hinxton, and proTES itself is being mainly developed by ELIXIR Switzerland at the Biozentrum in Basel and the Swiss Institute of Bioinformatics.

Installation

Docker

Requirements (Docker)

Ensure you have the following software installed:

  • Docker (18.06.1-ce, build e68fc7a)
  • docker-compose (1.22.0, build f46880fe)
  • Git (1.8.3.1)

Note: These are the versions used for development/testing. Other versions may or may not work.

Instructions (Docker)

Create data directory and required subdiretories

mkdir -p data/db data/output data/tmp

Clone repository

git clone https://github.com/elixir-europe/proTES.git app

Traverse to app directory

cd app
Optional: edit default and override app config
  • Via configuration files:
vi wes_elixir/config/app_config.yaml
vi wes_elixir/config/override/app_config.dev.yaml  # for development service
vi wes_elixir/config/override/app_config.prod.yaml  # for production server
  • Via environment variables:

A few configuration settings can be overridden by environment variables.

export <ENV_VAR_NAME>=<VALUE>
  • List of the available environment variables:
Variable Description
MONGO_HOST MongoDB host endpoint
MONGO_PORT MongoDB service port
MONGO_DBNAME MongoDB database name
MONGO_USERNAME MongoDB client username
MONGO_PASSWORD MongoDB client password
RABBIT_HOST RabbitMQ host endpoint
RABBIT_PORT RabbitMQ service port

Build container image

docker-compose build

Run docker-compose services in detached/daemonized mode

docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml up -d  # for development service
docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d  # for production service

Visit Swagger UI

firefox http://localhost:7878/ga4gh/tes/v1/ui

Non-dockerized

Requirements (non-dockerized)

Ensure you have the following software installed:

  • curl (7.47.0)
  • Git (2.7.4)
  • MongoDB (4.0.1)
  • Python3 (3.5.2)
  • RabbitMQ (3.5.7)
  • virtualenv (16.0.0)

Note: These are the versions used for development/testing. Other versions may or may not work.

Instructions (non-dockerized); may not be up-to-date

Ensure RabbitMQ is running (actual command is OS-dependent)

sudo service rabbitmq-server status

Start MongoDB daemon (actual command is OS-dependent)

sudo service mongod start

Clone repository

git clone https://github.com/elixir-europe/proTES.git app

Traverse to project directory

cd app
project_dir="$PWD"

Create and activate virtual environment

virtualenv -p `which python3` venv
source venv/bin/activate

Install required packages

pip install -r requirements.txt

Install editable packages

cd "${project_dir}/venv/src/py-tes"
python setup.py develop
cd "$project_dir"

Install app

python setup.py develop

Optionally, override default config by setting environment variable and pointing it to a YAML config file. Ensure the file is accessible.

export TES_CONFIG=<path/to/override/config/file.yaml>

Start service

python pro_tes/app.py

In another terminal, load virtual environment & start Celery worker for executing background tasks

# Traverse to project directory ("app") first
source venv/bin/activate
cd pro_tes
celery worker -A celery_worker -E --loglevel=info

Visit Swagger UI

firefox http://localhost:8080/ga4gh/tes/v1/ui

Note: If you have edited TES_CONFIG, ensure that host and port match the values specified in the config file.

Q&A

Coming soon...

Contributing

Join us at the 2018 BioHackathon in Paris, organized by ELIXIR Europe (November 12-16)! Check out our project description.

This project is a community effort and lives off your contributions, be it in the form of bug reports, feature requests, discussions, or fixes and other code changes. Please read these guidelines if you want to contribute. And please mind the code of conduct for all interactions with the community.

Versioning

Development of the app is currently still in alpha stage, and current "versions" are for internal use only. We are aiming to have a fully spec-compliant ("feature complete") version of the app available by the end of 2018. The plan is to then adopt a semantic versioning scheme in which we would shadow TES spec versioning for major and minor versions, and release patched versions intermittently.

License

This project is covered by the Apache License 2.0 also shipped with this repository.

Contact

The project is a collaborative effort under the umbrella of ELIXIR Europe.

Please contact the project leader for inquiries, proposals, questions etc. that are not covered by the Q&A and Contributing sections.

References

About

"Proxy" TES for handling task distribution and decorating TES calls with authorization headers

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.1%
  • Dockerfile 1.9%