blob: 9b554b1fbe2ada8ac172718349b9871fd6d9636a [file] [log] [blame]
ramangrover29116eb972013-02-20 20:47:35 +00001ZK_HOME=$1
2shift 1
3cd $MANAGIX_HOME/.managix/zookeeper
4tar cf zk.pkg.tar *
5zk_server_id=1
6for zk_host in $@
7do
8 ssh $zk_host "mkdir $ZK_HOME"
9 scp ./zk.pkg.tar $zk_host:$ZK_HOME/
10 ssh $zk_host "cd $ZK_HOME && tar xf $ZK_HOME/zk.pkg.tar && chmod +x $ZK_HOME/bin/start_zk.sh"
11 ssh $zk_host "$ZK_HOME/bin/start_zk.sh $ZK_HOME $zk_server_id" &
12 zk_server_id=`expr $zk_server_id + 1`
13done