This document discusses Docker Swarm and how it can be used to deploy containerized applications on AWS. Some key points covered include:
- Docker Swarm allows for clustering of Docker engines into a single virtual Docker engine, providing services like scheduling, rolling updates, and load balancing.
- On AWS, Docker Swarm can be run across an Auto Scaling Group of Docker nodes for high availability and scalability.
- Examples are provided of using Docker commands to deploy visualizer, voting app, and other sample services in a Docker Swarm cluster on AWS.
- Traefik can be used as a reverse proxy and load balancer for services in the Docker Swarm cluster.
18. • Clustering
• Scheduling
• / Rolling Update / Rollback
• Scale Out
• Service Discovery
• DNS / Auto DNS Register
• Multi-host network
• Load Balancing
28. $ ssh -i <path-to-ssh-key> docker@<ssh-host>
Welcome to Docker!
$ docker info
$ docker node ls
29. docker service create
--name=viz
--publish=5000:8080/tcp
--constraint=node.role==manager
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock
dockersamples/visualizer
docker service ls
docker service ps viz
30. docker service create
--name=viz
--publish=5000:8080/tcp
--constraint=node.role==manager
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock
dockersamples/visualizer
name
publish
contraint
mount
31.
32. docker network create --driver overlay vote-network
docker service create
--name=vote
--publish=3000:80
--network=vote-network
subicura/sample_vote:1
docker service scale vote=3
33. docker service create
--name=redis
redis:alpine
docker service rm redis
docker service create
--network=vote-network
--name=redis
redis:alpine