mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
change from 0.7.0 to latest consul version
add temporary consul config files to .gitignore
This commit is contained in:
parent
e9f83eb143
commit
cb9c0986bb
3 changed files with 13 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,3 +8,4 @@
|
|||
real-adminrc
|
||||
*.taskpaper
|
||||
terraform/tf-example/terraform.tfstate*
|
||||
consul-*.config.json
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
Loading…
Reference in a new issue