bartender
Middleware web service to schedule jobs on various infrastructures
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Repository
Middleware web service to schedule jobs on various infrastructures
Basic Info
- Host: GitHub
- Owner: i-VRESSE
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://i-vresse-bartender.readthedocs.io
- Size: 1.89 MB
Statistics
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 25
- Releases: 8
Metadata Files
README.md
Bartender
Bartender is a middleware web service to schedule jobs on various infrastructures.
It can run command line applications for visitors. The application input should be a configuration file with links to data files in the same directory. After acquiring a JWT token, you can upload your configuration file and data files as an archive to the web service for submission. Once the job has been executed the output files can be browsed with a web browser.
Bartender can be configured to run applications on a Slurm batch scheduler, pilot job framework, the grid or in the cloud. Bartender will take care of moving the input and output files to the right place. To pick where an application should be run you can choose from a list of existing Python functions or supply your own.
Bartender can run quick interactive applications on completed jobs. This is handy if you want to run a quick analysis on the output of a job.
Bartender can be used as the computational backend for a web application, the web application should guide visitors into the submission and show the results. See https://github.com/i-VRESSE/haddock3-webapp for an example.
Documentation for users and developers is available at https://i-vresse-bartender.readthedocs.io .
Quickstart
Install bartender via GitHub:
```bash
Inside an empty directory
git clone https://github.com/i-VRESSE/bartender.git . pip install . ```
Obtain a copy of the example configuration file
bash cp config-example.yaml config.yamlIn another terminal, start up a database for storing jobs.
bash docker run \ -p "5432:5432" \ -e "POSTGRES_PASSWORD=bartender" \ -e "POSTGRES_USER=bartender" \ -e "POSTGRES_DB=bartender" \ --mount type=volume,source=bartender-db,target=/var/lib/postgresql/data \ postgres:15.2-bullseye(Use
docker volume rm bartender-dbto clear the database storage`)Create tables in the database
bash alembic upgrade "head"Generate token to authenticate yourself
```bash
Generate a rsa key pair
openssl genpkey -algorithm RSA -out privatekey.pem \ -pkeyopt rsakeygenbits:2048 openssl rsa -pubout -in privatekey.pem -out public_key.pem bartender generate-token --username myname ```
Run the application
bash bartender serveGo to the interactive API documentation generated by FastAPI
Consuming web service
The interactive API documentation generated by FastAPI is at http://localhost:8000/api/docs
Authentication
To consume the bartender web service you need to authenticate yourself with a JWT token in the
- HTTP header
Authorization: Bearer <token>or - query parameter
?token=<token>or - Cookie
bartenderToken=<token>of the HTTP request.
For more info see Configuration docs
Word count example
Bartender is by default configured with a word count applicaton. Use the following steps to run a job:
- Create an archive to submit. The zip file should contain a file called
README.md. A zip file could be created in a clone of this repo withzip README.zip README.md. - Start bartender web service and postgresql server
- Generate token & authorize
- Run
bartender generate-tokenand copy output to clipboard. (Make sure to not to have any newlines in the token) - Goto
http://127.0.0.1:8000/api/docsand - Open authorize dialog by pressing authorize button on top of page
- Paste token from clipboard in any Value input text box
- Press Authorize button and close button.
- Try out the
GET /api/whoamiroute. It should return JSON document withsomeoneas username.
- Run
- Submit archive.
- Try out the
PUT /api/application/wcroute. - Upload the
README.zipas request body. - Press execute button
- The response contains a job identifier (
idproperty) that can be used to fetch the job state.
- Try out the
- Fetch job state
- Try out the
GET /api/job/{jobid} - Use job identifier retrieved by submit request as
jobidparameter value.- When job state is equal to
okthe job was completed succesfully.
- When job state is equal to
- Try out the
- Retrieve result. The word count application (
wc) outputs to the stdout.- Try out the
GET /api/job/{jobid}/stdout - Use job identifier retrieved by submit request as
jobidparameter value. - Should see something like
433 1793 14560 README.md. Where numbers are counts for newlines, words, bytes.
- Try out the
Owner
- Name: Interactive Virtual Research Environment for Scientific Software Execution
- Login: i-VRESSE
- Kind: organization
- Repositories: 5
- Profile: https://github.com/i-VRESSE
Project with Netherlands eScience Center and Bonvin Lab
GitHub Events
Total
- Create event: 6
- Release event: 2
- Issues event: 4
- Watch event: 1
- Delete event: 4
- Issue comment event: 2
- Push event: 5
- Pull request event: 5
Last Year
- Create event: 6
- Release event: 2
- Issues event: 4
- Watch event: 1
- Delete event: 4
- Issue comment event: 2
- Push event: 5
- Pull request event: 5
Dependencies
- astor 0.8.1 develop
- atomicwrites 1.4.1 develop
- attrs 22.1.0 develop
- autoflake 1.4 develop
- bandit 1.7.4 develop
- black 22.6.0 develop
- certifi 2022.6.15 develop
- cfgv 3.3.1 develop
- charset-normalizer 2.1.1 develop
- coverage 6.4.4 develop
- darglint 1.8.1 develop
- distlib 0.3.5 develop
- docutils 0.19 develop
- eradicate 2.1.0 develop
- filelock 3.8.0 develop
- flake8 4.0.1 develop
- flake8-bandit 3.0.0 develop
- flake8-broken-line 0.4.0 develop
- flake8-bugbear 22.8.23 develop
- flake8-commas 2.1.0 develop
- flake8-comprehensions 3.10.0 develop
- flake8-debugger 4.1.2 develop
- flake8-docstrings 1.6.0 develop
- flake8-eradicate 1.3.0 develop
- flake8-isort 4.2.0 develop
- flake8-polyfill 1.0.2 develop
- flake8-quotes 3.3.1 develop
- flake8-rst-docstrings 0.2.7 develop
- flake8-string-format 0.3.0 develop
- gitdb 4.0.9 develop
- gitpython 3.1.27 develop
- httpcore 0.14.7 develop
- httpx 0.22.0 develop
- identify 2.5.3 develop
- iniconfig 1.1.1 develop
- isort 5.10.1 develop
- mccabe 0.6.1 develop
- nodeenv 1.7.0 develop
- packaging 21.3 develop
- pathspec 0.9.0 develop
- pbr 5.10.0 develop
- pep8-naming 0.12.1 develop
- platformdirs 2.5.2 develop
- pluggy 1.0.0 develop
- pre-commit 2.20.0 develop
- py 1.11.0 develop
- pycodestyle 2.8.0 develop
- pydocstyle 6.1.1 develop
- pyflakes 2.4.0 develop
- pygments 2.13.0 develop
- pyparsing 3.0.9 develop
- pytest 7.1.2 develop
- pytest-cov 3.0.0 develop
- pytest-env 0.6.2 develop
- restructuredtext-lint 1.4.0 develop
- rfc3986 1.5.0 develop
- smmap 5.0.0 develop
- snowballstemmer 2.2.0 develop
- stevedore 4.0.0 develop
- tokenize-rt 4.2.1 develop
- toml 0.10.2 develop
- virtualenv 20.16.3 develop
- wemake-python-styleguide 0.16.1 develop
- yesqa 1.4.0 develop
- alembic 1.8.1
- anyio 3.6.1
- asgiref 3.5.2
- asyncpg 0.25.0
- click 8.1.3
- colorama 0.4.5
- fastapi 0.75.2
- greenlet 1.1.3
- h11 0.12.0
- httptools 0.3.0
- idna 3.3
- mako 1.2.1
- markupsafe 2.1.1
- multidict 6.0.2
- mypy 0.961
- mypy-extensions 0.4.3
- pydantic 1.9.2
- python-dotenv 0.20.0
- pyyaml 6.0
- sniffio 1.2.0
- sqlalchemy 1.4.40
- sqlalchemy2-stubs 0.0.2a25
- starlette 0.17.1
- tomli 2.0.1
- typing-extensions 4.3.0
- ujson 5.4.0
- uvicorn 0.17.5
- uvloop 0.16.0
- watchgod 0.8.2
- websockets 10.3
- yarl 1.8.1
- SQLAlchemy ^1.4 develop
- anyio ^3.6.1 develop
- autoflake ^1.4 develop
- black ^22.3.0 develop
- flake8 ^4.0.1 develop
- httpx ^0.22.0 develop
- isort ^5.10.1 develop
- mypy ^0.961 develop
- pre-commit ^2.19.0 develop
- pytest ^7.0 develop
- pytest-cov ^3.0.0 develop
- pytest-env ^0.6.2 develop
- wemake-python-styleguide ^0.16.1 develop
- yesqa ^1.3.0 develop
- SQLAlchemy ^1.4
- alembic ^1.7.7
- asyncpg ^0.25.0
- fastapi ^0.75.0
- httptools ^0.3.0
- pydantic ^1.9.0
- python ^3.9
- ujson ^5.1.0
- uvicorn ^0.17.0
- yarl ^1.7.2
- actions/checkout v3 composite
- actions/setup-python v4 composite
- postgres 13.6-bullseye docker
- python 3.9.6-slim-buster build
- bartender ${BARTENDER_VERSION
- postgres 13.6-bullseye
- actions/checkout v3 composite
- bartender-with-dirac ${BARTENDER_VERSION
- ghcr.io/xenon-middleware/dirac 8.0.18
- postgres 15.2-bullseye
- ghcr.io/xenon-middleware/diracclient 8.0.18 build
- ghcr.io/xenon-middleware/dirac 8.0.18