change from 0.7.0 to latest consul version

add temporary consul config files to .gitignore
This commit is contained in:
Mikhail Vasilenko 2017-04-28 16:27:34 +03:00
parent e9f83eb143
commit cb9c0986bb
3 changed files with 13 additions and 6 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@
real-adminrc
*.taskpaper
terraform/tf-example/terraform.tfstate*
consul-*.config.json

View file

@ -1,4 +1,5 @@
#!/bin/bash
PLATFORM='linux_amd64'
# Update list of packages
export DEBIAN_FRONTEND=noninteractive
@ -17,11 +18,13 @@ fi
if [[ ! -e /usr/local/bin/consul ]];then
# Download Consul
curl -kLO https://releases.hashicorp.com/consul/0.7.0/consul_0.7.0_linux_amd64.zip
IFS=' ' CURL_OUT=$(curl https://releases.hashicorp.com/consul/)
CONSUL_VERSION=$(echo ${CURL_OUT} | grep href | grep consul | head -n 1 | awk -F'/' '{print $3}')
curl -kL https://releases.hashicorp.com/consul/$CONSUL_VERSION/consul_${CONSUL_VERSION}_${PLATFORM}.zip > consul.zip
# Decompress and remove Consul download
unzip consul_0.7.0_linux_amd64.zip
rm consul_0.7.0_linux_amd64.zip
unzip consul.zip
rm consul.zip
# Move Consul binary to location in path
sudo mv consul /usr/local/bin/

View file

@ -1,4 +1,5 @@
#!/bin/bash
PLATFORM='linux_amd64'
# Update list of packages
export DEBIAN_FRONTEND=noninteractive
@ -17,11 +18,13 @@ fi
if [[ ! -e /usr/local/bin/consul ]];then
# Download Consul
curl -kLO https://releases.hashicorp.com/consul/0.7.0/consul_0.7.0_linux_amd64.zip
IFS=' ' CURL_OUT=$(curl https://releases.hashicorp.com/consul/)
CONSUL_VERSION=$(echo ${CURL_OUT} | grep href | grep consul | head -n 1 | awk -F'/' '{print $3}')
curl -kL https://releases.hashicorp.com/consul/$CONSUL_VERSION/consul_${CONSUL_VERSION}_${PLATFORM}.zip > consul.zip
# Decompress and remove Consul download
unzip consul_0.7.0_linux_amd64.zip
rm consul_0.7.0_linux_amd64.zip
unzip consul.zip
rm consul.zip
# Move Consul binary to location in path
sudo mv consul /usr/local/bin/