test-cluster 516 B

12345678910111213141516171819
  1. #!/bin/bash
  2. SESSION=etcd-cluster
  3. tmux new-session -d -s $SESSION
  4. # Setup a window for tailing log files
  5. tmux new-window -t $SESSION:1 -n 'peers'
  6. tmux split-window -h
  7. tmux select-pane -t 0
  8. tmux send-keys "./etcd -s 127.0.0.1:7001 -c 127.0.0.1:4001 -d peer1 -n peer1" C-m
  9. for i in 2 3; do
  10. tmux select-pane -t 0
  11. tmux split-window -v
  12. tmux send-keys "./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
  13. done
  14. # Attach to session
  15. tmux attach-session -t $SESSION