Skip to main content

CLI for deploying and managing Docker stacks.

Project description

Docker Stack CLI Utility

A powerful command-line utility designed to enhance Docker Swarm stack deployments by providing advanced features for managing Docker configs and secrets. This tool aims to simplify complex deployment scenarios and offer capabilities beyond vanilla Docker Stack.

Features

  • Docker Config and Secret Management with Extended Options: This utility significantly extends Docker's native config and secret management by introducing x- prefixed directives in your docker-compose.yml files. These directives allow for dynamic content generation, templating, and file inclusion, making your deployments more flexible and secure.

    x-content: Inline Content for Configs and Secrets

    Allows you to define the content of a Docker config or secret directly within your docker-compose.yml.

    secrets:
      my_inline_secret:
        x-content: "This is my secret content defined inline."
    
    configs:
      my_inline_config:
        x-content: |
          key=value
          another_key=another_value
    

    x-template: Environment Variable Templating

    Enables the use of environment variables within your config or secret content, which are substituted at deployment time.

    secrets:
      my_templated_secret:
        x-template: "I can create composite secret with template. ${API_KEY_NAME}:${MY_API_KEY}"
    

    x-template-file: External Template Files

    Reference an external file whose content will be treated as a template and processed with environment variables.

    configs:
      my_config_from_template_file:
        x-template-file: "./templates/my_config.tpl"
    

    (Content of ./templates/my_config.tpl might be: DB_HOST=${DATABASE_HOST})

    x-generate: Dynamic Secret Generation (Secrets Only)

    This powerful feature allows you to automatically generate random secrets based on specified criteria, eliminating the need to manually create and manage them. This is particularly useful for passwords, API keys, and other sensitive data.

    • Simple Generation (12-20 characters, default options):

      secrets:
        my_simple_generated_secret:
          x-generate: true
      
    • Specify Length:

      secrets:
        my_fixed_length_secret:
          x-generate: 30 # Generates a 30-character secret
      
    • Custom Generation Options: You can provide a dictionary to fine-tune the generation process:

      • length: (integer, default: 12-20 random) Exact length of the secret.
      • numbers: (boolean, default: true) Include numbers (0-9).
      • special: (boolean, default: true) Include special characters (!@#$%^&*...).
      • uppercase: (boolean, default: true) Include uppercase letters (A-Z).
      secrets:
        my_complex_generated_secret:
          x-generate:
            length: 25
            numbers: false
            special: true
            uppercase: true
        my_alphanumeric_secret:
          x-generate:
            length: 15
            numbers: true
            special: false
            uppercase: false
      
  • Docker Stack Versioning and Config Backup for Rollback: The utility automatically versions your Docker configs and secrets, allowing for easy tracking of changes and seamless rollbacks to previous states. This provides a safety net for your deployments, ensuring you can always revert to a stable configuration.

Why use Docker Stack CLI Utility?

Vanilla Docker Stack deployments can sometimes lack the flexibility needed for dynamic environments or robust secret management. This utility bridges those gaps by:

  • Automating Secret Management: No more manual secret generation or complex external scripts.
  • Simplifying Configuration: Define configs and secrets directly in your compose files or use templates.
  • Enhancing Security: Generate strong, random secrets on the fly.
  • Enabling Rollbacks: Versioning ensures you can always revert to a known good state.

Get started today and streamline your Docker Swarm deployments!

Project details


Download files

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

Source Distribution

docker_stack-0.3.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

docker_stack-0.3.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file docker_stack-0.3.0.tar.gz.

File metadata

  • Download URL: docker_stack-0.3.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for docker_stack-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b4546783fd4454a9cd9d2348ea9f19b27d7e6de42803eed3f5f32248f48b2d31
MD5 8575390734460ecced3949e867c50071
BLAKE2b-256 73a730f34fde6bbac5160d37c41a2af5306b5bd50c44d273f2d1913fadae8b4f

See more details on using hashes here.

File details

Details for the file docker_stack-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: docker_stack-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for docker_stack-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abe4bf35d87306074ec1a9c1bf42519177a9ecd45180350a90587fbbb3b043dd
MD5 8b6f2243ccbe578377cfef49164384b5
BLAKE2b-256 8a6bf9651b0c0a3a1001a45859f962a231b6e6992d1bb0d5925c5001c76afc7d

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