You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:26:27 UTC
svn commit: r1131759 - in
/incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2: setup
setup-torque
Author: benh
Date: Sun Jun 5 05:26:26 2011
New Revision: 1131759
URL: http://svn.apache.org/viewvc?rev=1131759&view=rev
Log:
Updating lucid setup scripts to include torque.
Modified:
incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup
incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque
Modified: incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup?rev=1131759&r1=1131758&r2=1131759&view=diff
==============================================================================
--- incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup (original)
+++ incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup Sun Jun 5 05:26:26 2011
@@ -15,6 +15,12 @@ SCRIPTS="copy-dir
redeploy-nexus
setup-apache
setup-slave
+ setup-torque
+ setup-torque-server
+ start-torque-slaves
+ stop-torque-slaves
+ prologue.setup-mpi-master
+ setup-mpi
ssh-no-keychecking
start-mos
start-nexus
@@ -24,7 +30,10 @@ SCRIPTS="copy-dir
HADOOP_HOME=/root/hadoop-0.20.2
+#TODO(*): update config scripts to have conditionals for handling different
+# platforms
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+#JAVA_HOME=/usr/lib/jvm/java-6-sun #works for karmic, this is lucid
SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=2"
@@ -57,6 +66,7 @@ echo "RSYNC'ing /root/nexus-ec2 to slave
for slave in `cat $SLAVES`; do
echo $slave
rsync -e "ssh $SSH_OPTS" -az /root/nexus-ec2 $slave:/root
+ scp ~/.ssh/id_rsa $slave:.ssh
done
echo "Setting up slaves..."
@@ -157,5 +167,8 @@ $HADOOP_HOME/bin/start-dfs.sh
echo "Starting MapOutputServer(s)..."
./start-mos
+echo "Setting up torque"
+./setup-torque
+
echo "Starting Nexus cluster..."
./start-nexus
Modified: incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque?rev=1131759&r1=1131758&r2=1131759&view=diff
==============================================================================
--- incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque (original)
+++ incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque Sun Jun 5 05:26:26 2011
@@ -6,46 +6,56 @@ SLAVES_FILE="/root/nexus-ec2/slaves"
MASTER="`cat master`"
SLAVES="`cat $SLAVES_FILE`"
+SCHEDULER_ITERATION=5
+
#These seem to be broken, i.e. missing directories after install
#ssh $MASTER "apt-get install -y torque-server"
#ssh $MASTER "apt-get install -y torque-scheduler"
#ssh $MASTER "apt-get install -y torque-client"
#install torque: download/unzip torque
-function installmaster {
+function installtorque {
pushd ~
echo "downloading and installing torque on master"
#wget http://www.clusterresources.com/downloads/torque/torque-2.4.7.tar.gz
wget http://nexus.berkeley.edu/torque-2.4.7.tar.gz
tar xzf torque-2.4.7.tar.gz
- cd torque-2.4.7
- ./configure --prefix=/usr/local --with-debug --disable-gcc-warnings
+ pushd torque-2.4.7
+ ./configure --prefix=/usr
make -j8
make install
+ popd;popd
+}
+
+function setuptorque {
+ pushd ~/torque-2.4.7
echo "running ldconfig on master"
ldconfig
- ./torque.setup root #localhost # Note: sets some defaults for batch queue
+ #./torque.setup root # Note: sets some defaults for batch queue
+ qterm
+ yes|./torque.setup root localhost # Note: sets some defaults for batch queue
- echo "copying init.d control scripts to master"
- cp contrib/init.d/debian.pbs_mom /etc/init.d/pbs_mom
- cp contrib/init.d/debian.pbs_sched /etc/init.d/pbs_sched
- cp contrib/init.d/debian.pbs_server /etc/init.d/pbs_server
-
- popd
#WARNING: allow root to qsub for debug purposes only, may be dangerous
qmgr -c 'set server acl_roots+=root@*' #allow root to submit jobs
- qmgr -c 's s allow_node_submit=true' #other hosts can submit too
- NUM_SLAVES=`cat slaves|wc -l`
- qmgr -c "s queue batch resources_max.nodect=$NUM_SLAVES"
- qmgr -c "s queue batch resources_available.nodect=$NUM_SLAVES" #the framework should update this on its own and the server has to be restarted after this
- qterm
+ qmgr -c "set server scheduler_iteration=$SCHEDULER_ITERATION"
+ #qmgr -c 's s allow_node_submit=true' #other hosts can submit too
+
+ NUM_SLAVES=`cat ~/nexus-ec2/slaves|wc -l`
+ #the server be restarted after this
+ qmgr -c "set queue batch resources_available.nodect=$NUM_SLAVES"
+ #qmgr -c "set server resources_available.nodect=$NUM_SLAVES"
+ qterm
+ pbs_server
touch ~/.rhosts
echo `hostname` |cat >> ~/.rhosts
echo `hostname -f` |cat >> ~/.rhosts
echo localhost |cat >> ~/.rhosts
+
+ popd
}
+
function installslaves {
pushd ~/torque-2.4.7
echo "building packages for slave"
@@ -59,18 +69,27 @@ function installslaves {
cp torque-package-mom-linux-x86_64.sh /nfs/torque/torque-package-clients-linux-x86_64.sh
echo "installing torque mom and clients package on slaves"
- dsh -f $SLAVES_FILE /nfs/torque/torque-package-mom-linux-x86_64.sh --install
- dsh -f $SLAVES_FILE /nfs/torque/torque-package-clients-linux-x86_64.sh --install
-
- echo "copying pbs_mom init.d control script to slaves"
- mkdir /nfs/torque/init.d
- cp contrib/init.d/debian.pbs_mom /nfs/torque/init.d/debian.pbs_mom
- dsh -f $SLAVES_FILE cp /nfs/torque/init.d/debian.pbs_mom /etc/init.d/pbs_mom
+ for i in `cat $SLAVES_FILE`; do ssh $i /nfs/torque/torque-package-mom-linux-x86_64.sh --install; ldconfig; done
+ for i in `cat $SLAVES_FILE`; do ssh $i /nfs/torque/torque-package-clients-linux-x86_64.sh --install; ldconfig; done
echo "Running ldconfig on slaves"
dsh -f $SLAVES_FILE ldconfig
popd
}
-installmaster
+function installmpi {
+ #setup mpich2 on all of the cluster nodes
+ ./setup-mpi
+
+ #setup prologue script
+ cp ./prologue.setup-mpi-master /var/spool/torque/mom_priv/prologue
+ cp ./epilogue.kill-mpi-ring /var/spool/torque/mom_priv/epilogue
+
+ for i in `cat $SLAVES_FILE`; do scp ./prologue.setup-mpi-master $i:/var/spool/torque/mom_priv/prologue; done
+ for i in `cat $SLAVES_FILE`; do scp ./epilogue.kill-mpi-ring $i:/var/spool/torque/mom_priv/epilogue; done
+}
+
+installtorque
+setuptorque
installslaves
+installmpi