Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
Last active January 18, 2018 09:12
Show Gist options
  • Save TimoDJatomika/6f0f2fa6474d748f82a9ff37566918a4 to your computer and use it in GitHub Desktop.
Save TimoDJatomika/6f0f2fa6474d748f82a9ff37566918a4 to your computer and use it in GitHub Desktop.
setup of a high availability vault cluster: other instances - setup consul
#!/bin/bash
# author: Timo Stankowitz <[email protected]>
# version: 2
# other instances: setup consul
# create directory
mkdir consul-persistent-data
mkdir consul-config
# change into the consul config directory
cd consul-config
# download configuration
wget http://vault-ha.de/files/consul-config-acl.json
wget http://vault-ha.de/files/consul-config-gossip.json
# run docker container and join the cluster
docker run -d --name="consul" -v /home/core/consul-config/:/consul/config -v /home/core/consul-persistent-data/:/consul/data --net=host consul agent -server -bootstrap-expect=3 -ui -client=0.0.0.0 -bind=$(ip -4 -o addr show dev eth0 | awk '{split($4,a,"/");print a[1]}') -join 10.10.1.71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment