Docker Swarm ArchitectureΒΆ

Compose 🐳¢

flowchart LR
    none["svc-swarm-node declares no service"]

Swarm 🐝¢

flowchart LR
    none["svc-swarm-node declares no service"]

VolumesΒΆ

flowchart LR
    none["svc-swarm-node declares no volume"]

Condition

Effect

swarm, storage.backend: nfs, no nfs: false, role not pinned

shared over NFS

any one of those missing

node-local

All four conditions must hold, so pinning a role takes every one of its volumes node-local. Only the role’s primary entry counts as pinned here: a placement on any other service pins that service alone and leaves the backing of every volume unchanged. The chain is drawn rather than its result, because that coupling is what makes a placement change move data without saying so.

DependenciesΒΆ

flowchart LR
    subgraph deps [Dependencies]
        dep_web_app_docs["web-app-docs 🐳🐝"]
    end
    subgraph role [svc-swarm-node πŸ’»]
        svc_node["node"]
        svc_docs["docs"]
    end
    subgraph dependents [Dependents]
        dpt_svc_cache_package["svc-cache-package 🐳"]
        dpt_svc_registry_cache["svc-registry-cache 🐳"]
        dpt_svc_registry_docker["svc-registry-docker 🐳"]
        dpt_svc_swarm_manager["svc-swarm-manager πŸ’»"]
    end
    dep_web_app_docs -. "0..1" .-> svc_docs
    svc_node -- "1:1" --> dpt_svc_cache_package
    svc_node -- "1:1" --> dpt_svc_registry_cache
    svc_node -- "1:1" --> dpt_svc_registry_docker
    svc_node -. "0..1" .-> dpt_svc_swarm_manager

Symbol

Meaning

1:1 solid

fixed relationship

0..1 dashed

conditional, enabled only in matching deployments

0..0 red

declared but turned off in this role

πŸ’»

deploys to the host

🐳

deploys under compose

🐝

deploys under swarm

❌

service explicitly turned off

βš™οΈ

Ansible role dependency from meta/main.yml

Every dependency and dependent is listed; the graph is not truncated.