|
|
|
@ -4,7 +4,7 @@ set -e
|
|
|
|
|
# Read the address to join from the file we provisioned |
|
|
|
|
JOIN_ADDRS=$(cat /tmp/consul-server-addr | tr -d '\n') |
|
|
|
|
|
|
|
|
|
sudo sh -c 'echo "127.0.0.1 consul-node-'$(cat /tmp/consul-server-index)'" >> /etc/hosts' |
|
|
|
|
sudo sh -c 'echo "127.0.0.1 consul-node-'$(cat /tmp/consul-server-index)'" >> /etc/hosts' |
|
|
|
|
|
|
|
|
|
echo "Installing dependencies..." |
|
|
|
|
sudo apt-get update -y |
|
|
|
@ -12,7 +12,7 @@ sudo apt-get install -y unzip
|
|
|
|
|
|
|
|
|
|
echo "Fetching Consul..." |
|
|
|
|
cd /tmp |
|
|
|
|
wget https://dl.bintray.com/mitchellh/consul/0.5.0_linux_amd64.zip -O consul.zip |
|
|
|
|
wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip -O consul.zip |
|
|
|
|
|
|
|
|
|
echo "Installing Consul..." |
|
|
|
|
unzip consul.zip >/dev/null |
|
|
|
|