Created
January 11, 2016 17:31
-
-
Save emmettbutler/6477d7125f0a5f15760b to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
startkafka() { | |
tmux new-window | |
tmux send-keys /opt/kafka-$VERSION/bin/zookeeper-server-start.sh Space /opt/kafka-$VERSION/config/zookeeper.properties C-m | |
sleep 3 | |
tmux split-window -h | |
tmux send-keys /opt/kafka-$VERSION/bin/kafka-server-start.sh Space /opt/kafka-$VERSION/config/server.properties C-m | |
tmux split-window -h | |
tmux send-keys /opt/kafka-$VERSION/bin/kafka-server-start.sh Space /opt/kafka-$VERSION/config/server1.properties C-m | |
tmux split-window -h | |
tmux send-keys /opt/kafka-$VERSION/bin/kafka-server-start.sh Space /opt/kafka-$VERSION/config/server2.properties C-m | |
tmux select-layout main-vertical > /dev/null | |
sleep 3 | |
tmux new-window "/opt/kafka-$VERSION/bin/kafka-topics.sh --create --zookeeper localhost:2181 --topic testtopic_replicated --replication-factor 2 --partitions 10" | |
tmux close-window | |
} | |
VERSION=$1 | |
startkafka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment