Last active
August 29, 2015 13:56
-
-
Save spikeekips/9266548 to your computer and use it in GitHub Desktop.
simple `etcd` cluster launch script for latest linux.
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/sh | |
n=$1 | |
args=$(echo $@ | sed -e "s/^$1//g") | |
ip=$(ip addr show eth0 | grep '\<inet\>' | awk '{print $2}' | sed -s 's/\/.*//g') | |
./etcd \ | |
-bind-addr=0.0.0.0 \ | |
-peer-bind-addr=0.0.0.0 \ | |
-addr $ip:$(expr 4000 + $n) \ | |
-peer-addr $ip:$(expr 7000 + $n) \ | |
-data-dir machines/machine$n \ | |
-name machine$n \ | |
-max-cluster-size 21 \ | |
$args | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment