Portainer and Docker Swarm
In the previous section, we looked at how to use Portainer on a standalone Docker instance. Portainer also supports Docker Swarm clusters, and the options in the interface adapt to the clustered environment. We should look at spinning up a Swarm and then launching Portainer as a service and see what changes.
So let's start by launching a new Docker Swarm cluster.
Creating the Swarm
As in the Docker Swarm chapter, we are going to be creating the Swarm locally using Multipass; to do this, run the following commands to launch the three nodes:
$ multipass launch -n node1 $ multipass launch -n node2 $ multipass launch -n node3
Now install Docker:
$ multipass exec node1 -- \ /bin/bash -c 'curl -s https://get.docker.com | sh - && sudo usermod -aG docker ubuntu' $ multipass exec node2 -- \ /bin/bash -c 'curl -s https://get.docker.com | sh - && sudo usermod -aG docker ubuntu' $ multipass exec node3 --...