Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

deck-chores
===========

.. image:: https://images.microbadger.com/badges/image/funkyfuture/deck-chores.svg
:target: https://microbadger.com/images/funkyfuture/deck-chores

.. image:: https://img.shields.io/pypi/v/deck-chores.svg
:target: https://pypi.python.org/pypi/deck-chores

**A job scheduler for Docker containers, configured via container labels.**

* Documentation: https://deck-chores.readthedocs.io/en/latest/
* 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 ``armv7l`` 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*:

.. code-block:: yaml

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:

* `APScheduler <https://apscheduler.readthedocs.io>`_ for managing jobs
* `cerberus <http://python-cerberus.org>`_ for processing metadata
* `docker-py <https://docker-py.readthedocs.io>`_ for Docker interaction
* `flake8 <http://flake8.pycqa.org/>`_, `mypy <http://mypy-lang.org>`_,
`pytest <http://pytest.org>`_ and `tox <https://tox.readthedocs.io>`_ for testing
* `Python <https://python.org>`_


Roadmap
-------

0.3
...

- parse time units for interval triggers
- handle a global limit on concurrent jobs
- print jobs when receiving SIGUSR1
- support for configuring APScheduler's jitter option on Cron- & IntervalTrigger


0.4
...

- keep output of job executions
- a rudimentary web ui


Authors
-------

- Frank Sachsenheim (maintaining)


History
-------

0.2-rc3 (2017-12-23)
~~~~~~~~~~~~~~~~~~~~

* *changed*: arm builds base on `python:3.6-alpine <https://hub.docker.com/_/python/>`_
that are executed on an ARMv7l architecture
* *changed*: Updated dependencies *APScheduler* and *docker-py*


0.2-rc2 (2017-08-05)
~~~~~~~~~~~~~~~~~~~~

* *changed*: arm builds base on `arm32v6/python <https://hub.docker.com/r/arm32v6/python/>`_
* *changed*: therefore ``arm32v6`` replaces the ``arm``-suffix in image tags
* *changed*: there are no more images that get tagged with ``latest-$architecture``

0.2-rc1 (2017-07-01)
~~~~~~~~~~~~~~~~~~~~

* *refactoring*: uses the Python Docker SDK 2 (#14)
* *removed*: ``ASSERT_FINGERPRINT`` environment variable
* *renamed*: ``DOCKER_DAEMON`` to ``DOCKER_HOST`` to comply with the SDK
* *fix*: check on fixed labels (#18 by @aeri4list)
* documentation updates


0.1 (2017-03-02)
~~~~~~~~~~~~~~~~

* *fix*: docker-py returns ``None`` for labels of images that were created with
older Docker versions (#7)

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

Release files for deck-chores 0.2rc3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deck-chores 0.2rc3
File Size Uploaded
deck-chores-0.2rc3.tar.gz 31.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deck-chores 0.2rc3
File Interpreter ABI Platform
deck_chores-0.2rc3-py3-none-any.whl Python 3 none any Details

Total release size: 47.2 kB

Release files / deck-chores-0.2rc3.tar.gz

Download URL deck-chores-0.2rc3.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
675bbdbfad7334052a690feba7cee54dfed824f65c266cba85144c0447b68178
BLAKE2b-256 checksum
How to use checksums
6d83214d7d1cdbd69822efdc11a7f57676f0d325674c9d621a5694be88238b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / deck_chores-0.2rc3-py3-none-any.whl

Download URL deck_chores-0.2rc3-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9a02e749d9d3fccee093b0d6a5028aeba2f3c2ab9d0f3261fee0ea36d21de6e
BLAKE2b-256 checksum
How to use checksums
ef60cd4a037e54897cc68e6ce52dab6d124a8c2c6caee2d90ee2f6cbb9e364c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.4.12

2 release files

1.4.11

1 release file

1.4.10

2 release files

1.4.9

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4

2 release files

1.3.24

2 release files

1.3.23

2 release files

1.3.22

2 release files

1.3.21

2 release files

1.3.20

2 release files

1.3.19

2 release files

1.3.18

2 release files

1.3.17

2 release files

1.3.16

2 release files

1.3.15

2 release files

1.3.14

2 release files

1.3.13

2 release files

1.3.12

2 release files

1.3.11

2 release files

1.3.10

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3

2 release files

0.2

2 release files

This release

0.2rc3 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page