Alpine-based etcd v3.4.3 for Docker Swarm
This project is maintained at GitHub.
Create file etcd.yml containing:
version: "3.7"
services:
etcd:
image: "cepharum/etcd:latest"
environment:
SERVICE_NAME: etcd
MIN_SEEDS_COUNT: 3
deploy:
replicas: 3
Start cluster with
docker stack deploy etcd -c etcd.yml
This stack is going to run multiple nodes of etcd in a cluster which
Either issue might be fixable, but either solution requires you to take additional care:
Any volume attached to the service for persisting data must not be shared between the tasks of that service. Thus you must not share it between swarm nodes and need to guarantee that either task is running on a different swarm node.
The latter constraint can be satisfied by using global mode for deployment while making sure selected number of minimum seeds can be achieved by available swarm nodes.
Not working: The current container used in this service isn't capable of handling the following scenario.
version: "3.7"
services:
etcd:
image: "cepharum/etcd:latest"
environment:
SERVICE_NAME: etcd
MIN_SEEDS_COUNT: 3
deploy:
mode: global
volumes:
- "etcd_data:/data"
volumes:
etcd_data:
Persisting cluster data might have an impact on restarting either node e.g. after rebooting the hosting swarm node.
Content type
Image
Digest
Size
23.4 MB
Last updated
over 6 years ago
docker pull cepharum/etcd