test-cluster 545 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. SESSION=etcd-cluster
  3. ulimit -n unlimited
  4. tmux new-session -d -s $SESSION
  5. # Setup a window for tailing log files
  6. tmux new-window -t $SESSION:1 -n 'peers'
  7. tmux split-window -h
  8. tmux select-pane -t 0
  9. tmux send-keys "./bin/etcd -s 127.0.0.1:7001 -c 127.0.0.1:4001 -d peer1 -n peer1" C-m
  10. for i in 2 3; do
  11. tmux select-pane -t 0
  12. tmux split-window -v
  13. tmux send-keys "./bin/etcd -cors='*' -s 127.0.0.1:700${i} -c 127.0.0.1:400${i} -C 127.0.0.1:7001 -d peer${i} -n peer${i}" C-m
  14. done
  15. # Attach to session
  16. tmux attach-session -t $SESSION