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
Image repository: https://hub.docker.com/r/funkyfuture/deck-chores
Code repository: https://github.com/funkyfuture/deck-chores
Issue tracker: https://github.com/funkyfuture/deck-chores/issues
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
multi-architecture image supports amd64 and arm platforms, no emulator involved
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 to 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.
Limitations
At the moment deck-chores is designed to run on a single Docker node, not within a cluster of these. Code and documentation contribution covering this are highly encouraged.
Acknowledgements
It wouldn’t be as charming to write this piece of software without these projects:
Roadmap
0.2
parse time units for interval triggers
handle a global limit on concurrent jobs
print jobs when receiving SIGUSR1
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
0.1.beta3 (2017-01-22)
new: there’s now a build for arm architectures
- new: an architecture agnostic manifest is pushed to the image registry
for release images
0.1.beta2 (2016-12-08)
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.1b3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3032ce990de6de19a173db9bac1656a8e7a85d6ff210a1400b15587066cb80ef |
|
MD5 | 2bff566d6f6a039484e041f234c860d9 |
|
BLAKE2b-256 | a15fe134f550aefa4c75a8a21bdc875201b7cda23d8e1190eaf344140a655f73 |