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 06:57:22 UTC

svn commit: r1131684 - /incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque

Author: benh
Date: Sun Jun  5 04:57:22 2011
New Revision: 1131684

URL: http://svn.apache.org/viewvc?rev=1131684&view=rev
Log:
Adding setup-torque to new lucid ubuntu deploy package

Added:
    incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque   (with props)

Added: 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=1131684&view=auto
==============================================================================
--- incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque (added)
+++ incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque Sun Jun  5 04:57:22 2011
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+cd /root/nexus-ec2
+
+SLAVES_FILE="/root/nexus-ec2/slaves"
+MASTER="`cat master`"
+SLAVES="`cat $SLAVES_FILE`"
+
+#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 {
+	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
+	make -j8
+	make install
+	echo "running ldconfig on master"
+	ldconfig
+        ./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
+
+	touch ~/.rhosts
+	echo `hostname` |cat >> ~/.rhosts
+	echo `hostname -f` |cat >> ~/.rhosts
+	echo localhost |cat >> ~/.rhosts
+}
+
+function installslaves {
+	pushd ~/torque-2.4.7
+	echo "building packages for slave"
+	make packages
+	#install torque-mom on slave nodes
+	apt-get install -y dsh
+	
+        echo "copying slave install packages to nfs"
+	mkdir /nfs/torque
+	cp torque-package-mom-linux-x86_64.sh /nfs/torque/torque-package-mom-linux-x86_64.sh
+	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
+
+	echo "Running ldconfig on slaves"
+	dsh -f $SLAVES_FILE ldconfig
+	popd
+}
+
+installmaster
+installslaves

Propchange: incubator/mesos/trunk/src/ec2/deploy.lucid64/root/nexus-ec2/setup-torque
------------------------------------------------------------------------------
    svn:executable = *