I’m having a bad time testing out my Nomad cluster locally on my laptop running OSX. I first ran it inside Docker (which is not recommended) but that broke things like memory detection and it didn’t like template-stanzas.
I then decided to run Nomad and Consul outside of Docker using bridge networking (the default), the containers live in the default 172.17.0.0/16 address space, but when looking up services in Consul, the containers are receiving 127.0.0.1, which won’t work inside the containers, they need the bridged IP.
Can anyone tell me how they run their local single node clusters for testing purposes and give me any hints?
It seems like Weave had the right idea for local development, but I have hard time finding any recent guides on how to run it with Nomad, and since version 2 they seem to focus on Docker Swarm.
Hi @SantoDE, sorry that you’re struggling with this as well, I really with the development workflow would be better. I am still unable to get proper template-stanzas to work with Docker on my Macbook.
I didn’t find anything yet, but I see a few options:
Try to patch one of the available Vagrant options, and try to make it fit my needs of a single-node cluster running Nomad (server+client), Consul and Dnsmasq. But I’m not that much of a fan of the Vagrant workflow, maybe a Packer builder to VMWare or Virtualbox would be better.
Maybe just setup a spare laptop to run everything.
Testing in production
Waiting for a Hashicorp product manager to feel bad for us and find a solution.
Hi @kaspergrubbe! I’m an engineer on the Nomad team who uses macOS as my daily driver, so I probably have some insights here. My typical workflow for single-node development is to use the Vagrantfile at the root of the https://github.com/hashicorp/nomad/blob/master/Vagrantfile and spin up the “linux-ui” box defined there (because I like to look at the Nomad web UI sometimes).
With the configurations below I can access Nomad and Consul both on localhost from the macOS host.