Skip to content
Snippets Groups Projects
Commit 7e00caa8 authored by felmer's avatar felmer
Browse files

LMS-803 script for snapshot build added, sprint installation script adapted...

LMS-803 script for snapshot build added, sprint installation script adapted according to the requirements.

SVN: 10322
parent 33b84a7f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Builds snapshot distributions of the software components, uploads them to sprint server.
#
# This script assumes that you have a SSH access on 'sprint-openbis.ethz.ch'.
# This is typically configured in the SSH config file.
SPRINT_SERVER=sprint-openbis.ethz.ch
SPRINT_INSTALL_SCRIPT=sprint_install.sh
svn checkout http://source.systemsx.ch/repos/cisd/build_resources/trunk build_resources
cd build_resources
echo Building openBIS...
./build.sh openbis_all
echo Copying new openBIS components to \'$SPRINT_SERVER\'...
scp openBIS-server-*.zip $SPRINT_SERVER:.
scp datastore_server-*.zip $SPRINT_SERVER:.
# If sprint install script is present and executable, run it!
if [ -x $SPRINT_INSTALL_SCRIPT ]; then
echo Installing server remotely...
cat $SPRINT_INSTALL_SCRIPT | ssh -T $SPRINT_SERVER "cat > ~/$SPRINT_INSTALL_SCRIPT ; chmod 755 ~/$SPRINT_INSTALL_SCRIPT ; ~/$SPRINT_INSTALL_SCRIPT ; rm -f ~/$SPRINT_INSTALL_SCRIPT"
fi
echo Done!
\ No newline at end of file
...@@ -4,13 +4,20 @@ ...@@ -4,13 +4,20 @@
# in the home directory. # in the home directory.
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "Usage: $0 <sprint number>" echo "Usage: $0 [<sprint number>]"
exit 1 exit 1
fi fi
VER=$1 VER=SNAPSHOT
PREV_VER=$(( $VER - 1 )) if [ $1 ]; then
VER=$1
fi
cd sprint-*
PREV_VER=${PWD#*-}
cd -
DB_SNAPSHOT=db_snapshots/sprint$PREV_VER-lims_productive.sql DB_SNAPSHOT=db_snapshots/sprint$PREV_VER-lims_productive.sql
KEYSTORE=~/.keystore
# Unalias rm command # Unalias rm command
unalias rm unalias rm
...@@ -25,27 +32,33 @@ tar -cf - $DB_SNAPSHOT | bzip2 >db_snapshots/sprint$PREV_VER-lims_productive.tar ...@@ -25,27 +32,33 @@ tar -cf - $DB_SNAPSHOT | bzip2 >db_snapshots/sprint$PREV_VER-lims_productive.tar
rm -f $DB_SNAPSHOT rm -f $DB_SNAPSHOT
echo Installing openBIS server... echo Installing openBIS server...
rm -rf old/sprint-$PREV_VER
mv sprint-$PREV_VER old mv sprint-$PREV_VER old
rm -f sprint rm -f sprint
mkdir sprint-$VER mkdir sprint-$VER
ln -s sprint-$VER sprint ln -s sprint-$VER sprint
cd sprint cd sprint
unzip ../openBIS-server-S$VER* unzip ../openBIS-server*$VER*
cd openBIS-server cd openBIS-server
./install.sh $PWD ../../service.properties ./install.sh --nostartup $PWD ../../service.properties
cp -p $KEYSTORE apache-tomcat/openBIS.keystore
sed 's/-Djavax.net.ssl.trustStore=openBIS.keystore //g' apache-tomcat/bin/startup.sh > new-startup.sh
mv -f new-startup.sh apache-tomcat/bin/startup.sh
bin/startup.sh
echo Installing datastore server... echo Installing datastore server...
cd .. cd ..
unzip ../datastore_server-S$VER* unzip ../datastore_server*$VER*
cd datastore_server cd datastore_server
cp ~/datastore_server-service.properties etc/service.properties cp -p ~/datastore_server-service.properties etc/service.properties
cp -p $KEYSTORE etc/openBIS.keystore
chmod 700 datastore_server.sh chmod 700 datastore_server.sh
export JAVA_HOME=/usr export JAVA_HOME=/usr
./datastore_server.sh start ./datastore_server.sh start
echo Doing some cleaning... echo Doing some cleaning...
cd cd
mv *.zip tmp mv -f *.zip tmp
rm -rf openbis rm -rf openbis
# Reset the rm command alias # Reset the rm command alias
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment