Initial commit

This commit is contained in:
2017-05-29 11:43:57 +02:00
commit 79c246e768
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,9 @@
{
"bootstrap": true,
"server": true,
"datacenter": "swarm",
"data_dir": "/opt/swarm",
"log_level": "INFO",
"enable_syslog": true,
"encrypt": "##key##"
}

13
consul/install.sh Executable file
View File

@ -0,0 +1,13 @@
#!/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