From 37c3f62b78421417019cb8f4050189896317dcae Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Thu, 24 Jun 2010 07:21:28 +0000 Subject: [PATCH] LMS-1552 change all scripts from tomcat -> jetty SVN: 16707 --- openbis_all/source/bash/bis-down.sh | 2 +- openbis_all/source/bash/bis-log.sh | 2 +- openbis_all/source/bash/bis-up.sh | 2 +- openbis_all/source/bash/bis-watch-log.sh | 2 +- .../bash/create_snapshot_openbis_repos.sh | 6 +++--- .../source/bash/delete_openbis_repos.sh | 6 +++--- openbis_all/source/bash/gather_stats.sh | 4 ++-- openbis_all/source/bash/has-config-changed.sh | 13 +++++++------ .../bash/restore_snapshot_openbis_repos.sh | 8 ++++---- openbis_all/source/bash/rsync_logs.sh | 6 +++--- openbis_all/source/bash/sprint_install.sh | 19 +++++++++---------- .../source/bash/sprint_post_install.sh | 16 ++++++++-------- .../bash/sprint_post_install_agronomics.sh | 2 +- openbis_all/source/bash/usage_stats.sh | 2 +- 14 files changed, 45 insertions(+), 45 deletions(-) diff --git a/openbis_all/source/bash/bis-down.sh b/openbis_all/source/bash/bis-down.sh index fd64d021051..077390461d3 100755 --- a/openbis_all/source/bash/bis-down.sh +++ b/openbis_all/source/bash/bis-down.sh @@ -1,4 +1,4 @@ #!/bin/bash # Shuts down openBIS server -~openbis/sprint/openBIS-server/apache-tomcat/bin/shutdown.sh +~openbis/sprint/openBIS-server/jetty/bin/shutdown.sh diff --git a/openbis_all/source/bash/bis-log.sh b/openbis_all/source/bash/bis-log.sh index 02f36490c50..40e78038e3e 100755 --- a/openbis_all/source/bash/bis-log.sh +++ b/openbis_all/source/bash/bis-log.sh @@ -1,4 +1,4 @@ #!/bin/bash # Shows openBIS server log -less ~openbis/sprint/openBIS-server/apache-tomcat/logs/openbis_log.txt +less ~openbis/sprint/openBIS-server/jetty/logs/openbis_log.txt diff --git a/openbis_all/source/bash/bis-up.sh b/openbis_all/source/bash/bis-up.sh index 36602c88e81..fd4c61b5dc8 100755 --- a/openbis_all/source/bash/bis-up.sh +++ b/openbis_all/source/bash/bis-up.sh @@ -1,4 +1,4 @@ #!/bin/bash # Starts up openBIS server -~openbis/sprint/openBIS-server/apache-tomcat/bin/startup.sh +~openbis/sprint/openBIS-server/jetty/bin/startup.sh diff --git a/openbis_all/source/bash/bis-watch-log.sh b/openbis_all/source/bash/bis-watch-log.sh index 4e5e104b195..53140c1ed97 100644 --- a/openbis_all/source/bash/bis-watch-log.sh +++ b/openbis_all/source/bash/bis-watch-log.sh @@ -1,4 +1,4 @@ #!/bin/bash # Shows openBIS server log with tail -f -tail -f ~openbis/sprint/openBIS-server/apache-tomcat/logs/openbis_log.txt +tail -f ~openbis/sprint/openBIS-server/jetty/logs/openbis_log.txt diff --git a/openbis_all/source/bash/create_snapshot_openbis_repos.sh b/openbis_all/source/bash/create_snapshot_openbis_repos.sh index 8ca4dac901c..a01fb2e5ece 100755 --- a/openbis_all/source/bash/create_snapshot_openbis_repos.sh +++ b/openbis_all/source/bash/create_snapshot_openbis_repos.sh @@ -36,7 +36,7 @@ TMPDIR="$TMPROOT/$NAME" mkdir "$TMPDIR" # Shutdown servers -$BASE_DIR/openBIS-server/apache-tomcat/bin/shutdown.sh +$BASE_DIR/openBIS-server/jetty/bin/shutdown.sh $BASE_DIR/datastore_server/datastore_server.sh stop # Prepare snaphot @@ -53,7 +53,7 @@ if [ $? -ne 0 ]; then rm -fR "$TMPROOT" exit 1 fi -gtar cf "$TMPDIR/lucene_indices.tar" -C $BASE_DIR/openBIS-server/apache-tomcat indices +gtar cf "$TMPDIR/lucene_indices.tar" -C $BASE_DIR/openBIS-server/jetty indices if [ $? -ne 0 ]; then echo "Error tarring lucene indices! (No snapshot created)" rm -fR "$TMPROOT" @@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then fi # Startup servers -$BASE_DIR/openBIS-server/apache-tomcat/bin/startup.sh +$BASE_DIR/openBIS-server/jetty/bin/startup.sh $BASE_DIR/datastore_server/datastore_server.sh start # Package snapshot diff --git a/openbis_all/source/bash/delete_openbis_repos.sh b/openbis_all/source/bash/delete_openbis_repos.sh index 1562ed79acf..46434b9ee63 100755 --- a/openbis_all/source/bash/delete_openbis_repos.sh +++ b/openbis_all/source/bash/delete_openbis_repos.sh @@ -32,16 +32,16 @@ echo "Creating SnapShot in /tmp with the TAG DELETED_OPENBIS" popd # Shutdown servers -~/sprint/openBIS-server/apache-tomcat/bin/shutdown.sh +~/sprint/openBIS-server/jetty/bin/shutdown.sh ~/sprint/datastore_server/datastore_server.sh stop # Remove the repos data rm -fR ~/sprint/datastore_server/data/store/* psql -U postgres -c "drop database openbis_productive" -rm -fR ~/sprint/openBIS-server/apache-tomcat/indices/* +rm -fR ~/sprint/openBIS-server/jetty/indices/* # Startup servers (will rebuild the database) -~/sprint/openBIS-server/apache-tomcat/bin/startup.sh +~/sprint/openBIS-server/jetty/bin/startup.sh echo "" echo "You need to login to openBIS now and to create the first user with system role" diff --git a/openbis_all/source/bash/gather_stats.sh b/openbis_all/source/bash/gather_stats.sh index e0a45bde15b..6be3b552d41 100644 --- a/openbis_all/source/bash/gather_stats.sh +++ b/openbis_all/source/bash/gather_stats.sh @@ -29,8 +29,8 @@ SQL="WITH RECURSIVE data_set_parents(id, parent_ids, cycle) AS ( SELECT count(*) AS cycles FROM data_set_parents WHERE cycle = true;" SQL_QUERY="psql -c \"$SQL\" openbis_productive" -JAVA_MAX_HEAP_SIZE="echo -n JAVA_MAX_HEAP_SIZE: ;cat ~openbis/sprint/openBIS-server/apache-tomcat/etc/openbis.conf | grep JAVA_MEM_OPTS | cut -d \- -f 2" -JAVA_INIT_HEAP_SIZE="echo -n JAVA_INIT_HEAP_SIZE: ;cat ~openbis/sprint/openBIS-server/apache-tomcat/etc/openbis.conf | grep JAVA_MEM_OPTS | cut -d \- -f 3" +JAVA_MAX_HEAP_SIZE="echo -n JAVA_MAX_HEAP_SIZE: ;cat ~openbis/sprint/openBIS-server/jetty/bin/openbis.conf | grep JAVA_MEM_OPTS | cut -d \- -f 2" +JAVA_INIT_HEAP_SIZE="echo -n JAVA_INIT_HEAP_SIZE: ;cat ~openbis/sprint/openBIS-server/jetty/bin/openbis.conf | grep JAVA_MEM_OPTS | cut -d \- -f 3" JAVA_VERSION="java -version" PSQL_VERSION="psql --version | grep PostgreSQL" OPENBIS_VERSION="ls -1d ~openbis/sprint-* | cut -d - -f2" diff --git a/openbis_all/source/bash/has-config-changed.sh b/openbis_all/source/bash/has-config-changed.sh index 044483f498e..4b4b6dd16d4 100755 --- a/openbis_all/source/bash/has-config-changed.sh +++ b/openbis_all/source/bash/has-config-changed.sh @@ -26,12 +26,13 @@ function compare_configs { } compare_configs $CONFIG_DIR/datastore_server-service.properties ~/sprint/datastore_server/etc/service.properties -TOMCAT_DIR=~/sprint/openBIS-server/apache-tomcat -compare_configs $CONFIG_DIR/service.properties $TOMCAT_DIR/webapps/openbis/WEB-INF/classes/service.properties -compare_configs $CONFIG_DIR/openbis.conf $TOMCAT_DIR/etc/openbis.conf -compare_configs $CONFIG_DIR/images/ $TOMCAT_DIR/webapps/openbis/images/ -compare_configs $CONFIG_DIR/loginHeader.html $TOMCAT_DIR/webapps/openbis/loginHeader.html -compare_configs $CONFIG_DIR/help.html $TOMCAT_DIR/webapps/openbis/help.html +SERVER_DIR=~/sprint/openBIS-server/jetty +WEBAPP_DIR=$SERVER_DIR/work/openbis/webapp +compare_configs $CONFIG_DIR/service.properties $WEBAPP_DIR/WEB-INF/classes/service.properties +compare_configs $CONFIG_DIR/openbis.conf $SERVER_DIR/bin/openbis.conf +compare_configs $CONFIG_DIR/images/ $WEBAPP_DIR/images/ +compare_configs $CONFIG_DIR/loginHeader.html $WEBAPP_DIR/loginHeader.html +compare_configs $CONFIG_DIR/help.html $WEBAPP_DIR/help.html rm .dss_changed diff --git a/openbis_all/source/bash/restore_snapshot_openbis_repos.sh b/openbis_all/source/bash/restore_snapshot_openbis_repos.sh index 9964d1f4707..ff0a68956d8 100755 --- a/openbis_all/source/bash/restore_snapshot_openbis_repos.sh +++ b/openbis_all/source/bash/restore_snapshot_openbis_repos.sh @@ -80,11 +80,11 @@ if [ $? -ne 0 ]; then fi # Shutdown servers -$BASE_DIR/openBIS-server/apache-tomcat/bin/shutdown.sh +$BASE_DIR/openBIS-server/jetty/bin/shutdown.sh $BASE_DIR/datastore_server/datastore_server.sh stop # Remove the repos data -rm -fR $BASE_DIR/openBIS-server/apache-tomcat/indices/* +rm -fR $BASE_DIR/openBIS-server/jetty/indices/* if [ $? -ne 0 ]; then echo "Error deleting lucene indices (inconsistent state)" rm -fR "$TMPROOT" @@ -120,7 +120,7 @@ if [ $? -ne 0 ]; then rm -fR "$TMPROOT" exit 1 fi -gtar xf "$TMPDIR/lucene_indices.tar" -C $BASE_DIR/openBIS-server/apache-tomcat +gtar xf "$TMPDIR/lucene_indices.tar" -C $BASE_DIR/openBIS-server/jetty if [ $? -ne 0 ]; then echo "Error restoring lucene indices (inconsistent state)" rm -fR "$TMPROOT" @@ -128,7 +128,7 @@ if [ $? -ne 0 ]; then fi # Startup servers -$BASE_DIR/openBIS-server/apache-tomcat/bin/startup.sh +$BASE_DIR/openBIS-server/jetty/bin/startup.sh $BASE_DIR/datastore_server/datastore_server.sh start # Clean up diff --git a/openbis_all/source/bash/rsync_logs.sh b/openbis_all/source/bash/rsync_logs.sh index b9a501b40a0..f75a0275387 100644 --- a/openbis_all/source/bash/rsync_logs.sh +++ b/openbis_all/source/bash/rsync_logs.sh @@ -1,15 +1,15 @@ #!/bin/bash # saves the auth and usage logs of openBIS and DSS logs -export TOMCAT_LOGS=~openbis/sprint/openBIS-server/apache-tomcat/logs +export AS_LOGS=~openbis/sprint/openBIS-server/jetty/logs export DSS_LOGS=~openbis/sprint/datastore_server/log export RSYNC=/usr/bin/rsync export DESTINATION=~openbis/logs [ -d $DESTINATION ] || mkdir -p $DESTINATION -$RSYNC -av $TOMCAT_LOGS/*auth* $DESTINATION -$RSYNC -av $TOMCAT_LOGS/*usage* $DESTINATION +$RSYNC -av $AS_LOGS/*auth* $DESTINATION +$RSYNC -av $AS_LOGS/*usage* $DESTINATION $RSYNC -av $DSS_LOGS/* $DESTINATION if [ -f $DESTINATION/check_logins.sh ]; then diff --git a/openbis_all/source/bash/sprint_install.sh b/openbis_all/source/bash/sprint_install.sh index 89bcb29bb5c..c5056f461ef 100755 --- a/openbis_all/source/bash/sprint_install.sh +++ b/openbis_all/source/bash/sprint_install.sh @@ -14,7 +14,7 @@ VER=SNAPSHOT DATE=`/bin/date +%Y-%m-%d_%H%M` DB_NAME=openbis_productive DB_SNAPSHOT=~openbis/db_backups -TOMCAT_DIR=~openbis/sprint/openBIS-server/apache-tomcat +SERVER_DIR=~openbis/sprint/openBIS-server/jetty DAYS_TO_RETAIN=35 if [ $1 ]; then @@ -38,7 +38,7 @@ alias rm='rm' if [ -e $SERVERS_PREV_VER ]; then echo Stopping the components... - ./$SERVERS_PREV_VER/openBIS-server/apache-tomcat/bin/shutdown.sh + ./$SERVERS_PREV_VER/openBIS-server/jetty/bin/shutdown.sh ./$SERVERS_PREV_VER/datastore_server/datastore_server.sh stop fi @@ -59,15 +59,14 @@ ln -s $SERVERS_VER $SERVERS_DIR_ALIAS cd $SERVERS_DIR_ALIAS unzip -q ../openBIS-server*$VER* cd openBIS-server -./install.sh --nostartup $PWD $CONFIG_DIR/service.properties $CONFIG_DIR/openbis.conf +./install.sh $PWD $CONFIG_DIR/service.properties $CONFIG_DIR/openbis.conf if [ -f $KEYSTORE ]; then - 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 - chmod 744 apache-tomcat/bin/startup.sh + cp -p $KEYSTORE jetty/etc/openBIS.keystore + sed 's/-Djavax.net.ssl.trustStore=openBIS.keystore //g' jetty/bin/openbis.config > new-openbis.config + mv -f new-openbis.config jetty/bin/openbis.config fi -cp ~openbis/old/$SERVERS_PREV_VER/openBIS-server/apache-tomcat/conf/server.xml ~openbis/$SERVERS_VER/openBIS-server/apache-tomcat/conf/server.xml -#apache-tomcat/bin/startup.sh +cp ~openbis/old/$SERVERS_PREV_VER/openBIS-server/jetty/etc/jetty.xml ~openbis/$SERVERS_VER/openBIS-server/jetty/etc/jetty.xml +#jetty/bin/startup.sh echo Installing datastore server... cd .. @@ -89,7 +88,7 @@ cd ~openbis mv -f *.zip old/ rm -rf openbis cd ~openbis/sprint/openBIS-server -rm apache-tomcat.zip install.sh openbis.conf openBIS.keystore openBIS.war passwd.sh server.xml service.properties tomcat-version.txt +rm jetty.zip install.sh openbis.conf openBIS.keystore openBIS.war passwd.sh jetty.xml service.properties jetty-version.txt # Reset the rm command alias alias 'rm=rm -i' diff --git a/openbis_all/source/bash/sprint_post_install.sh b/openbis_all/source/bash/sprint_post_install.sh index ad18644db20..58b93a4fe8a 100755 --- a/openbis_all/source/bash/sprint_post_install.sh +++ b/openbis_all/source/bash/sprint_post_install.sh @@ -20,7 +20,7 @@ export PLASMIDS=bs-openbis02.ethz.ch function create_individual_greeting_message { # Creates an individual greeting message if [ -f ~openbis/config/openbis_instance.txt ]; then - export OPENBIS_DICT=~openbis/sprint/openBIS-server/apache-tomcat/webapps/openbis/common-dictionary.js + export OPENBIS_DICT=~openbis/sprint/openBIS-server/jetty/work/openbis/webapp/common-dictionary.js export SERVER_INSTANCE_NAME=`cat ~openbis/config/openbis_instance.txt` perl -pe 's/openbis_instance: "",/openbis_instance: "$ENV{SERVER_INSTANCE_NAME}",/' -i $OPENBIS_DICT fi @@ -29,15 +29,15 @@ function create_individual_greeting_message { function restore_common { if [ -f ~openbis/config/loginHeader.html ]; then echo restoring loginHeader.html... - cp -r ~openbis/config/images ~openbis/sprint/openBIS-server/apache-tomcat/webapps/openbis/ - cp ~openbis/config/loginHeader.html ~openbis/sprint/openBIS-server/apache-tomcat/webapps/openbis/ - cp ~openbis/config/help.html ~openbis/sprint/openBIS-server/apache-tomcat/webapps/openbis/ + cp -r ~openbis/config/images ~openbis/sprint/openBIS-server/jetty/work/openbis/webapp/ + cp ~openbis/config/loginHeader.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ + cp ~openbis/config/help.html ~openbis/sprint/openBIS-server/jetty/work/openbis/webapp/ fi if [ -f ~openbis/config/index.html ]; then - cp ~openbis/config/index.html ~openbis/sprint/openBIS-server/apache-tomcat/webapps/openbis/ + cp ~openbis/config/index.html ~openbis/sprint/openBIS-server/jetty/work/openbis/webapp/ fi - if [ -f ~openbis/config/server.xml ]; then - cp ~openbis/config/server.xml ~openbis/sprint/openBIS-server/apache-tomcat/conf/ + if [ -f ~openbis/config/jetty.xml ]; then + cp ~openbis/config/jetty.xml ~openbis/sprint/openBIS-server/jetty/etc/ fi if [ -f ~openbis/config/datastore_log.xml ]; then cp ~openbis/config/datastore_log.xml ~openbis/sprint/datastore_server/etc/log.xml @@ -95,7 +95,7 @@ case "$SERVER" in echo DSU:$DSU; restore_common create_individual_greeting_message - DSU_SERVER_HOME=~openbis/sprint/openBIS-server/apache-tomcat-5.5.26/webapps/openbis + DSU_SERVER_HOME=~openbis/sprint/openBIS-server/jetty/webapps/openbis cp ~openbis/config/openBIS_for_DSU.pdf $DSU_SERVER_HOME ;; $SCU) diff --git a/openbis_all/source/bash/sprint_post_install_agronomics.sh b/openbis_all/source/bash/sprint_post_install_agronomics.sh index c51e5175414..3e6a44a8d6b 100644 --- a/openbis_all/source/bash/sprint_post_install_agronomics.sh +++ b/openbis_all/source/bash/sprint_post_install_agronomics.sh @@ -5,5 +5,5 @@ MPAF_DIR=/local0/data/dss_incoming/transcriptomics/mpaf [ -d $MPAF_DIR ] || mkdir -p $MPAF_DIR -OPENBIS_SERVER_HOME=/localhome/openbis/sprint/openBIS-server/apache-tomcat-5.5.26/webapps/openbis +OPENBIS_SERVER_HOME=/localhome/openbis/sprint/openBIS-server/jetty/work/openbis/webapp cp ~/config/Guide_to_Using_Agron-omics_openBIS.pdf $OPENBIS_SERVER_HOME \ No newline at end of file diff --git a/openbis_all/source/bash/usage_stats.sh b/openbis_all/source/bash/usage_stats.sh index aa9a4c54d0c..ca0239d1693 100644 --- a/openbis_all/source/bash/usage_stats.sh +++ b/openbis_all/source/bash/usage_stats.sh @@ -1,4 +1,4 @@ #!/bin/bash # Shows openBIS server usage statistics done by users outside CISD -cat ~openbis/sprint/openBIS-server/apache-tomcat/logs/*usage_log.txt* | egrep -v "tpylak|brinn|etlserver|kohleman|izabelaa|buczekp|felmer|hclaus|cramakri|baucha|ryanj" | cut -d" " -f1,8,12 | sort | uniq -c \ No newline at end of file +cat ~openbis/sprint/openBIS-server/jetty/logs/*usage_log.txt* | egrep -v "tpylak|brinn|etlserver|kohleman|izabelaa|buczekp|felmer|hclaus|cramakri|baucha|ryanj" | cut -d" " -f1,8,12 | sort | uniq -c \ No newline at end of file -- GitLab