Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev' into auth_token_support
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg committed Sep 29, 2018
2 parents ff4229a + 767cabb commit 8aae349
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,4 @@ cwl-tes/
tests/tmp/*
tests/output/*
*.modified.yaml
.netrc
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
##### BASE IMAGE #####
FROM ubuntu:16.04

##### METADATA #####
LABEL base.image="ubuntu:16.04"
LABEL version="1"
LABEL software="WES-ELIXIR"
LABEL software.version="1.0"
LABEL software.description="Flask microservice implementing the Global Alliance for Genomics and Health (GA4GH) Workflow Execution Service (WES) API specification."
LABEL software.website="https://github.com/elixir-europe/WES-ELIXIR"
LABEL software.documentation="https://github.com/elixir-europe/WES-ELIXIR"
LABEL software.license="https://github.com/elixir-europe/WES-ELIXIR/blob/master/LICENSE"
LABEL software.tags="General"
LABEL maintainer="foivos.gypas@unibas.ch"
LABEL maintainer.organisation="Biozentrum, University of Basel"
LABEL maintainer.location="Klingelbergstrasse 50/70, CH-4056 Basel, Switzerland"
LABEL maintainer.lab="Zavolan Lab"
LABEL maintainer.license="https://spdx.org/licenses/Apache-2.0"

## install dependencies
RUN apt-get update \
&& apt-get install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools git wget curl

## install python
RUN wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz \
&& tar xJf Python-3.6.0.tar.xz \
&& cd Python-3.6.0 \
&& ./configure \
&& make altinstall \
&& ln -s /Python-3.6.0/python /usr/local/bin \
&& cd ../ \
&& python -m pip install --upgrade pip setuptools wheel virtualenv

COPY ./ $HOME/WES-ELIXIR/

## install WES-ELIXIR and cwl-tes
#RUN git clone -b dockerize_app https://github.com/elixir-europe/WES-ELIXIR.git \

RUN cd WES-ELIXIR \
&& git clone https://github.com/common-workflow-language/cwl-tes.git \
&& cd cwl-tes \
&& git checkout ftp \
&& git checkout ab58d1822a027eff2a456db9d712f5295ac42eac \
&& python setup.py install \
&& cd .. \
&& pip install -r requirements.txt \
&& python setup.py develop \
&& cd ../

ENV WES_CONFIG="/WES-ELIXIR/wes_elixir/config/app_config.yaml"

COPY .netrc /root
59 changes: 59 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: '3.6'
services:

# nginx:
# image: nginx:latest
# restart: always
# ports:
# - "443:443"
# links:
# - wes-elixir
# volumes:
# - /docker/nginx/etc/ssl/:/etc/ssl/
# - /docker/nginx/etc/nginx/conf.d/:/etc/nginx/conf.d

wes-elixir-celery:
image: wes-elixir:latest
build:
context: .
dockerfile: Dockerfile
restart: always
links:
- rabbit1
command: bash -c "cd /WES-ELIXIR/wes_elixir; celery worker -A celery_worker -E --loglevel=info"
volumes:
- ../data/tests:/WES-ELIXIR/tests


wes-elixir:
image: wes-elixir:latest
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "7777:7777"
links:
- mongo
command: bash -c "cd /WES-ELIXIR/; python wes_elixir/app.py"
volumes:
- ../data/tests:/WES-ELIXIR/tests

rabbit1:
image: "rabbitmq:3-management"
hostname: "rabbit1"
ports:
- "15672:15672"
- "5672:5672"
links:
- mongo

mongo:
image: mongo:3.2
restart: always
ports:
- "27017:27017"
expose:
- "27017"
volumes:
- ../data/db:/data/db
30 changes: 30 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,65 @@
amqp==2.3.2
asn1crypto==0.24.0
astroid==2.0.4
attrs==18.2.0
avro-cwl==1.8.4
bagit==1.7.0
billiard==3.5.0.4
CacheControl==0.11.7
celery==4.2.1
certifi==2018.8.24
cffi==1.11.5
chardet==3.0.4
click==6.7
clickclick==1.2.2
connexion==1.5.2
cryptography==2.3.1
decorator==4.3.0
Flask==1.0.2
Flask-Cors==3.0.6
Flask-PyMongo==2.1.0
future==0.16.0
idna==2.7
inflection==0.3.1
isodate==0.6.0
isort==4.3.4
itsdangerous==0.24
Jinja2==2.10
jsonschema==2.6.0
kombu==4.2.1
lazy-object-proxy==1.3.1
lockfile==0.12.2
lxml==4.2.5
MarkupSafe==1.0
mccabe==0.6.1
mistune==0.7.4
mypy-extensions==0.4.1
networkx==2.2
prov==1.5.1
psutil==5.4.7
py-tes==0.2.1
pycparser==2.19
PyJWT==1.6.4
pylint==2.1.1
pymongo==3.7.1
pyparsing==2.2.1
python-dateutil==2.6.1
pytz==2018.5
PyYAML==3.13
rdflib==4.2.2
rdflib-jsonld==0.4.0
requests==2.19.1
ruamel.yaml==0.15.66
scandir==1.9.0
schema-salad==2.7.20180905124720
shellescape==3.4.1
six==1.11.0
subprocess32==3.5.2
swagger-spec-validator==2.3.1
typed-ast==1.1.0
typing==3.6.6
typing-extensions==3.6.5
urllib3==1.23
vine==1.1.4
Werkzeug==0.14.1
wrapt==1.10.11
3 changes: 2 additions & 1 deletion wes_elixir/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def main():

# Run app
connexion_app.run(
host='0.0.0.0',
use_reloader=get_conf(config, 'server', 'use_reloader')
)


if __name__ == '__main__':
main()
main()
4 changes: 2 additions & 2 deletions wes_elixir/config/app_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General server/service settings
server:
host: localhost
host: '0.0.0.0'
port: 7777
debug: True
environment: development
Expand Down Expand Up @@ -28,7 +28,7 @@ security:

# Database settings
database:
host: 'localhost'
host: 'mongo'
port: 27017
name: wes-elixir-db
run_id:
Expand Down
5 changes: 3 additions & 2 deletions wes_elixir/ga4gh/wes/utils_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def get_run_status(config, run_id, *args, **kwargs):
collection_runs = get_conf(config, 'database', 'collections', 'runs')

# Get document from database

document = collection_runs.find_one(
filter={'run_id': run_id},
projection={
Expand Down Expand Up @@ -234,7 +235,7 @@ def run_workflow(config, form_data, *args, **kwargs):
__run_workflow(config=config, document=document, **kwargs)

# Build formatted response object
response = {"run_id": document['run_id']}
response = {"run_id": document['run_id']}

# Return response object
return response
Expand Down Expand Up @@ -282,7 +283,7 @@ def __validate_run_workflow_request(data):
# required = False
# workflow_url:
# type = str
# required = True
# required = True
# workflow_attachment:
# type = [str]
# required = False
Expand Down

0 comments on commit 8aae349

Please sign in to comment.