ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 1 | ZK_HOME=$1 |
| 2 | shift 1 |
ramangrover29@gmail.com | a84a0dc | 2013-03-07 02:59:33 +0000 | [diff] [blame^] | 3 | cd $MANAGIX_HOME/.installer/zookeeper |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 4 | tar cf zk.pkg.tar * |
| 5 | zk_server_id=1 |
| 6 | for zk_host in $@ |
| 7 | do |
ramangrover29@gmail.com | a84a0dc | 2013-03-07 02:59:33 +0000 | [diff] [blame^] | 8 | ssh $zk_host "mkdir -p $ZK_HOME" |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 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 |