Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 07:20
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/e44013ed0579a48f9ac7ff047f52fa2b to your computer and use it in GitHub Desktop.
Save velotiotech/e44013ed0579a48f9ac7ff047f52fa2b to your computer and use it in GitHub Desktop.
Setup the server for Consul and Nomad
### On the server machine ...
### Consul
sudo mkdir -p /etc/consul/
sudo wget https://raw.githubusercontent.com/shantanugadgil/hashistack/master/config/consul/server.hcl -O /etc/consul/server.hcl
### Edit Consul's server.hcl file and setup the fields 'encrypt' and 'retry_join' as per your cluster.
sudo vim /etc/consul/server.hcl
### Nomad
sudo mkdir -p /etc/nomad/
sudo wget https://raw.githubusercontent.com/shantanugadgil/hashistack/master/config/nomad/server.hcl -O /etc/nomad/server.hcl
### Edit Nomad's server.hcl file and setup the fields 'encrypt' and 'retry_join' as per your cluster.
sudo vim /etc/nomad/server.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment