Permalink
Browse files

add a script to deploy voldemort servers for rebalancing test

  • Loading branch information...
1 parent fb450a7 commit 82fd2403f0f093048c658e823758841c1819caff Lei Gao committed Oct 22, 2011
Showing with 24 additions and 0 deletions.
  1. +24 −0 test/integration/voldemort/rebalance/Deploy.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -x
+source setup_env.inc
+
+if [ "$1" == "" ]; then
+ echo "Please specify a voldemort version to deploy"
+ exit 0
+fi
+
+VOLDEMORT_FILE=voldemort-$1
+VOLDEMORT_TAR=$VOLDEMORT_FILE.tar.gz
+
+for ((i=0; i < ${TOTAL_NUM_SERVERS} ; i++)); do
+ scp $VLDMDIR/dist/$VOLDEMORT_TAR $REMOTEUSER@${SERVER_MACHINES[$i]}:~/
+
+ if [ "$REMOTE_RUN" == "true" ]; then
+ export remote_call="ssh $REMOTEUSER@${SERVER_MACHINES[$i]}"
+ else
+ export remote_call=eval
+ fi
+ $remote_call "rm -rf voldemort; tar -xvzf ${VOLDEMORT_TAR}; mv ${VOLDEMORT_FILE} voldemort;"
+ $remote_call "cd $REMOTEWORK; source setup_env.inc; chmod a+x \${WORKDIR}/*.sh"
+done

0 comments on commit 82fd240

Please sign in to comment.