Skip to main content

Automatically generate Docker Swarm mode node

Project description

# Docker Auto Labels [![](https://img.shields.io/pypi/v/auto-docker-labels.svg)](https://pypi.python.org/pypi/auto-docker-labels)

[![](https://img.shields.io/travis/khulnasoft/auto-docker-labels.svg)](https://travis-ci.org/khulnasoft/auto-docker-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.

For examples on how to use it, check: https://github.com/khulnasoft/full-stack

## Release Notes

### Latest Changes

#### Internal

### 0.2.3

## License

MIT License

History

0.1.0 (2018-05-01)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_docker_labels-0.2.3-py2.py3-none-any.whl (5.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file auto_docker_labels-0.2.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for auto_docker_labels-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e6b88f76f6bdd07de0f41032edc53d51396d95db9ce79457876cec2c099bf283
MD5 7b287af245dca8dcd7c72ca160d3aa2f
BLAKE2b-256 3c80a91a108ccbfedb94dfeb655c4e7fd1778a2de40a1ecaf07af758313260e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page