Last active
January 18, 2018 09:12
-
-
Save TimoDJatomika/6f0f2fa6474d748f82a9ff37566918a4 to your computer and use it in GitHub Desktop.
setup of a high availability vault cluster: other instances - setup consul
This file contains hidden or 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 | |
# 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