Skip to content

Instantly share code, notes, and snippets.

View sebholstein's full-sized avatar

Sebastian Holstein sebholstein

View GitHub Profile
@sebholstein
sebholstein / bootstrap-consul.sh
Created June 29, 2016 07:52 — forked from yaronr/bootstrap-consul.sh
Bootstrap Consul on CoreOS
#!/bin/bash
source /etc/environment
hostname=$(cat /etc/machine-id)
machines=$(etcdctl ls /consul.io/bootstrap/machines)
#If there are 'machines' then the cluster has been initialised.
if [ -z "$machines" ]
then
flags="${flags} -bootstrap"
@sebholstein
sebholstein / bootstrap-consul.sh
Created June 29, 2016 07:52 — forked from bluk/bootstrap-consul.sh
Consul Bootstrap on CoreOS
#!/bin/bash
# From https://gist.github.com/philips/56fa3f5dae9060fbd100
source /etc/environment
name=$(cat /etc/machine-id)
if [ ! -f /opt/consul ]; then
mkdir /opt
mkdir /var/lib/consul