From the course: Docker for Developers

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Create a swarm

Create a swarm

- [Instructor] Okay, so now that we know about the basics of swarm, let's go and create our first swarm. So the way it works, you have the manager, basically the host machine that controls the swarm, and then the workers. Let's put this into practice, you can use physical machines or virtual to create a swarm. In this case, we'll use our host computer as the manager, and then add virtual machines with Docker to the swarm. So first, we need to create the node that will become the swarm manager. So let's go ahead and bring up the terminal first, so I'm going to bring up a new terminal. And it's very simple, all you have to do is do Docker swarm and then in it, and basically that is going to initialize a swarm for you. And that's how simple it is. So basically what you have here is the command to add a worker to the swarm. So what you would do is SSH into the machine that you want to add to the swarm and then once you're…

Contents