BioMAJ daemon service
Project description
# 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
3.0.20:
Add some checks on options
Add data-list and data-import options
3.0.19:
Fix traefix prefix
3.0.18:
Fix some bank status info checks
Add new endpoint /api/daemon/bank/<bank>/owns
Add queued bank names in whatsup
Update pika dependency release
Add tags for traefik support
3.0.17:
Allow use of env variables to override micro.x and rabbitmq variables in global.properties
like for config.yml.
Ex: WEB_LOCAL_ENDPOINT_DOWNLOAD defines proxy address for download web service,
WEB_LOCAL_ENDPOINT defines global proxy address for all web services, etc.
If not defined, will use values from global.properties
3.0.16:
After migration checks, update db_schema to current version
3.0.15:
Add --history option
Catch SIGTERM to cancel bank update for SIGKILL
3.0.14:
Fake version for Pypi re-upload
3.0.13:
Allow per service local_endpoint definition
Add --stats option
Modify --version option to get all module details
Add REST API to daemon (/api/daemon/...)
3.0.12:
Add biomaj_daemon_consumer.py to python scripts for install with package
3.0.11:
Disable daemon web service logging
3.0.10:
Fix tail endpoint syntax
3.0.9:
Fix #1 remove debug log
Fix #2 log dir not removed with --remove-all if proxy option not set
3.0.8:
Fix #78, for multiple banks update in monolithic config, if one fails, next banks are not updated
Add /api/daemon/bank/x/log[/y] endpoint to get last bank session log file
3.0.7:
Add whatsup support for non proxy config
Skip bank config with errors
3.0.6:
Fix logging for monolithic setup
Add whatsup option
Fix prometheus stats
3.0.5:
Fix for python 2.x
3.0.4:
Fix status page with other services
Add missing README in package
3.0.3:
Fix missing parameters
3.0.2:
Move options to management to utils for reuse
Fix --about-me
3.0.1:
Micro service to manage biomaj updates
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
3.0.20:
Add some checks on options
Add data-list and data-import options
3.0.19:
Fix traefix prefix
3.0.18:
Fix some bank status info checks
Add new endpoint /api/daemon/bank/<bank>/owns
Add queued bank names in whatsup
Update pika dependency release
Add tags for traefik support
3.0.17:
Allow use of env variables to override micro.x and rabbitmq variables in global.properties
like for config.yml.
Ex: WEB_LOCAL_ENDPOINT_DOWNLOAD defines proxy address for download web service,
WEB_LOCAL_ENDPOINT defines global proxy address for all web services, etc.
If not defined, will use values from global.properties
3.0.16:
After migration checks, update db_schema to current version
3.0.15:
Add --history option
Catch SIGTERM to cancel bank update for SIGKILL
3.0.14:
Fake version for Pypi re-upload
3.0.13:
Allow per service local_endpoint definition
Add --stats option
Modify --version option to get all module details
Add REST API to daemon (/api/daemon/...)
3.0.12:
Add biomaj_daemon_consumer.py to python scripts for install with package
3.0.11:
Disable daemon web service logging
3.0.10:
Fix tail endpoint syntax
3.0.9:
Fix #1 remove debug log
Fix #2 log dir not removed with --remove-all if proxy option not set
3.0.8:
Fix #78, for multiple banks update in monolithic config, if one fails, next banks are not updated
Add /api/daemon/bank/x/log[/y] endpoint to get last bank session log file
3.0.7:
Add whatsup support for non proxy config
Skip bank config with errors
3.0.6:
Fix logging for monolithic setup
Add whatsup option
Fix prometheus stats
3.0.5:
Fix for python 2.x
3.0.4:
Fix status page with other services
Add missing README in package
3.0.3:
Fix missing parameters
3.0.2:
Move options to management to utils for reuse
Fix --about-me
3.0.1:
Micro service to manage biomaj updates
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
biomaj_daemon-3.0.20.tar.gz
(18.1 kB
view details)
Built Distribution
File details
Details for the file biomaj_daemon-3.0.20.tar.gz
.
File metadata
- Download URL: biomaj_daemon-3.0.20.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14a755f56ed5ca28cbc77dab14d70dd8f97ccfaea70d35fa1a7424208db9d3c0 |
|
MD5 | 4e0e68014a97ab3e8e571507923fe9e5 |
|
BLAKE2b-256 | 021f2291921006aeec21730b2bb39257e58bcf03d10b097ac53169a317a4dfdf |
File details
Details for the file biomaj_daemon-3.0.20-py2.py3-none-any.whl
.
File metadata
- Download URL: biomaj_daemon-3.0.20-py2.py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b2916a2cbdcdc299706498b25a51cc90bc15aa244d116424dcc93ab595b8168 |
|
MD5 | b2181b6da128317cb1aba846215ab417 |
|
BLAKE2b-256 | 65bfb9fb7100fd79f2ccd0b3841f068020d303c96c0305b6cdbd10cc14e3c78e |