# (1)Check you have LSF installer script package and LSF distribution packages. e.g. "lsf9.1.3_lsfinstall.tar.Z" and "lsf9.1.3_lnx26-lib23-ppc64le.tar.Z"
# (2)Get LSF entitlement file for the edition you are installing. e.g. "platform_lsf_std_entitlement.dat"
# (3)Prepare a install.config file, install.config should be in the same directory with install_lsf and lsf_startup scripts.
# The format of install.config file
# cat install.config
# LSF_TOP=""
# LSF_ADMINS=""
# LSF_CLUSTER_NAME=""
# LSF_MASTER_LIST=""
# LSF_ENTITLEMENT_FILE="NEED A FULL PATH OF THE FILE"
# LSF_TARDIR=""
# (4)Run this script on one compute node,you can also use "updatenode <nodename> -P install_lsf" to execute this script on one compute node
# (It's not necessary to run it on each compute node).
#
# NOTE for install.config:
# -----------------
# LSF_TOP="/usr/share/lsf"
# -----------------
# Full path to the top-level installation directory {REQUIRED}
#
# The path to LSF_TOP must be shared and accessible to all hosts
# in the cluster. It cannot be the root directory (/).
# The file system containing LSF_TOP must have enough disk space for
# all host types (approximately 300 MB per host type).
# -----------------
# LSF_ADMINS="lsfadmin user1 user2"
# -----------------
# List of LSF administrators {REQUIRED}
#
# The first user account name in the list is the primary LSF
# administrator. It cannot be the root user account.
# Typically, this account is named lsfadmin.
# It owns the LSF configuration files and log files for job events.
# It also has permission to reconfigure LSF and to control batch
# jobs submitted by other users. It typically does not have
# authority to start LSF daemons. Usually, only root has
# permission to start LSF daemons.
# All the LSF administrator accounts must exist on all hosts in the
# cluster before you install LSF.
# Secondary LSF administrators are optional.
#
# -----------------
# LSF_CLUSTER_NAME="cluster1"
# -----------------
# Name of the LSF cluster {REQUIRED}
#
# It must be 39 characters or less, and cannot contain any
# white spaces. Do not use the name of any host, user, or user group
# as the name of your cluster.
#
# -----------------
# LSF_MASTER_LIST="hostm hosta hostc"
# -----------------
# List of LSF server hosts to be master or master candidate in the
# cluster {REQUIRED when you install for the first time or during
# upgrade if the parameter does not already exist.}
#
# You must specify at least one valid server host to start the
# cluster. The first host listed is the LSF master host.
echo "ERROR: There are more than one lsfinstall tar file. You need to specify LSF_INSTALL_FILE_PATH in install.config or remove other useless lsfinstall TAR files in LSF_TARDIR $LSF_TARDIR."
exit 1
elif [[ $count -eq 1 ]]; then
:
else
echo "ERROR: lsfinstall TAR file not found in LSF_TARDIR $LSF_TARDIR."
exit 1
fi
fi
echo "INFO: We will untar the lsfinstall TAR file $LSF_INSTALL_FILE_PATH."
for SERVER_NODE in $LSF_ADD_SERVERS ; do
RTC=`ssh $SERVER_NODE uptime`
RTC=$?
if [[ $RTC -ne 0 ]] ; then
echo "ERROR: SERVER_NODE $SERVER_NODE is not reachable. Check LSF_ADD_SERVERS in install.config"
exit 1
fi
done
#Check if we set following parameters in install.config; if not, set them a recommended value.