Ok, I’m using, and am new to both Nomad and Consul, and I’m trying to wrap my head around how to set this up smoothly.
Specifically, I’m trying to figure out how to do service discovery inside of a docker container. So, all of my nodes are running consul agent, so if I run a standard exec job, it’s pretty easy to use
dig @127.0.0.1 -p 8600 or some other local dns tools to figure that out.
But, say now I use nomad to launch a docker task, that gets put on a virtual network, and it seems no-longer easy to find the correct address to connect to the agent on the host.
Alternatively, I can of course copy consul agent itself into all of my images, but it seems that I still have the problem of giving consul an ip address to connect to.
How are others solving this sort of problem? Is there just something big that I entirely missed?