consul

Grey Matter Fabric supports service discovery from HashiCorp Consul. See the Grey Matter Control Consul discovery setup documentation for how to configure this with Grey Matter Control.

Consul and Service Configuration

HashiCorp Consul is a service catalog with a full featured control plane with service discovery, configuration, and segmentation functionality.

When using consul service discovery, the Grey Matter Control server will discover service instances based on those registered with a Consul catalog that meet several specifications:

  • the Consul cluster is reachable via a host:port address

  • services are registered in a particular datacenter (see Consul's architecture documentation)

  • services are registered with a particular service tag (see the Service Definition documentation)

  • if the Consul cluster uses an ACL setup, there is a known token value for Grey Matter Control to connect to the Consul cluster

The above specifications will be passed to the Grey Matter Control server as environment variables, see the Grey Matter Control Consul discovery setup documentation for information on how to configure the Grey Matter Control Plane for Consul service discovery.

ACL Tokens

For a secure production implementation, your Consul cluster should be using an ACL token configuration. Grey Matter Control will then need to be provided an ACL token to connect to the Consul cluster, which should be passed through the environment.

Service Registry

One way to register services with the Consul catalog automatically is to use a Consul Agent. The Consul Agents should be running in the same cluster. For the Control server to recognize instance information such as node and/or service health, services should be registered with their own client node (agent). The datacenter will also be specified when running the Agent. More information on running a Consul Agent can be found here.

There are other options for registering services, including the Kubernetes Consul Sync Catalog and manual registration. The Grey Matter Control Plane will discover any services for its configured cluster and datacenter as long as they contain the specified tag.