-
-
Save jdrago999/23f50894e973aa9745070a8986a68e92 to your computer and use it in GitHub Desktop.
Ubuntu installer script for consul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
set -x | |
mkdir -p /tmp/consul | |
cd /tmp/consul | |
# Consul Configuration File | |
tee consul.json <<CONSULCONFIG | |
{ | |
"client_addr": "0.0.0.0", | |
"data_dir": "/var/lib/consul", | |
"datacenter": "default", | |
"enable_syslog": true, | |
"log_level": "INFO", | |
"server": false | |
} | |
CONSULCONFIG | |
# Download things | |
wget -q -nc https://releases.hashicorp.com/consul/0.7.3/consul_0.7.3_linux_amd64.zip | |
# Update | |
sudo apt-get update -qq | |
sudo apt-get install -y unzip | |
# Install everything | |
unzip -o consul_0.7.3_linux_amd64.zip | |
sudo cp consul /usr/local/bin/consul | |
sudo mkdir -p /etc/consul | |
sudo mkdir -p /var/lib/consul | |
sudo cp consul.json /etc/consul/consul.json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment