Skip to content

Instantly share code, notes, and snippets.

@shantanugadgil
Last active June 17, 2019 13:47
Show Gist options
  • Save shantanugadgil/88039364bf17c48ff08fee4d62004d29 to your computer and use it in GitHub Desktop.
Save shantanugadgil/88039364bf17c48ff08fee4d62004d29 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