This repository has been archived on 2019-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
devops/consul/install.sh

14 lines
439 B
Bash
Raw Normal View History

2017-05-29 09:43:57 +00:00
#!/bin/bash
URL="https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_arm.zip"
FILE="consul_0.8.3_linux_arm.zip"
UNZIP=`which unzip`
CURL=`which curl`
$CURL $URL -o $FILE
$UNZIP $FILE
mv consul /usr/bin/
rm $FILE
mkdir -p /etc/consul.d/{bootstrap,server,client}
#cp conf/bootstrap.json /etc/consul.d/bootstrap/config.json
KEY=`consul keygen`
sed -i -e 's/##key##/$KEY/g' conf/bootstrap.json > /etc/consul.d/bootstrap/config.json