Hashicorp Nomad with Consul service discovery
With my previous post I demonstrated how simple it is to connect services through Nomad’s service discovery support. I promised to follow-up showing this with Consul providing the service registry and use Consul’s service discovery.
Le’s look into the service stanza documentation.
The provider
key allows 2 different values.
We already used nomad
implementing the Nomad service registry.
Before Nomad 1.3 only consul
was a supported service registry.
This was the default for this key and would register the service with the Consul service registry.
So we would go ahead and just would set provider = "consul"
for the api
and the db
service.