Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/45fe2c4aa50e3879681789c0f91ae3d6 to your computer and use it in GitHub Desktop.
Save velotiotech/45fe2c4aa50e3879681789c0f91ae3d6 to your computer and use it in GitHub Desktop.
Setup the load-balancer machine
### On the load-balancer machine ...
### for Consul
sudo mkdir -p /etc/consul/
sudo wget https://raw.githubusercontent.com/shantanugadgil/hashistack/master/config/consul/client.hcl -O /etc/consul/client.hcl
### Edit Consul's client.hcl file and setup the fields 'name', 'encrypt', 'retry_join' as per your cluster.
sudo vim /etc/consul/client.hcl
### for Nomad ...
sudo mkdir -p /etc/nomad/
sudo wget https://raw.githubusercontent.com/shantanugadgil/hashistack/master/config/nomad/client.hcl -O /etc/nomad/client.hcl
### Edit Nomad's client.hcl file and setup the fields 'name', 'node_class', 'encrypt', 'retry_join' as per your cluster.
sudo vim /etc/nomad/client.hcl
### After you are done with the edits ...
sudo systemctl daemon-reload
sudo systemctl enable consul nomad
sudo systemctl restart consul nomad
sleep 10
sudo consul members
sudo nomad server members
sudo nomad node status -verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment