Skip to main content

DEPRECATED 🚨

This project is deprecated. I haven't used it in years, I don't recommend using it.

Docker Auto Labels

Automatically generate Docker Swarm mode node labels for each constraint label in each service in a Docker Compose / Docker Stack file.

Description

This command line package is made to be used with a Docker Swarm mode cluster.

It will:

  • Read a Docker Compose / Docker Stack file.
  • Extract the node label constraints for each service.
  • Check that all the labels exist in the Docker Swarm mode cluster.
  • For each label that doesn't exist, create it in a random node in the cluster.

Adding label constraints helps you ensure that all the "stateful" Docker services (like databases) are always deployed to the same node (specially useful in a multi-node cluster).

This program will ensure that those labels exist in one node in the cluster, if they don't exist, they are created in one node chosen randomly.

That way, the first time you deploy a stack, a random node will be assigned to each stateful service (by this command, right before the deployment).

And for all subsequent deployments, the stateful services will go to the same nodes that they were using.

Release Notes

Latest Changes

Internal

0.2.4

Refactors

  • 👷 Refactor build setup and CI, and deprecate package. PR #11 by @tiangolo.

Internal

  • 🔧 Add GitHub templates for discussions and issues, and security policy. PR #9 by @alejsdev.
  • 🔧 Add funding. PR #8 by @tiangolo.
  • 👷 Add latest-changes GitHub Action. PR #6 by @tiangolo.
  • 👷 Add dependabot. PR #7 by @tiangolo.

0.2.3

License

MIT License

Metadata

Release files for docker-auto-labels 0.2.4

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

Source distribution (sdist)

Source distribution for docker-auto-labels 0.2.4
File Size Uploaded Provenance Actions
docker_auto_labels-0.2.4.tar.gz 4.3 kB Without provenance Details for docker_auto_labels-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docker-auto-labels 0.2.4
File Interpreter ABI Platform Actions
docker_auto_labels-0.2.4-py3-none-any.whl Python 3 none any Details for docker_auto_labels-0.2.4-py3-none-any.whl

Total release size: 9.3 kB

Release files / docker_auto_labels-0.2.4.tar.gz

Download URL docker_auto_labels-0.2.4.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8534f42642de4298a9171c64c69d66f88af5588a3f1dff652209c07400188989
BLAKE2b-256 checksum
How to use checksums
336ac0114dfb8e7100e4fa67fd17f9903183d35606dac2fa1075b19c5c300b22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / docker_auto_labels-0.2.4-py3-none-any.whl

Download URL docker_auto_labels-0.2.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
581332b3d1da7ceaa0553b68f265cb33462ef943d8f61a03fb8f427bbb51b582
BLAKE2b-256 checksum
How to use checksums
fc14aa117b17edb97d8e5d199f1820c27cf1aea125901f45bc3df6ce57b26298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Security for docker-auto-labels 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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