Nomad job groups that define a network block, and particularly at least one port definition, will contain all the required network information for discovery and routing to the registered allocations.
The list job allocations combined with the read allocation API calls would provide the required information and filtering mechanism to fulfil the Provider interface.
This would be useful in situations such as Nomad users wishing to run Consul as a Nomad job. Currently this is difficult to achieve due to the bootstrapping and discovery requirement of Consul servers. The Nomad provider would remove this problem, allowing Consul to use Nomad to discover peers to connect with.
The exact design will need additional work, however, the following key/value basic config options would be needed in addition to any Nomad client options:
namespace: the Nomad namespace in which the target job is running
job_name: the name of the target job to discover
task_group: the name of the task group within the job; this is potentially optional if the job contains a single task group
port_label: the port label which is used by the target service for discovery
Nomad job groups that define a network block, and particularly at least one port definition, will contain all the required network information for discovery and routing to the registered allocations.
The list job allocations combined with the read allocation API calls would provide the required information and filtering mechanism to fulfil the
Provider
interface.This would be useful in situations such as Nomad users wishing to run Consul as a Nomad job. Currently this is difficult to achieve due to the bootstrapping and discovery requirement of Consul servers. The Nomad provider would remove this problem, allowing Consul to use Nomad to discover peers to connect with.
The exact design will need additional work, however, the following key/value basic config options would be needed in addition to any Nomad client options:
namespace
: the Nomad namespace in which the target job is runningjob_name
: the name of the target job to discovertask_group
: the name of the task group within the job; this is potentially optional if the job contains a single task groupport_label
: the port label which is used by the target service for discovery