ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 1 | ZK_HOME=$1 |
ramangrover29 | eb8bf05 | 2013-04-02 23:42:56 +0000 | [diff] [blame] | 2 | SERVER_JAVA_HOME=$2 |
| 3 | shift 2 |
ramangrover29@gmail.com | a84a0dc | 2013-03-07 02:59:33 +0000 | [diff] [blame] | 4 | cd $MANAGIX_HOME/.installer/zookeeper |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 5 | tar cf zk.pkg.tar * |
| 6 | zk_server_id=1 |
| 7 | for zk_host in $@ |
| 8 | do |
ramangrover29@gmail.com | a84a0dc | 2013-03-07 02:59:33 +0000 | [diff] [blame] | 9 | ssh $zk_host "mkdir -p $ZK_HOME" |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 10 | scp ./zk.pkg.tar $zk_host:$ZK_HOME/ |
| 11 | ssh $zk_host "cd $ZK_HOME && tar xf $ZK_HOME/zk.pkg.tar && chmod +x $ZK_HOME/bin/start_zk.sh" |
ramangrover29 | eb8bf05 | 2013-04-02 23:42:56 +0000 | [diff] [blame] | 12 | ssh $zk_host "$ZK_HOME/bin/start_zk.sh $ZK_HOME $zk_server_id $SERVER_JAVA_HOME" & |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 13 | zk_server_id=`expr $zk_server_id + 1` |
| 14 | done |