Skip to content

An automatic Terraform demo using Docker Swarm 1.12 mode

Notifications You must be signed in to change notification settings

sjourdan/docker-swarm-mode-demo

Repository files navigation

Docker Swarm Mode (>= Docker 1.12)

This docker cluster is running on Docker Swarm (new 1.12 mode). Warning: this was written with a pre-release version of Docker 1.12 - things work differently in the final release.

Requirements

You'll need:

  • terraform >= v0.6.15
  • the ./keys/docker-demo private key
  • a populated terraform.tfvars file

Setup

make apply

Manual Swarm Configuration

Initialize the swarm on the first manager:

docker swarm  init --secret <secret>

Leave the Swarm: docker swarm leave --force

Join a member to the Swarm:

docker swarm join --secret <secret> (--ca-hash sha256:<hash>) <master-ip>:2377

Troubleshooting

Known Bugs

  • the --secret option to docker swarm join has been pulled from 1.12 final. A related discussion includes this issue. Workaround may include playing around (didn't test yet) MANAGER_JOIN_TOKEN="$(docker swarm join-token -q manager)" and MANAGER_JOIN_TOKEN="$(docker swarm join-token -q worker)".

About

An automatic Terraform demo using Docker Swarm 1.12 mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published