From ee35581869cf7278e4d218b115fd6ca137d73cfc Mon Sep 17 00:00:00 2001 From: Shane O'Grady Date: Wed, 10 Feb 2016 13:43:15 -0200 Subject: [PATCH 1/2] Fix Consul download link in Terraform scripts Use https://releases.hashicorp.com --- terraform/aws/scripts/centos6/install.sh | 5 ++++- terraform/aws/scripts/rhel6/install.sh | 7 +++++-- terraform/aws/scripts/ubuntu/install.sh | 5 ++++- terraform/openstack/scripts/install.sh | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/terraform/aws/scripts/centos6/install.sh b/terraform/aws/scripts/centos6/install.sh index 045e07b51f..9bd7e984c9 100644 --- a/terraform/aws/scripts/centos6/install.sh +++ b/terraform/aws/scripts/centos6/install.sh @@ -4,13 +4,16 @@ set -e # Read the address to join from the file we provisioned JOIN_ADDRS=$(cat /tmp/consul-server-addr | tr -d '\n') +# consul version to install +CONSUL_VERSION=0.5.2 + echo "Installing dependencies..." yum update -y yum install -y unzip wget echo "Fetching Consul..." cd /tmp -wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip -O consul.zip +wget "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" -O consul.zip echo "Installing Consul..." unzip consul.zip >/dev/null diff --git a/terraform/aws/scripts/rhel6/install.sh b/terraform/aws/scripts/rhel6/install.sh index da40412785..43f71a94e1 100644 --- a/terraform/aws/scripts/rhel6/install.sh +++ b/terraform/aws/scripts/rhel6/install.sh @@ -4,13 +4,16 @@ set -e # Read the address to join from the file we provisioned JOIN_ADDRS=$(cat /tmp/consul-server-addr | tr -d '\n') +# consul version to install +CONSUL_VERSION=0.5.2 + echo "Installing dependencies..." sudo yum update -y sudo yum install -y unzip wget echo "Fetching Consul..." cd /tmp -wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip -O consul.zip +wget "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" -O consul.zip echo "Installing Consul..." unzip consul.zip >/dev/null @@ -28,7 +31,7 @@ sudo mv /tmp/consul-join /etc/service/consul-join chmod 0644 /etc/service/consul-join echo "Installing Upstart service..." -sudo chown root:root /tmp/upstart.conf +sudo chown root:root /tmp/upstart.conf sudo chown root:root /tmp/upstart-join.conf sudo mv /tmp/upstart.conf /etc/init/consul.conf sudo mv /tmp/upstart-join.conf /etc/init/consul-join.conf diff --git a/terraform/aws/scripts/ubuntu/install.sh b/terraform/aws/scripts/ubuntu/install.sh index 745b66ab6e..8ec0773f88 100644 --- a/terraform/aws/scripts/ubuntu/install.sh +++ b/terraform/aws/scripts/ubuntu/install.sh @@ -4,13 +4,16 @@ set -e # Read the address to join from the file we provisioned JOIN_ADDRS=$(cat /tmp/consul-server-addr | tr -d '\n') +# consul version to install +CONSUL_VERSION=0.5.2 + echo "Installing dependencies..." sudo apt-get update -y sudo apt-get install -y unzip echo "Fetching Consul..." cd /tmp -wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip -O consul.zip +wget "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" -O consul.zip echo "Installing Consul..." unzip consul.zip >/dev/null diff --git a/terraform/openstack/scripts/install.sh b/terraform/openstack/scripts/install.sh index 5348c8aa02..c224200631 100644 --- a/terraform/openstack/scripts/install.sh +++ b/terraform/openstack/scripts/install.sh @@ -4,6 +4,9 @@ set -e # Read the address to join from the file we provisioned JOIN_ADDRS=$(cat /tmp/consul-server-addr | tr -d '\n') +# consul version to install +CONSUL_VERSION=0.5.2 + sudo sh -c 'echo "127.0.0.1 consul-node-'$(cat /tmp/consul-server-index)'" >> /etc/hosts' echo "Installing dependencies..." @@ -12,7 +15,7 @@ sudo apt-get install -y unzip echo "Fetching Consul..." cd /tmp -wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip -O consul.zip +wget "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" -O consul.zip echo "Installing Consul..." unzip consul.zip >/dev/null From f03054a6c2c0ca36d89cc7befbc918fb1a9d82d7 Mon Sep 17 00:00:00 2001 From: Shane O'Grady Date: Wed, 10 Feb 2016 14:14:17 -0200 Subject: [PATCH 2/2] Fix Consul download link in benchmark scripts Use https://releases.hashicorp.com --- bench/bench-aws.json | 4 ++-- bench/bench.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bench/bench-aws.json b/bench/bench-aws.json index d33bb03f26..c80c044388 100644 --- a/bench/bench-aws.json +++ b/bench/bench-aws.json @@ -53,8 +53,8 @@ "sudo mkdir /etc/consul.d", "sudo apt-get update", "sudo apt-get install unzip make", - "wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip", - "unzip 0.4.1_linux_amd64.zip", + "wget https://releases.hashicorp.com/consul/0.5.2/consul_0.5.2_linux_amd64.zip", + "unzip 0.5.2_linux_amd64.zip", "sudo mv consul /usr/local/bin/consul", "chmod +x /usr/local/bin/consul" ] diff --git a/bench/bench.json b/bench/bench.json index 0197123e53..d2c2d3c2ec 100644 --- a/bench/bench.json +++ b/bench/bench.json @@ -47,8 +47,8 @@ "mkdir /etc/consul.d", "apt-get update", "apt-get install unzip make", - "wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip", - "unzip 0.4.1_linux_amd64.zip", + "wget https://releases.hashicorp.com/consul/0.5.2/consul_0.5.2_linux_amd64.zip", + "unzip 0.5.2_linux_amd64.zip", "mv consul /usr/local/bin/consul", "chmod +x /usr/local/bin/consul" ]