This is a Docker Swarm stack for deploying a performant and highly available persistent storage system using SeaweedFS.
This example stack is designed to operate on a Docker Swarm consisting of three nodes (node1, node2, node3
) spread out over different locations and connected in a Wireguard mesh. In this setup, some network latency is to be expected. Therefore, to reduce the amount of network hops, we configure the SeaweedFS Filers to prefer writing to Volumes existing on the same node as itself, and likewise with the globally deployed Mounts preferring to connect to a local Filer.
Assuming you have adjusted the Docker stack files and configs to suit your environment (for instance, your nodes are probably not called node1, node2...
, you may have another Swarm overlay network than the public
of this example, etc.):
- On every Swarm node:
mkdir /mnt/{cch,cld,seaweedfs}
mkdir /mnt/seaweedfs/{filer,master,volume}
- On a Swarm master node:
docker stack deploy -c docker-compose.yml seaweedfs