Getting Started with Docker Swarm Mode
What if you could throw containers at a cluster of nodes as easily as a single node? This course will teach how you can control a cluster with all the simplicity of managing a single docker engine thanks to Docker Swarm Mode.
What you'll learn
The docker engine on a single node revolutionized how we run applications. But in production environments, you need more capacity and reliability than a single node can offer. In this course, Getting Started with Docker Swarm Mode, you'll learn how to control a cluster of nodes as easily as a managing a single node. First, you'll discover how to set up a swarm, add nodes, and launch services that describe containers. Next, you'll explore how to route traffic to the cluster and within the cluster, ensure containers recover from failures. Then, you'll learn how to roll out updates and deploy multi application stacks. Finally, you'll cover how to leverage integrated health checking and protect sensitive information with secrets. By the time you're done with this course, you'll have the knowledge to deploy your own swarm.
Table of contents
- The Magic of Docker Should Work on Multiple Machines Too 4m
- What Are Some of the Concerns When Moving to Multiple Machines? 7m
- What You Should Already Know 2m
- What if a Single Container Isn't Enough? 3m
- Scaling Capacity by Scaling Containers 3m
- What About Balancing Load Across Containers on Different Nodes? 1m
- What Happens When a Container Fails? 2m
- What Happens When a Node Fails? 2m
- What About Internal Communication? 3m
- User Defined Networks to Connect Containers on a Single Node 8m
- docker-compose Simplifies Complex Containers and Networking 4m
- What About Scaling Internal Application Dependencies? 3m
- Preparing a Single Node to Follow Along 3m
- Enabling Experimental Features 2m
- Enabling Swarm Mode by Initializing a New Swarm 3m
- Listing and Inspecting Nodes 3m
- Creating an NGINX Service 3m
- A Service Is a Definition of an Application 2m
- Services Lead to Tasks 5m
- Removing a Service 2m
- Updating a Service to Scale the Number of Containers 3m
- Swarm Managers Ensure the Desired State Is Maintained 6m
- The Scheduling Process 3m
- Creating a Second Service for Our Customer API 3m
- The Swarm Mode Routing Mesh 2m
- Testing Throughput on a Scaled Service 3m
- Moving to Multiple Nodes 1m
- Destroying the Single Node Swarm 3m
- Creating and Managing VMs with Docker Machine 5m
- Accessing my Lab Setup Vagrantfile 2m
- Launching 3 VMs with vagrant up 1m
- Accessing the Docker Engine Inside the Vagrant VMs 3m
- docker swarm init --advertise-addr 3m
- Joining Worker Nodes to the Swarm 5m
- Creating a Service to Visualize Our Cluster State 5m
- What Happens When a Node Is Shut Down 3m
- Creating and Scaling a Second Service 3m
- The Spread Strategy and Testing Throughput of the Scaled Service 4m
- Inspecting Nodes and Clustering Gotchas 4m
- Listing Tasks per Node 1m
- Promoting a Worker to a Manager and Demoting Too 1m
- Draining a Node to Perform Maintenance 4m
- One Container per Node with Global Services 4m
- Swarm Mode Is Incredibly Easy to Setup 3m
- Routing External Traffic to Cluster Services 1m
- Published Ports Provide External Access to Services 4m
- The Ingress Overlay Network 4m
- Options for Routing External Traffic to Nodes 2m
- Host Publishing Mode Instead of Ingress Mode 2m
- Ingress Publish Mode Routes to a Random Container 2m
- Removing a Published Port on an Existing Service 1m
- Adding a Host Mode Published Port 3m
- Publishing a Random Port 3m
- Reconciling a Desired State 1m
- Quiz - What Happens When We Add a Node to the Swarm? 3m
- Creating a Pending Service and Inspecting Task Status 5m
- Joining a New Node to Fulfill a Pending Service 4m
- What Happens to a Service When We Lose the Only Compatible Node? 3m
- Cleaning up Nodes That Have Failed 2m
- Remove Vestigial Services 1m
- If Your App Fails Then the Corresponding Task Will Be Shutdown 3m
- Scale a Service to Zero to Stop It Without Removing It 1m
- Desired State Reconciliation Affords SRP 1m
- How Do We Update an Application? 0m
- Updates Seem to Happen All at Once 2m
- Updates Are Incremental 2m
- Running a Docker Command on Every Node in the Cluster 4m
- Specifying an Image Tag When Creating a Service 2m
- Adding Delay Between Task Updates 5m
- Updating Multiple Tasks Concurrently with --update-parallelism 2m
- Cleaning up Task History When Learning 1m
- Quiz Recap on Update Delay and Parallelism 1m
- Using watch to Visualize Updates in a Terminal 5m
- Slowing Down the Update Process to Visualize Updates 6m
- RollOut Mode and Other Update Settings Are WIP 2m
- Inspecting the UpdateConfig Policy per Service 2m
- Watching the UpdateConfig Policy as It Is Updated 4m
- Inspecting Task Errors 2m
- Rolling Back to the Previous Service Definition 3m
- Configuring Rollback Policies 1m
- Use --force to Test Changes to Update Policies 2m
- Watching UpdateStatus During a Service Update 2m
- Simulating and Monitoring an Update Failure 3m
- Resuming a Paused Update 3m
- Internal Container to Container Scenario 2m
- Ingress Network Is Special Purpose for Publishing Ports 2m
- Our New Network Topology 1m
- Creating an Overlay Network 2m
- Inspecting Overlay Networks 1m
- Attaching a New Service to Our Overlay Network 2m
- Adding a Second Service to Our Overlay Network 1m
- Viewing Service Logs 3m
- Adding an Environment Variable to an Existing Service 3m
- docker exec to Check Service Discovery on the Overlay Network 2m
- Spelunking Service Discovery as We Scale Services 6m
- Using Curl to Validate Internal Load Balancing 3m
- Validating External Load Balancing via the Ingress Network 2m
- docker service inspect for Finding the Virtual IPs for a Service 2m
- Use DNS Round Robin Instead of a Virtual IP 2m
- Networks Are Lazily Extended to Worker Nodes 2m
- A Few Last Things 1m
- Enough with All the Flags Already 1m
- Remove All Services 1m
- The New Compose Version 3 Format 2m
- Creating a Compose File for Our Viz Service 4m
- Deploying a Stack with a Compose File 4m
- Updating a Service with a Stack Is as Easy as Creating It 2m
- Removing a Stack 1m
- Creating and Deploying a Multi Service Stack 5m
- Specifying Replicas in Compose File 1m
- Quiz and Key Course Takeaway 2m
- The Trifecta Services - Networks and Volumes 3m
- A Running Process Is Not Necessarily Ready for Traffic 1m
- Deploying a Cowsay Stack 2m
- What Happens if We Break a Container? 3m
- Automatic Service Recovery with Health Checks 4m
- Manually Forcing a Corrupted Service to Restart 4m
- Options for Adding Health Checks 3m
- Adding a Health Check to a Stack Compose File 6m
- Configuring Interval and Timeout and Retries 2m
- Deploying Health Checks and Inspecting Container Health 4m
- Monitoring When Testing Health Checks 2m
- Monitoring Service Auto Recovery from Health Check Failure 3m
- Adjust the Health Check Interval When Learning 1m
- Health Checks Prevent Traffic to a Container That Is Starting 3m
- Health Checks Prevent Traffic to Unhealthy Containers 1m
- Health Checking with docker run 4m
- Adding a Health Check to a Dockerfile 2m
- Disable Health Checking 1m
- Environment Variables Can Leak Passwords 2m
- Creating a Secret for a MySQL Password 1m
- Granting a Service Access to a Secret 2m
- Troubleshooting a Failing Service 1m
- Accessing Secrets in a Container via the Filesystem 2m
- Using a Secret to Provide a MySQL Root Password 3m
- Steps to Use Secrets 4m
- _FILE Image Secrets Convention 1m
- Removing Secrets 1m
- A Convention for Updating a Secret 5m
- The End 2m