middleware:JavaGAT/20
From Dgiref
Contents |
JavaGAT v.2.0
Prepare
- Java >= 1.6 (with Java 1.5 not all sensors are working)
- ant = 1.7
| JAVA_HOME environment variable should point into the current Java 1.6 instance. |
administrator's script: prepare.sh
#!/bin/sh# prepare for JavaGATyum -y install java
#------------------------------------------------------ install SUN javawget -O ${path_workdir}/jdk-6u16-linux-x64.bin ${BASE_URL}/misc/jdk-6u16-linux-x64.bin
chmod +x ${path_workdir}/jdk-6u16-linux-x64.bin
cd ${path_workdir}
./jdk-6u16-linux-x64.binrm ${path_workdir}/jdk-6u16-linux-x64.bin
# link to the /opt/javarm /usr/java/latest
ln -s ${path_java} /usr/java/latest
rm -f /etc/alternatives/java
ln -s ${path_java}/bin/java /etc/alternatives/java
ln -s ${path_java}/ /etc/alternatives/jdk
# test after restart bash sessionjava -version#------------------------------------------------------ install antwget -O ${path_workdir}/apache-ant-1.7.1-bin.tar.gz ${BASE_URL}/globus/2009.2/apache-ant-1.7.1-bin.tar.gz
tar -C ${path_workdir} -xvzf ${path_workdir}/apache-ant-1.7.1-bin.tar.gz
# Symlinks for the ant executableln -s ${path_ant}/bin/ant /etc/alternatives/ant
ln -s ${path_ant}/ /etc/alternatives/anthome
ln -s /etc/alternatives/ant /usr/bin/ant
# test after restart bash sessionant -version#------------------------------------------------------ install ant
Install
- Download the source package
- Unzip into the /opt directory
- Setup GAT_LOCATION environment variable
| To install only the GAT engine or the adaptors, build them separately.
|
administrator's script: install.sh
#!/bin/sh# install JavaGAT# Set BASE_URL linkBASE_URL="http://mirror.scc.kit.edu/downloads/src/gat/2010.1"
PACKAGE_VERSION="gat-astro"
PACKAGE_NAME=${PACKAGE_VERSION}".tgz"
DIR_WORK="/opt/gat"
DIR_TMP="/tmp"
GAT_ENV="/usr/local/bin/gat-env-setup.sh"
# Download packages:wget -O ${DIR_TMP}/${PACKAGE_NAME} ${BASE_URL}/${PACKAGE_NAME}
# Installmkdir ${DIR_WORK}
tar -zxvf ${DIR_TMP}/${PACKAGE_NAME} -C ${DIR_WORK}
rm -rf ${DIR_TMP}/${PACKAGE_NAME}
cd ${DIR_WORK}
# Setup GAT_LOCATIONif [ ! -f ${GAT_ENV} ];
thenecho "export GAT_LOCATION=${DIR_WORK}" > ${GAT_ENV}
fi# The file should be marked as executable:chmod +x ${GAT_ENV}
#In order to execute this script for every user automatically, link in the directory /etc/profile.d as follows:ln -s ${GAT_ENV} /etc/profile.d
Configure
- Run
antcommand into the $GAT_LOCATION directory - to build the Command Line Interfaces (CLI)
GATJobRunandGATFileOps, additional steps are required:- download the GATJobRun and GATFileOps packages
- run
ant -f build-standalone.xmlinto the appropriate directory
administrator's script: configure.sh
#!/bin/sh# configure JavaGATexport GAT_LOCATION=$DIR_WORK
cd $DIR_WORK
# call antant
# configure GATJobRuncd $DIR_WORK/astrogrid-packages/GATJobRun/
ant -f build-2.0.xml
# configure GATFileOpscd $DIR_WORK/astrogrid-packages/GATFileOps/
ant -f build-standalone.xml
Proceed
- the entry point to GATJobRun is the script
gat-job-runwhich is located in the directory$GAT_LOCATION/astrogrid-packages/GATJobRun/scripts. - the entry point to GATFileOps is the script
gat-file-operationwhich is located in the directory$GAT_LOCATION/astrogrid-packages/GATFileOps/scripts.
| It is recommended to add this directory to the PATH environment variable, to enable an easy usage from everywhere directory in your system. |
administrator's script: proceed.sh
#!/bin/sh# operating with GATJobRun and GATFileOps# add GATJobRun/scripts GATFileOps/scripts into the PATH environment variablePATH=$PATH:$GAT_LOCATION/astrogrid-packages/GATJobRun/scripts
# run gat-job-rungat-job-run
PATH=$PATH:$GAT_LOCATION/astrogrid-packages/GATFileOps/scripts
# run gat-file-operationgat-file-operation