Sign inSign up

cepharum/etcd

By cepharum

•Updated over 4 years ago

Image
0

446

cepharum/etcd repository overview

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

  • isn't using any volume for persisting its data. When removing the stack all data is gone.
  • isn't exposing any port for public use, thus you can't access the cluster without adding a consuming service to this stack first.

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.

  • When exposing ports communication is unencrypted. There is no support for encryption using this stack as-is.

Tag summary

Content type

Image

Digest

Size

23.4 MB

Last updated

over 6 years ago

docker pull cepharum/etcd