mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat(scripts/test-cluster): add a cluster test command
this uses tmux to setup a test cluster that you can easily kill and start for debugging.
This commit is contained in:
parent
20488b498a
commit
cbd8a4fb9c
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ src/
|
||||
pkg/
|
||||
/etcd
|
||||
release_version.go
|
||||
/machine*
|
||||
|
19
scripts/test-cluster
Executable file
19
scripts/test-cluster
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
SESSION=etcd-cluster
|
||||
|
||||
tmux new-session -d -s $SESSION
|
||||
|
||||
# Setup a window for tailing log files
|
||||
tmux new-window -t $SESSION:1 -n 'machines'
|
||||
tmux split-window -h
|
||||
tmux select-pane -t 0
|
||||
tmux send-keys "./etcd -s 127.0.0.1:7001 -c 127.0.0.1:4001 -d machine1 -n machine1" C-m
|
||||
|
||||
for i in 2 3; do
|
||||
tmux select-pane -t 0
|
||||
tmux split-window -v
|
||||
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 machine${i} -n machine${i}" C-m
|
||||
done
|
||||
|
||||
# Attach to session
|
||||
tmux attach-session -t $SESSION
|
Loading…
x
Reference in New Issue
Block a user