ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 1 | ZK_HOME=$1 |
2 | shift 1 | ||||
3 | cd $MANAGIX_HOME/.managix/zookeeper | ||||
4 | tar cf zk.pkg.tar * | ||||
5 | zk_server_id=1 | ||||
6 | for zk_host in $@ | ||||
7 | do | ||||
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` | ||||
13 | done |