HashiCorp/Consul

From Ever changing code
Jump to navigation Jump to search

Install

wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip
unzip consul_1.4.3_linux_amd64.zip
sudo mv consul /usr/bin

Run consul

You need run at least one consul server 3-5 are recommended. All other agents do run in a client mode, it's very light weight process that :

  • register services
  • check healthchecks
  • forward queries to servers
  • agent needs to run on every node that is a part of a cluster

Run consul in dev mode where single server is also acting as a client:

consul agent -dev -node <consul_srv_name>
# -node is optional as by default hostname is used, but for OSX with period in it will case problems with dns queries

consul members

References