/
View dependency graph
Depends on
- biomaj3 (python3-biomaj3)
- biomaj3-core (python3-biomaj3-core)
- biomaj3-zipkin (python3-biomaj3-zipkin)
- cruft-ng (dh-sequence-cruft)
- dh-python (dh-sequence-python3)
- flask (python3-flask)
- gunicorn (python3-gunicorn)
- protobuf (protobuf-compiler, python3-protobuf)
- python-bcrypt (python3-bcrypt)
- python3-defaults (python3-all)
- pyyaml (python3-yaml)
- setuptools (python3-setuptools)
- debhelper-compat, python3-consul, python3-pika, python3-prometheus-client, python3-pymongo, python3-redis, redis-server
README (full)
About
Microservice to manage biomaj, acts as a frontend to receive biomaj-cli commands and execute operations
Needs mongo and redis
Development
flake8 --ignore E501 biomaj_daemon
Run
Message consumer:
export BIOMAJ_CONFIG=path_to_config.yml
python bin/biomaj_daemon_consumer.py
Web server
If package is installed via pip, you need a file named gunicorn_conf.py containing somehwhere on local server:
def worker_exit(server, worker):
from prometheus_client import multiprocess
multiprocess.mark_process_dead(worker.pid)
If you cloned the repository and installed it via python setup.py install, just refer to the gunicorn_conf.py in the cloned repository.
export BIOMAJ_CONFIG=path_to_config.yml
rm -rf ..path_to/prometheus-multiproc
mkdir -p ..path_to/prometheus-multiproc
export prometheus_multiproc_dir=..path_to/prometheus-multiproc
gunicorn -c ../path_to/gunicorn_conf.py biomaj_daemon.daemon.biomaj_daemon_web:app
Web processes should be behind a proxy/load balancer, API base url /api/daemon
API
For authentication, add api key to HTTP header X-API-KEY
For admin only, operations, add to config.yml
general:
admin:
- admin_user_id
TO use API, some operations are limited to
| dir | bin/ |
| dir | biomaj_daemon/ |
| dir | debian/ |
| file | .gitignore |
| file | .travis.yml |
| file | CHANGES.txt |
| file | MANIFEST.in |
| file | README.md |
| file | config.yml |
| file | gunicorn_conf.py |
| file | requirements.txt |
| file | setup.cfg |
| file | setup.py |