For our first scheduler, we are going to look at Docker Swarm. This is a really solid product and in my opinion is a bit underrated compared to Kubernetes. It has really come on in leaps and bounds in the last few releases. It now supports replicated masters, rescheduling containers on failed hosts. So, let's look at the architecture of what we are building. Then, we will get into the coding.
In this example, we are going to build five servers, where two will be replicated masters and the other three nodes will be in the swarm cluster. As Docker Swarm needs a key/value store backend, we will use Consul. In this instance, we are not going to use our Consul modules; instead, we are going to use https://forge.puppetlabs.com/KyleAnderson/consul. The reason for this is that in all three examples, we are going to use different design choices. So, when you are trying to build a solution, you are exposed to more than one way to skin the cat. In this example...