Job scheduler for Docker containers, configured via container labels.
Project description
deck-chores
** A job scheduler for Docker containers, configured via container labels.**
Documentation: http://deck-chores.rtfd.io
Free software: ISC license
Features
define regular jobs to run within a container context with container and optionally with image labels
use date, interval and cron-like triggers
set a maximum of simultaneously running instances per job
restrict job scheduling to one container per service
Example
Let’s say you want to dump the database of a Wordpress once a day. Here’s a docker-compose.yml that defines a job that will be handled by deck-chores:
version: '2'
services:
wordpress:
image: wordpress
mysql:
image: mariadb
volumes:
- ./database_dumps:/dumps
labels:
deck-chores.dump.command: sh -c "mysqldump --all-databases > /dumps/dump-$$(date -Idate)"
deck-chores.dump.interval: daily
It is however recommended use scripts with a proper shebang for such actions. Their outputs to stdout and stderr as well as their exit code will be logged by deck-chores.
Acknowledgements
It wouldn’t be as charming to write this piece of software without these projects:
Roadmap
0.1
also parse image’s labels - omit when magic label is set
0.2
parse time units for interval triggers
handle a global limit on concurrent jobs
print jobs when receiving SIGHUP
randomization of interval triggered events
maybe add a randomize expression for cron triggers
0.3
keep output of job executions
a rudimentary web ui
History
unreleased
new: set log format per :envvar:LOG_FORMAT
new: an options label to set behavioural flags
new: containers can be identified as a service by configurable labels
- new: job definitions for further containers of a service are ignored
(default, opt-out can be configured)
- new: image labels can also be parsed for job definitions
(default, opt-out can be configured)
0.1.beta1 (2016-12-04)
First release with full documentation
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
Built Distribution
Hashes for deck_chores-0.1b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f263716bafcdf9cf8590db2d87831991987632bec84f439f90ee6ea379838ab |
|
MD5 | 780aab7333d449c6a3842063e3081333 |
|
BLAKE2b-256 | e1fc9bbd8635b8e46ae99b27684e190b6d1df01a259131be8e28440ee2979847 |