github.com/smintz/nomad@v0.8.3/website/source/docs/service-discovery/index.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Service Discovery"
     4  sidebar_current: "docs-service-discovery"
     5  description: |-
     6    Learn how to add service discovery to jobs
     7  ---
     8  
     9  # Service Discovery
    10  
    11  Nomad schedules workloads of various types across a cluster of generic hosts.
    12  Because of this, placement is not known in advance and you will need to use
    13  service discovery to connect tasks to other services deployed across your
    14  cluster. Nomad integrates with [Consul][] to provide service discovery and
    15  monitoring.
    16  
    17  Note that in order to use Consul with Nomad, you will need to configure and
    18  install Consul on your nodes alongside Nomad, or schedule it as a system job.
    19  Nomad does not currently run Consul for you.
    20  
    21  ## Configuration
    22  
    23  To enable Consul integration, please see the
    24  [Nomad agent Consul integration](/docs/agent/configuration/consul.html)
    25  configuration.
    26  
    27  
    28  ## Service Definition Syntax
    29  
    30  To configure a job to register with service discovery, please see the
    31  [`service` job specification documentation][service].
    32  
    33  ## Assumptions
    34  
    35  - Consul 0.7.2 or later is needed for `tls_skip_verify` in HTTP checks.
    36  
    37  - Consul 0.6.4 or later is needed for using the Script checks.
    38  
    39  - Consul 0.6.0 or later is needed for using the TCP checks.
    40  
    41  - The service discovery feature in Nomad depends on operators making sure that
    42    the Nomad client can reach the Consul agent.
    43  
    44  - Tasks running inside Nomad also need to reach out to the Consul agent if
    45    they want to use any of the Consul APIs. Ex: A task running inside a docker
    46    container in the bridge mode won't be able to talk to a Consul Agent running
    47    on the loopback interface of the host since the container in the bridge mode
    48    has its own network interface and doesn't see interfaces on the global
    49    network namespace of the host. There are a couple of ways to solve this, one
    50    way is to run the container in the host networking mode, or make the Consul
    51    agent listen on an interface in the network namespace of the container.
    52  
    53  [consul]: https://www.consul.io/ "Consul by HashiCorp"
    54  [service]: /docs/job-specification/service.html "Nomad service Job Specification"