mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
23 lines
663 B
Bash
Executable File
23 lines
663 B
Bash
Executable File
#!/bin/bash
|
|
SESSION=etcd-cluster
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
ulimit -n unlimited
|
|
|
|
tmux new-session -d -s $SESSION
|
|
|
|
# Setup a window for tailing log files
|
|
tmux new-window -t $SESSION:1 -n 'peers'
|
|
tmux split-window -h
|
|
tmux select-pane -t 0
|
|
tmux send-keys "${DIR}/../bin/etcd -peer-addr 127.0.0.1:7001 -addr 127.0.0.1:4001 -data-dir peer1 -name peer1" C-m
|
|
|
|
for i in 2 3; do
|
|
tmux select-pane -t 0
|
|
tmux split-window -v
|
|
tmux send-keys "${DIR}/../bin/etcd -cors='*' -peer-addr 127.0.0.1:700${i} -addr 127.0.0.1:400${i} -peers 127.0.0.1:7001 -data-dir peer${i} -name peer${i}" C-m
|
|
done
|
|
|
|
# Attach to session
|
|
tmux attach-session -t $SESSION
|