Created
January 15, 2018 19:37
-
-
Save kknd22/f65672f99d6e6701a8979219a6d55cfb to your computer and use it in GitHub Desktop.
kafka bash alias bash script
This file contains 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
kf_dir=~/sw/kafka_2.11-1.0.0 | |
echo "...starting zookeeper..." | |
gnome-terminal --title="zookeeper" --geometry 80x30+1+1 \ | |
-e "$kf_dir/bin/zookeeper-server-start.sh $kf_dir/config/zookeeper.properties" | |
echo "...waiting for 5 sec..." | |
sleep 5 | |
echo "...starting kafka broker 0..." | |
gnome-terminal --title="broker-0" --geometry 80x13+400+1 \ | |
-e "$kf_dir/bin/kafka-server-start.sh $kf_dir/config/server.properties" | |
echo "...starting kafka broker 1"... | |
gnome-terminal --title="broker-1" --geometry 80x13+400+380 \ | |
-e "$kf_dir/bin/kafka-server-start.sh $kf_dir/config/server-1.properties" | |
echo "...starting kafka broker 2"... | |
gnome-terminal --title="broker-2" --geometry 80x13+400+700 \ | |
-e "$kf_dir/bin/kafka-server-start.sh $kf_dir/config/server-2.properties" | |
----------------------------------------------------------------------------------------------- | |
alias cdk='cd ~/sw/kafka_2.11-1.0.0' | |
alias psk='ps aux | grep kafka' | |
alias sa='. ~/.aliases' | |
alias showa='alias' | |
alias startk='cdk; bin/kafka-server-start.sh config/server.properties' | |
alias startz='cdk; bin/zookeeper-server-start.sh config/zookeeper.properties' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment