A note for future readers:
In the end I managed to create a local nomad cluster as follows:
- Install Vagrant, and Ansible in the host (my laptop)
- Create a
Vagrantfileto spin up three virtual machines - one server, two clients - Provision them (I used Ansible, mainly because I’m very familiar with the tool)
- Install Docker (I used the
vagrant-docker-composeplugin) - Install Consul
- Configure Consul -
consul.hcl,systemdunit - Install Nomad
- Configure Nomad -
server/client.hcl,systemdunit
- Install Docker (I used the
- Finally, run
vagrant up
With the cluster up and running I tested out the official tutorial on load balancing using Fabio. I did run into some issues there, but those were unrelated to the cluster itself.
Note that I did not use the official(-ish) ansible-consul, and ansible-nomad roles as I could not get them to work together. Instead I wrote simple roles to install (using apt), and configure (combination of copy, and template) Consul and Nomad.