You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by st...@apache.org on 2014/11/07 17:41:11 UTC
svn commit: r1637405 - in /oodt/trunk/cluster-tools: scripts/shutdown.sh
scripts/start-up.sh scripts/start-up/mesos-master.bash
scripts/start-up/mesos-slave.bash scripts/start-up/resource.bash
setup/deploy.sh setup/env-vars.sh.tmpl setup/install.sh
Author: starchmd
Date: Fri Nov 7 16:41:11 2014
New Revision: 1637405
URL: http://svn.apache.org/r1637405
Log:
OODT-699: Cleaning up cluster management scripts.
Added:
oodt/trunk/cluster-tools/setup/deploy.sh (with props)
Modified:
oodt/trunk/cluster-tools/scripts/shutdown.sh
oodt/trunk/cluster-tools/scripts/start-up.sh
oodt/trunk/cluster-tools/scripts/start-up/mesos-master.bash
oodt/trunk/cluster-tools/scripts/start-up/mesos-slave.bash
oodt/trunk/cluster-tools/scripts/start-up/resource.bash
oodt/trunk/cluster-tools/setup/env-vars.sh.tmpl
oodt/trunk/cluster-tools/setup/install.sh
Modified: oodt/trunk/cluster-tools/scripts/shutdown.sh
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/scripts/shutdown.sh?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/scripts/shutdown.sh (original)
+++ oodt/trunk/cluster-tools/scripts/shutdown.sh Fri Nov 7 16:41:11 2014
@@ -16,7 +16,7 @@
# limitations under the License.
#
#Source environment and utilites
-ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/env-vars.sh
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../setup/env-vars.sh
. ${ENVS}
if ! isScript
then
Modified: oodt/trunk/cluster-tools/scripts/start-up.sh
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/scripts/start-up.sh?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/scripts/start-up.sh (original)
+++ oodt/trunk/cluster-tools/scripts/start-up.sh Fri Nov 7 16:41:11 2014
@@ -16,7 +16,7 @@
# limitations under the License.
#
#Source environment and utilites
-ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/env-vars.sh
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../setup/env-vars.sh
. ${ENVS}
if ! isScript
then
Modified: oodt/trunk/cluster-tools/scripts/start-up/mesos-master.bash
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/scripts/start-up/mesos-master.bash?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/scripts/start-up/mesos-master.bash (original)
+++ oodt/trunk/cluster-tools/scripts/start-up/mesos-master.bash Fri Nov 7 16:41:11 2014
@@ -16,7 +16,7 @@
# limitations under the License.
#
#Wrapper to start-up mesos-master.
-ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../env-vars.sh
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../../setup/env-vars.sh
. ${ENVS}
#Don't source this
if ! isScript
Modified: oodt/trunk/cluster-tools/scripts/start-up/mesos-slave.bash
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/scripts/start-up/mesos-slave.bash?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/scripts/start-up/mesos-slave.bash (original)
+++ oodt/trunk/cluster-tools/scripts/start-up/mesos-slave.bash Fri Nov 7 16:41:11 2014
@@ -16,7 +16,7 @@
# limitations under the License.
#
#Wrapper to start-up mesos-slave.
-ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../env-vars.sh
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../../setup/env-vars.sh
. ${ENVS}
#Don't source this
if ! isScript
Modified: oodt/trunk/cluster-tools/scripts/start-up/resource.bash
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/scripts/start-up/resource.bash?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/scripts/start-up/resource.bash (original)
+++ oodt/trunk/cluster-tools/scripts/start-up/resource.bash Fri Nov 7 16:41:11 2014
@@ -16,7 +16,7 @@
# limitations under the License.
#
#Wrapper to start-up resource.
-ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../env-vars.sh
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../../setup/env-vars.sh
. ${ENVS}
#Start-up script
if ! isScript
Added: oodt/trunk/cluster-tools/setup/deploy.sh
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/setup/deploy.sh?rev=1637405&view=auto
==============================================================================
--- oodt/trunk/cluster-tools/setup/deploy.sh (added)
+++ oodt/trunk/cluster-tools/setup/deploy.sh Fri Nov 7 16:41:11 2014
@@ -0,0 +1,105 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#Variables are in the env_vars.sh file
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/env-vars.sh
+if [ ! -f ./env-vars.sh ]
+then
+ echo "${ENVS} not found. Please use ${ENVS}.tmpl as a template to create it."
+ exit 1
+fi
+. ${ENVS}
+
+#Tell us what ya going to do
+echo "Deploying the cluster components:"
+echo " Host file: ${HOSTS_FILE:-ERROR: Host file not set}"
+echo " Temporary directory: ${TMP_DIR:-ERROR: Temp dir not set}"
+echo " Install directory: ${INSTALL_DIR:-ERROR: Install dir not set}"
+
+#Checking versions
+if [ -z ${INSTALL_DIR} ] || [ -z ${TMP_DIR} ] || [ -z ${HOSTS_FILE} ]
+then
+ echo "ERROR: Needed variables not set. Did you set the environment files?"
+ exit 1
+fi
+#Check directories exit
+if [ ! -d ${INSTALL_DIR} ] || [ ! -d ${TMP_DIR} ] || [ ! -f ${HOSTS_FILE} ]
+then
+ echo "ERROR: Needed directories or files don't exist"
+ exit 1
+fi
+#Cannot find scripts
+if [ ! -d ../scripts ]
+then
+ echo "ERROR: Cannot find scripts directory: ../scripts"
+ exit 1
+fi
+#Check space
+if [ -e ${INSTALL_DIR} ] && (( $(df -k ${INSTALL_DIR} | awk 'NR==3 {print $3}') < 5000000 ))
+then
+ echo "ERROR: Not enough space (5GB) to install in: ${INSTALL_DIR}."
+ exit 1
+fi
+#Check space
+if (( $(df -k ${TMP_DIR} | awk 'NR==3 {print $3}') < 3000000 ))
+then
+ echo "ERROR: Not enough tmp space (3GB): ${TMP_DIR}."
+ exit 1
+fi
+
+while true; do
+ read -p "Continue installing(y/n)? " yn
+ case $yn in
+ [Yy]* ) break;;
+ [Nn]* ) exit;;
+ * ) echo "Please answer y or n.";;
+ esac
+done
+#TAR=${TMP_DIR}/deploy.tar.gz
+#if [ -e ${TAR} ]
+#then
+# echo "Tar exists, using it."
+#else
+# #Make tar
+# pushd ${INSTALL_DIR} || { \
+# echo "ERROR: Failed to pushd to ${INSTALL_DIR} Exiting for safety."; \
+# exit;
+# }
+# tar -czf ${TAR} *
+# popd
+#fi
+#Put on all hosts
+for host in $(cat ${HOSTS_FILE} | grep -v "^#" | tail -n +2 )
+do
+ echo "Deploying to: ${host}"
+ ssh ${host} "mkdir -p ${INSTALL_DIR};" \
+ ||{ \
+ echo "WARNING: Cannot create ${INSTALL_DIR} on ${host} Deploy manually."; \
+ continue;\
+ }
+ rsync -avz ${INSTALL_DIR}/* "${host}:${INSTALL_DIR}"
+# scp ${TAR} ${host}:${INSTALL_DIR} \
+# ||{ \
+# echo "WARNING: Failed to scp ${TAR} to ${host}:${INSTALL_DIR} Deploy manually."; \
+# continue;\
+# }
+# ssh ${host} "tar -xzf ${INSTALL_DIR}/$(basename ${TAR}) -C ${INSTALL_DIR}" \
+# ||{ \
+# echo "WARNING: Failed to untar $(basename ${TAR}) in ${host}:${INSTALL_DIR} Deploy manually."; \
+# continue;\
+# }
+done
Propchange: oodt/trunk/cluster-tools/setup/deploy.sh
------------------------------------------------------------------------------
svn:executable = *
Modified: oodt/trunk/cluster-tools/setup/env-vars.sh.tmpl
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/setup/env-vars.sh.tmpl?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/setup/env-vars.sh.tmpl (original)
+++ oodt/trunk/cluster-tools/setup/env-vars.sh.tmpl Fri Nov 7 16:41:11 2014
@@ -15,24 +15,76 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-#Use screen (set to screen name if you intend to use it)
-#export SCREEN="SOODTScreen"
+#****************************
+# Instructions:
+# 1. Copy this file to ./env-vars.sh
+# 2. Add execute permissions to ./env-vars.sh
+# 3. Change next three sections to configure installation
+#****************************
+#****************************
+# Set these directories:
+# INSTALL_DIR - Directory used to install and run software.
+# TMP_DIR - Temporary directory used as scratch space.
+# RUN_DIR - Directory that will hold run-time artifacts from software.
+#****************************
+export INSTALL_DIR=/your/install/dir/goes/here
+export TMP_DIR=/your/tmp/dir/goes/here
+export RUN_DIR=/your/runtime/dir/goes/here
+
+#****************************
+# Set these versions of software
+#****************************
+export MESOS_VERSION=0.19.0
+export SCALA_VERSION=2.10.4
+export KAFKA_VERSION=2.10-0.8.1.1
+export SPARK_VERSION=1.1.0
+export TACHYON_VERSION=0.5.0
+export HADOOP_VERSION=2.4.0
+export CLUSTER_TOOLS_VERSION=trunk
+
+#****************************
+# Set JAVA_HOME (will use from environment if set)
+#****************************
+export JAVA_HOME=${JAVA_HOME:-/usr/java/jdk1.7.0_45/}
+
+#****************************
+# Set SCREEN if use of GNU Screen is desired
+#****************************
+#export SCREEN="soodt-screen"
+
+###
+#Beyond This Line: Advanced Users Only
+#(Following lines should be setup properly)
+###
# Hosts file
-export HOSTS_FILE='@hosts_file@'
-export ENV_VARS="@install_dir@/scripts/env-vars.sh"
+export HOSTS_FILE="${INSTALL_DIR}/tools/setup/hosts"
+export ENV_VARS="${INSTALL_DIR}/tools/setup/env-vars.sh"
+# Hosts
+if [ -f ${HOSTS_FILE} ]
+then
+ export MESOS_HOST="$(cat ${HOSTS_FILE} | grep -v "^#" | head -1)"
+fi
+export RESOURCEMGR_HOST=${MESOS_HOST}
+# HADOOP envs
+export HADOOP_HOME="${INSTALL_DIR}/hadoop-${HADOOP_VERSION}"
+export HADOOP_OPTS="-XX:-PrintWarnings"
# Source utility function
-. $(dirname ${ENV_VARS})/utilites.sh
-
+if [ -f $(dirname ${ENV_VARS})/../scripts/utilites.sh ]
+then
+ . $(dirname ${ENV_VARS})/../scripts/utilites.sh
+fi
# Mesos variables
-export MESOS_VERSION=$(ls -d @install_dir@/mesos-* | sed -n 's/^.*mesos-\(.*\)$/\1/p')
-export MESOS_BUILD="@install_dir@/mesos-${MESOS_VERSION}/build/"
-export MESOS_LOG_DIR="@run_dir@/log/mesos/"
-export MESOS_WORK_DIR="@run_dir@/work/mesos/"
-export MESOS_MASTER_IP="@mesos_master_ip@"
-
+export MESOS_BUILD="${INSTALL_DIR}/mesos-${MESOS_VERSION}/build/"
+export MESOS_LOG_DIR="${RUN_DIR}/log/mesos/"
+export MESOS_WORK_DIR="${RUN_DIR}/work/mesos/"
+# Get mesos master ip
+if [ -n "${MESOS_HOST}" ]
+then
+ export MESOS_MASTER_IP="$(host ${MESOS_HOST} | awk '{print $NF}')"
+fi
# Resource manager
-export RESOURCE_HOST="@resource_manager@"
-export RESOURCE_HOME="@install_dir@/oodt/resource"
+export RESOURCE_HOST="${RESOURCEMGR_HOST}"
+export RESOURCE_HOME="${INSTALL_DIR}/oodt/resource"
Modified: oodt/trunk/cluster-tools/setup/install.sh
URL: http://svn.apache.org/viewvc/oodt/trunk/cluster-tools/setup/install.sh?rev=1637405&r1=1637404&r2=1637405&view=diff
==============================================================================
--- oodt/trunk/cluster-tools/setup/install.sh (original)
+++ oodt/trunk/cluster-tools/setup/install.sh Fri Nov 7 16:41:11 2014
@@ -1,4 +1,4 @@
-#
+#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
@@ -13,87 +13,153 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-#!/bin/bash
-# Usage statement.
-# Pass in the name of the script.
-function usage
-{
- echo -e "Usage:\n\t${1:-install.sh} <install-dir> <run-dir> <host-list>" 1>&2
- echo -e "\n install-dir:\n\tLocation to install all software." 1>&2
- echo -e "\n run-dir:\n\tLocation to create needed running, log and work directories." 1>&2
- echo -e "\n host-list:\n\tList of hosts used for this cluster." 1>&2
- echo 1>&2
- exit -1
-}
-
-#Create the envars file
-# $1 - run directory
-# $2 - install directory
-# $3 - hosts list
-function envars
-{
- RUN=${1}
- INSTALL=${2}
- HOSTS=${3}
- MESOS_MASTER=$(cat ${HOSTS} | grep -v "^#" | head -1 | xargs host | awk '{print $4}')
-
- TARGET=${INSTALL}/scripts/env-vars.sh
- cp env-vars.sh.tmpl ${TARGET} || return 6
- #Fill in @something@ templates
- sed -i 's#@run_dir@#'"${RUN}"'#g' ${TARGET} || return 6
- sed -i 's#@install_dir@#'"${INSTALL}"'#g' ${TARGET} || return 6
- sed -i 's#@mesos_master_ip@#'"${MESOS_MASTER}"'#g' ${TARGET} || return 6
- sed -i 's#@hosts_file@#'"${HOSTS}"'#g' ${TARGET} || return 6
-}
-
-#Creare the needed running directories.
-# $1 - Base running directory
-function makeRunningDirs
-{
- mkdir -p ${1} || return 5
- #Make directories
- for dir in "log/mesos" "log/resource" "run/mesos"
- do
- mkdir -p ${1}/${dir} || return 5
- chmod 774 ${1}/${dir} || return 5
- done
-}
-
-
-# ~~main~~ #
-#Break if it is being sourced (loading functions)
-if [[ "${BASH_SOURCE[0]}" != "${0}" ]]
-then
- return
-fi
-# Print usage if input vars are not available
-if (( $# != 3 ))
-then
- usage ${0}
-fi
-THIS="$(pwd)/${0}"
-#Setup variables
-INSTALL=${1}
-RUN=${2}
-#Copy host file to install
-HOSTS=${3:-./hosts}
-cp ${HOSTS} ${INSTALL}/scripts/
-HOSTS=${INSTALL}/scripts/$(basename ${HOSTS})
-
-#Make running directories
-###for host in $(cat ${HOSTS} | grep -v "^#")
-###do
-### ssh ${host} "/bin/bash -c '. ${THIS}; makeRunningDirs ${RUN} || exit $?'"
-### if (( $? != 0 ))
-### then
-### echo -e "ERROR:\n\tFailed to make run dir on ${host} at ${RUN}" 2>&1
-### exit 5
-### fi
-###done
-#Make env-vars.sh from template env-vars.sh.tmpl
+#Variables are in the env_vars.sh file
+ENVS=$(dirname $(readlink -f ${BASH_SOURCE[0]}))/env-vars.sh
+if [ ! -f ./env-vars.sh ]
+then
+ echo "${ENVS} not found. Please use ${ENVS}.tmpl as a template to create it."
+ exit 1
+fi
+. ${ENVS}
+#Tell us what ya going to do
+echo "Installing the BDAS components:"
+echo " Mesos version: ${MESOS_VERSION:-ERROR: Version not set}"
+echo " Scala version: ${SCALA_VERSION:-ERROR: Version not set}"
+echo " Kafka version: ${KAFKA_VERSION:-ERROR: Version not set}"
+echo " Spark version: ${SPARK_VERSION:-ERROR: Version not set}"
+echo " Tachyon version: ${TACHYON_VERSION:-ERROR: Version not set}"
+echo " Hadoop version: ${HADOOP_VERSION:-ERROR: Version not set}"
+echo " Cluster Tools version: ${CLUSTER_TOOLS_VERSION:-ERROR: Version not set}"
+echo " Temporary directory: ${TMP_DIR:-ERROR: Temp dir not set}"
+echo " Running Directory: ${RUN_DIR:-ERROR: Running dir not set}"
+echo " -----------------------------------------"
+echo " Install directory: ${INSTALL_DIR:-ERROR: Install dir not set}"
+
+#Checking versions
+if [ -z ${MESOS_VERSION} ] || [ -z ${SCALA_VERSION} ] || [ -z ${KAFKA_VERSION} ] || \
+ [ -z ${SPARK_VERSION} ] || [ -z ${TACHYON_VERSION} ] || [ -z ${HADOOP_VERSION} ] || \
+ [ -z ${CLUSTER_TOOLS_VERSION} ] || [ -z ${INSTALL_DIR} ] || [ -z ${TMP_DIR} ]
+then
+ echo "ERROR: Needed variables not set. Did you set the environment files?"
+ exit 1
+fi
+#Check directories exit
+if [ ! -d ${INSTALL_DIR} ] || [ ! -d ${RUN_DIR} ] || [ ! -d ${TMP_DIR} ]
+then
+ echo "ERROR: Needed directories don't exist"
+ exit 1
+fi
+#Cannot find scripts
+if [ ! -d ../scripts ]
+then
+ echo "ERROR: Cannot find scripts directory: ../scripts"
+ exit 1
+fi
+#Check space
+if [ -e ${INSTALL_DIR} ] && (( $(df -k ${INSTALL_DIR} | awk 'NR==3 {print $3}') < 5000000 ))
+then
+ echo "ERROR: Not enough space (5GB) to install in: ${INSTALL_DIR}."
+ exit 1
+fi
+#Check space
+if (( $(df -k ${TMP_DIR} | awk 'NR==3 {print $3}') < 3000000 ))
+then
+ echo "ERROR: Not enough tmp space (3GB): ${TMP_DIR}."
+ exit 1
+fi
+while true; do
+ read -p "Continue installing(y/n)? " yn
+ case $yn in
+ [Yy]* ) break;;
+ [Nn]* ) exit;;
+ * ) echo "Please answer y or n.";;
+ esac
+done
+
+#Start of installation
+INSTALL_LOG=dependancy-installation-$(date +"%Y-%m-%dT%H:%M:%S").log
+echo "Installing dependancies at $(date +"%Y-%m-%dT%H:%M:%S")" | tee ${INSTALL_LOG}
+
+#Downloads: wget and untar these
+APACHE_MIRROR=http://archive.apache.org/dist/
+_KAFKA_VR=$(echo ${KAFKA_VERSION} | sed 's/^[^-]*-//')
+DOWNLOADS[0]=http://www.scala-lang.org/files/archive/scala-${SCALA_VERSION}.tgz
+DOWNLOADS[1]=${APACHE_MIRROR}/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz
+DOWNLOADS[2]=${APACHE_MIRROR}/mesos/${MESOS_VERSION}/mesos-${MESOS_VERSION}.tar.gz
+DOWNLOADS[3]=${APACHE_MIRROR}/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop2.4.tgz
+DOWNLOADS[4]=${APACHE_MIRROR}/kafka/${_KAFKA_VR}/kafka_${KAFKA_VERSION}.tgz
+DOWNLOADS[5]=https://github.com/amplab/tachyon/releases/download/v${TACHYON_VERSION}/tachyon-${TACHYON_VERSION}-bin.tar.gz
+
+mkdir -p ${TMP_DIR}/download
+mkdir -p ${INSTALL_DIR}
+#Grab all the downloads
+for url in "${DOWNLOADS[@]}"
+do
+ tarball=$(basename ${url})
+ #Get directory name without .tar.gz and .tgz
+ dir=${tarball%%.tar.gz}
+ dir=${dir%%.tgz}
+ #Remove -bin for Tachyeon
+ dir=${dir%%-bin}
+ echo "Attempting to install: ${dir}" | tee -a ${INSTALL_LOG}
+ #If something
+ if [ -e ${INSTALL_DIR}/${dir} ]
+ then
+ echo "${dir} installation detected."
+ else
+ rm -f ${TMP_DIR}/download/${tarball}
+ #wget or fail and continue
+ wget -nc -P ${TMP_DIR}/download ${url} &>> ${INSTALL_LOG} \
+ ||{ \
+ echo "WARNING: Failed to wget: ${url} Install manually." | tee -a ${INSTALL_LOG};\
+ continue;\
+ }
+ #untar or fail and continue
+ tar -xzf ${TMP_DIR}/download/${tarball} -C ${TMP_DIR}/download \
+ ||{ \
+ echo "WARNING: Failed to untar: ${tarball} Install manually." | tee -a ${INSTALL_LOG};\
+ continue;\
+ }
+ #Move to installation directory or fail and continue
+ mv ${TMP_DIR}/download/${dir} ${INSTALL_DIR} \
+ ||{ \
+ echo "WARNING: Failed to move: ${dir} to ${INSTALL_DIR} Install manually." | tee -a ${INSTALL_LOG};\
+ continue;\
+ }
+ #Move to installation directory or fail and continue
+ mv ${TMP_DIR}/download/${tarball} ${INSTALL_DIR}/${dir} \
+ ||{ \
+ echo "WARNING: Failed to move: ${tarball} to ${INSTALL_DIR} Install manually." | tee -a ${INSTALL_LOG};\
+ continue;\
+ }
+ fi
+done
+if [ -e ${INSTALL_DIR}/tools/scripts ]
+then
+ echo "Cluster tools already installed"
+else
+ echo "Exporting OODT-cluster tools" | tee -a ${INSTALL_LOG}
+ svn export https://svn.apache.org/repos/asf/oodt/${CLUSTER_TOOLS_VERSION}/cluster-tools/ ${INSTALL_DIR}/tools \
+ ||{ \
+ echo "WARNING: Failed to export cluster-tools: ${CLUSTER_TOOLS_VERSION} Install manually." | tee -a ${INSTALL_LOG};\
+ continue;\
+ }
+ cp ./env-vars.sh ${INSTALL_DIR}/tools/setup
+fi
+echo "Building messos. This may take awhile" | tee -a ${INSTALL_LOG}
+#Mesos post processing
+if [ -e ${INSTALL_DIR}/mesos-${MESOS_VERSION}/build ]
+then
+ echo "Mesos already built at: ${INSTALL_DIR}/mesos-${MESOS_VERSION}/build"
+else
+ _MESOS_BUILD=${INSTALL_DIR}/mesos-${MESOS_VERSION}/build
+ mkdir ${_MESOS_BUILD}
+ cd ${_MESOS_BUILD}
+ ../configure &>> ${INSTALL_LOG}
+ make &>> ${INSTALL_LOG}
+fi
-envars ${RUN} ${INSTALL} ${HOSTS}
+echo "All done at $(date +"%Y-%m-%dT%H:%M:%S")" | tee -a ${INSTALL_LOG}