Skip to main content

A Dagster run launcher that executes pipeline runs as Docker Swarm services

Project description

dagster-docker-swarm

A Dagster run launcher that executes pipeline runs as Docker Swarm services.

Installation

pip install dagster-docker-swarm

Configuration

Add to your dagster.yaml:

run_launcher:
  module: dagster_docker_swarm
  class: SwarmRunLauncher
  config:
    image: my-registry/my-dagster-image:latest
    networks:
      - my_dagster_network
    env_vars:
      - DAGSTER_POSTGRES_HOST
      - DAGSTER_POSTGRES_DB
      - DAGSTER_CURRENT_IMAGE
    mounts:
      - target: /data
        source: shared_data
        type: volume

Service cleanup

Completed Swarm services are cleaned up by a background thread that runs every cleanup_interval seconds (default 300). To run sweeps more frequently:

run_launcher:
  module: dagster_docker_swarm
  class: SwarmRunLauncher
  config:
    cleanup_interval: 60   # sweep every 60 seconds
    image: my-registry/my-dagster-image:latest
    ...

Set cleanup_interval: 0 to disable the background thread entirely (e.g. if you prefer an external cron job).

Features

  • Launches each Dagster run as an isolated Swarm service (replicas=1, restart=none)
  • Run resume support for interrupted runs
  • Health checking via Swarm task state inspection
  • Automatic cleanup of completed/failed Swarm services via background thread
  • Private registry authentication
  • NFS and custom volume driver mounts
  • Passthrough service_kwargs for advanced Swarm service configuration

Requirements

  • Docker Swarm mode enabled (docker swarm init)
  • Dagster daemon must have access to the Docker socket
  • DAGSTER_CURRENT_IMAGE env var set on the daemon/webserver if not specifying image in config

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

dagster_docker_swarm-0.1.5.tar.gz (99.3 kB view details)

Uploaded Source

Built Distribution

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

dagster_docker_swarm-0.1.5-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file dagster_docker_swarm-0.1.5.tar.gz.

File metadata

  • Download URL: dagster_docker_swarm-0.1.5.tar.gz
  • Upload date:
  • Size: 99.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dagster_docker_swarm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b90c56ae7a69f4744b5227bddc8fef11a00f953cb109524ebe603b67f34b43a4
MD5 9f3d44efb883297400d3e6037bc0009e
BLAKE2b-256 1247a5b126120abe4e7e6576e54bebd165ea960958ff462b3d65cf0e056943b9

See more details on using hashes here.

File details

Details for the file dagster_docker_swarm-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: dagster_docker_swarm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dagster_docker_swarm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 336dd1ff281a9a62eb19302ee05220a19bc412cac4374905b55a8f3eef953991
MD5 6c45c99ad24a69022ddc982563a98117
BLAKE2b-256 d314b507cb83a5be313bc6363366e55b61a3b8285fb0d006c9aa7ef948d31e4e

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