mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1131936 - in /incubator/mesos/trunk/bin: mesos-daemon mesos_env.sh start-master start-mesos start-slaves
Date Sun, 05 Jun 2011 06:38:32 GMT
Author: benh
Date: Sun Jun  5 06:38:32 2011
New Revision: 1131936

URL: http://svn.apache.org/viewvc?rev=1131936&view=rev
Log:
Resimplifying the deploy scripts to work with conf file more intuitively (i.e. not assigning
yet another set of defaults or defining conf vars is shell script that can be defined in conf
file).

Also breaking making start-mesos be heirarchical so that you can also just call start-master
or start-slaves.

Added:
    incubator/mesos/trunk/bin/start-master   (with props)
    incubator/mesos/trunk/bin/start-slaves   (with props)
Modified:
    incubator/mesos/trunk/bin/mesos-daemon
    incubator/mesos/trunk/bin/mesos_env.sh
    incubator/mesos/trunk/bin/start-mesos

Modified: incubator/mesos/trunk/bin/mesos-daemon
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/bin/mesos-daemon?rev=1131936&r1=1131935&r2=1131936&view=diff
==============================================================================
--- incubator/mesos/trunk/bin/mesos-daemon (original)
+++ incubator/mesos/trunk/bin/mesos-daemon Sun Jun  5 06:38:32 2011
@@ -15,8 +15,9 @@ shift
 EXTRA_OPTS=""
 if [ "$PROGRAM" == "mesos-slave" ]; then
   # Compute CPU and memory resources on this machine (TODO: Solaris-specific)
-  CPUS=`grep processor /proc/cpuinfo | wc -l`
-  MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
+  #CPUS=`grep processor /proc/cpuinfo | wc -l`
+  CPUS=5
+  MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2/2}'`
   MEM=$[(MEM_KB - 1024 * 1024) * 1024]
   EXTRA_OPTS="--cpus=$CPUS --mem=$MEM"
 fi
@@ -26,7 +27,6 @@ if [ ! -d $MESOS_LOGS ]; then
   mkdir -p $MESOS_LOGS
 fi
 
-
 cd $MESOS_HOME
 echo "now in dir `pwd`"
 echo "LIBPROCESS_IP=`$LIBPROCESS_IP_GETTER` nohup ./$PROGRAM $EXTRA_OPTS $@ </dev/null
>$MESOS_LOGS/$PROGRAM.out 2>&1"

Modified: incubator/mesos/trunk/bin/mesos_env.sh
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/bin/mesos_env.sh?rev=1131936&r1=1131935&r2=1131936&view=diff
==============================================================================
--- incubator/mesos/trunk/bin/mesos_env.sh (original)
+++ incubator/mesos/trunk/bin/mesos_env.sh Sun Jun  5 06:38:32 2011
@@ -4,24 +4,20 @@ bin=`cd "$bin"; pwd`
 echo bin is $bin
 
 # Set PATH to include Scala
-export PATH=$PATH:/root/scala-2.7.7.final/bin
+#export PATH=$PATH:/root/scala-2.7.7.final/bin
 
 #files that list master(s) and slaves
 MASTER=`cat $bin/master`
 SLAVES=`cat $bin/slaves`
 
-MASTER_PORT=9999
-MASTER_WEBUI_PORT=9090
-SLAVE_WEBUI_PORT=9091
-
 #The dir where Mesos deployment scripts live
 MESOS_ROOT=`cd $bin/..;pwd`
 echo "MESOS_ROOT is $MESOS_ROOT"
 
 MESOS_HOME=`cd $bin/../src;pwd`
 
-export GOOGLE_LOG_DIR=$MESOS_HOME/logs
-export MESOS_LOGS=$MESOS_HOME/logs
+export GOOGLE_LOG_DIR=/tmp/mesos-logs
+export MESOS_LOGS=/tmp/mesos-output
 
 #the dir where Hadoop is installed
 HADOOP_HOME=/root/hadoop-0.20.2
@@ -31,12 +27,8 @@ JAVA_HOME=/usr/lib/jvm/java-6-sun
 
 #options for ssh'ing
 SSH_OPTS="-o stricthostkeychecking=no -o connecttimeout=2"
+SSH_OPTS+=" -i /fs-2/e/pzsavola/mesos/mesoskey"
 
-#LIBPROCESS_IP_GETTER
-
-#LIBPROCESS_IP_GETTER="echo $MASTER"
-
-#LIBPROCESS_IP_GETTER="hostname -i" #works on older versions of hostname, not on osx
-
-#FULL_IP="hostname --all-ip-addresses" # newer versions of hostname only
-#LIBPROCESS_IP_GETTER=`echo $FULL_IP|sed 's/\([^ ]*\) .*/\1/'`
+#LIBPROCESS_IP="hostname -i" #works on older versions of hostname, not on osx
+FULL_IP="hostname --all-ip-addresses" # newer versions of hostname only
+export LIBPROCESS_IP=`echo $FULL_IP|sed 's/\([^ ]*\) .*/\1/'`

Added: incubator/mesos/trunk/bin/start-master
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/bin/start-master?rev=1131936&view=auto
==============================================================================
--- incubator/mesos/trunk/bin/start-master (added)
+++ incubator/mesos/trunk/bin/start-master Sun Jun  5 06:38:32 2011
@@ -0,0 +1,12 @@
+#!/bin/bash
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+. $bin/mesos_env.sh
+
+cd $bin
+
+#Launch master
+echo "Starting master on $MASTER"
+echo ssh $SSH_OPTS $MASTER "$bin/mesos-daemon mesos-master </dev/null >/dev/null"
+ssh $SSH_OPTS $MASTER "$bin/mesos-daemon mesos-master </dev/null >/dev/null"

Propchange: incubator/mesos/trunk/bin/start-master
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/mesos/trunk/bin/start-mesos
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/bin/start-mesos?rev=1131936&r1=1131935&r2=1131936&view=diff
==============================================================================
--- incubator/mesos/trunk/bin/start-mesos (original)
+++ incubator/mesos/trunk/bin/start-mesos Sun Jun  5 06:38:32 2011
@@ -4,46 +4,9 @@ bin=`cd "$bin"; pwd`
 
 . $bin/mesos_env.sh
 
-cd $bin
+$bin/start-master
 
-DEFAULT_MASTER_WEBUI_PORT=5555  #Globals
-DEFAULT_SLAVE_WEBUI_PORT=5051
-
-if [ ! $MASTER_PORT ]; then
-  MASTER_PORT=$DEFAULT_MASTER_PORT
-fi
-
-###########################
-#Launch master
-
-if [ ! $MASTER_WEBUI_PORT ]; then
-  MASTER_WEBUI_PORT=$DEFAULT_MASTER_WEBUI_PORT
-fi
-
-MASTER_FLAGS=" -p $MASTER_PORT"
-MASTER_FLAGS+=" -w $MASTER_WEBUI_PORT"
-
-echo "Starting master on $MASTER"
-echo ssh $SSH_OPTS $MASTER "$bin/mesos-daemon mesos-master $MASTER_FLAGS </dev/null >/dev/null"
-ssh $SSH_OPTS $MASTER "$bin/mesos-daemon mesos-master $MASTER_FLAGS </dev/null >/dev/null"
-
-###########################
-#Launch slaves
-
-SLAVE_FLAGS="-u 1@$MASTER:$MASTER_PORT"
-if [ $SLAVE_WEBUI_PORT ]; then
-  SLAVE_FLAGS+=" -w $SLAVE_WEBUI_PORT"
-else
-  SLAVE_FLAGS+=" -w $DEFAULT_SLAVE_WEBUI_PORT"
-fi
-
-for slave in $SLAVES; do
-  echo "Starting slave on $slave"
-  echo ssh $SSH_OPTS $slave "$bin/mesos-daemon mesos-slave $SLAVE_FLAGS </dev/null >/dev/null"
&
-  ssh $SSH_OPTS $slave "$bin/mesos-daemon mesos-slave $SLAVE_FLAGS </dev/null >/dev/null"
&
-  sleep 0.1
-done
-wait
+$bin/start-slaves
 
 echo "Everything's started! You can view the master Web UI at"
 

Added: incubator/mesos/trunk/bin/start-slaves
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/bin/start-slaves?rev=1131936&view=auto
==============================================================================
--- incubator/mesos/trunk/bin/start-slaves (added)
+++ incubator/mesos/trunk/bin/start-slaves Sun Jun  5 06:38:32 2011
@@ -0,0 +1,16 @@
+#!/bin/bash
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+. $bin/mesos_env.sh
+
+cd $bin
+
+#PORT=`../src/get_conf port $@`;
+#Launch slaves
+for slave in $SLAVES; do
+  echo "Starting slave on $slave"
+  echo ssh $SSH_OPTS $slave "$bin/mesos-daemon mesos-slave -u 1@$MASTER:5050 </dev/null
>/dev/null" 
+  ssh $SSH_OPTS $slave "$bin/mesos-daemon mesos-slave -u 1@$MASTER:5050 </dev/null >/dev/null"
&
+  sleep 0.1
+done
+wait

Propchange: incubator/mesos/trunk/bin/start-slaves
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message