Par's GitHub Pages

Visit my latest wiki at wiki.pacroy.com

View the Project on GitHub

Swarm Basics

Containers Everywhere = New Problems

Swarm Mode: Built-In Orchestration

Swarm Topology

Nginx On Swarm

Swarm Architecture

Swarm Initialization

docker info | grep Swarm See whether swarm is active docker swarm init Activate swarm mode

docker swarm init: What Just Happened?

docker node ls List nodes in swarm docker swarm join-token worker Get join token for worker node

Test Swarm

docker service create alpine ping 8.8.8.8 Create alpine container and ping 8.8.8.8 docker service ls List services docker service ps <service_name> List of processes (or containers) running for the given services docker service update <service_name> --replicas 3 Update the service to run with 3 containers docker container rm -f <container_name> Try to remove the container and the orchestrator will spin it up automatically docker service rm <service_name> Remove the given service