- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Managing Docker Swarm
Docker Swarm lets you manage the deployment of containerized applications and services across a cluster—or swarm—of linked Docker Engine hosts. These hosts are managed by a single Docker Swarm Manager, which deploys, scales, and otherwise manages the applications and services deployed to the worker Docker nodes. In this lab, you will configure a three-node Docker Swarm cluster, then deploy and scale a service across all three nodes, as well as test the resiliency of the service deployment should a node go down.
Lab Info
Table of Contents
-
Challenge
Initializing a Docker Swarm cluster
Configure Ubuntu Docker Swarm Manager to function as a Docker Swarm host, as the manager and leader. Ensure the Swarm host is using
172.31.24.10on the default Docker Swarm port as its advertised address. -
Challenge
Adding Docker Engine instances to the Swarm cluster
Add Ubuntu Docker Swarm Worker 1 and Ubuntu Docker Swarm Worker 2 to the Swarm cluster, ensuring they are worker nodes not manager/leader nodes.
-
Challenge
Deploying and scaling service containers to the Swarm
Deploy a
webtestservice using thenginx:alpineimage, mapping published port8080to80on the container, and ensuring no more than two replicas can be hosted on a single node. Scale the service up to 5 replicas, then check how it has been distributed across the Swarm. Finally, test Swarm resiliency by draining Ubuntu Docker Worker 1 and ensuring the replicas hosted on the worker have been reassigned.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.