From 11b30001d556a63dad479a2876d850b0c516a81f Mon Sep 17 00:00:00 2001 From: Brian Clements Date: Mon, 3 Mar 2014 12:59:28 -0600 Subject: [PATCH] Issue #2756 install script for collaboration http server added check for non-edex deployment in plugin-methods.xml added dataserver feature to use feature-based deployment scripts moved start/stop scripts to subdirectory reworked start script to work with external classpath jars Former-commit-id: 769ee18145461238e61e1ac87a84ab7e70d94dde [formerly a7384488250b9cc8b2d53231a61cd405a47e8350] [formerly 443f420c0e6fc38c2a3fdd4e4aa68d8a8fb91db6 [formerly 3b6121b9fadd19b844096a22331e9982995287d8]] [formerly 934ce73e4bf59f08a060e46eea2a02fe26a863e8 [formerly 3b6121b9fadd19b844096a22331e9982995287d8 [formerly 7d476e67ad00cc8e9c494ed04c7ce0ecc691059a]]] Former-commit-id: 934ce73e4bf59f08a060e46eea2a02fe26a863e8 Former-commit-id: 066c81f999fa0b82f0f2cf806a4411393bd5ac3c [formerly a44c5f8d48aad3f4df723f4375297b82ea925e77] Former-commit-id: 75c179b06f6f5444b77843e6b2edfc6d75e23801 --- .../deploy-common/plugin-methods.xml | 23 +++-- .../collaboration.dataserver.feature/.project | 17 ++++ .../build.properties | 1 + .../feature.xml | 71 +++++++++++++ .../dataserver-install.xml | 99 +++++++++++++++++++ .../scriptBin/start.sh | 61 ++++++++++++ .../scriptBin/stop.sh | 36 +++++++ .../collaboration.dataserver/start.sh | 12 --- .../collaboration.dataserver/stop.sh | 10 -- 9 files changed, 301 insertions(+), 29 deletions(-) create mode 100644 javaUtilities/collaboration.dataserver.feature/.project create mode 100644 javaUtilities/collaboration.dataserver.feature/build.properties create mode 100644 javaUtilities/collaboration.dataserver.feature/feature.xml create mode 100644 javaUtilities/collaboration.dataserver/dataserver-install.xml create mode 100755 javaUtilities/collaboration.dataserver/scriptBin/start.sh create mode 100755 javaUtilities/collaboration.dataserver/scriptBin/stop.sh delete mode 100755 javaUtilities/collaboration.dataserver/start.sh delete mode 100755 javaUtilities/collaboration.dataserver/stop.sh diff --git a/edexOsgi/build.edex/deploy-common/plugin-methods.xml b/edexOsgi/build.edex/deploy-common/plugin-methods.xml index 4c48c76a60..c6869644e2 100644 --- a/edexOsgi/build.edex/deploy-common/plugin-methods.xml +++ b/edexOsgi/build.edex/deploy-common/plugin-methods.xml @@ -116,13 +116,22 @@ - - - - + + + + + + + + + + + Missing property edex.root.directory, skipping external rules for deployment + + diff --git a/javaUtilities/collaboration.dataserver.feature/.project b/javaUtilities/collaboration.dataserver.feature/.project new file mode 100644 index 0000000000..20273b73c1 --- /dev/null +++ b/javaUtilities/collaboration.dataserver.feature/.project @@ -0,0 +1,17 @@ + + + collaboration.dataserver.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/javaUtilities/collaboration.dataserver.feature/build.properties b/javaUtilities/collaboration.dataserver.feature/build.properties new file mode 100644 index 0000000000..64f93a9f0b --- /dev/null +++ b/javaUtilities/collaboration.dataserver.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/javaUtilities/collaboration.dataserver.feature/feature.xml b/javaUtilities/collaboration.dataserver.feature/feature.xml new file mode 100644 index 0000000000..c27d3a1bb5 --- /dev/null +++ b/javaUtilities/collaboration.dataserver.feature/feature.xml @@ -0,0 +1,71 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + + + + + + + + + + + + + diff --git a/javaUtilities/collaboration.dataserver/dataserver-install.xml b/javaUtilities/collaboration.dataserver/dataserver-install.xml new file mode 100644 index 0000000000..6cc29f6441 --- /dev/null +++ b/javaUtilities/collaboration.dataserver/dataserver-install.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaUtilities/collaboration.dataserver/scriptBin/start.sh b/javaUtilities/collaboration.dataserver/scriptBin/start.sh new file mode 100755 index 0000000000..89dd3908c0 --- /dev/null +++ b/javaUtilities/collaboration.dataserver/scriptBin/start.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +# +# +# SOFTWARE HISTORY +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# Mar 03, 2014 2756 bclement initial creation +# +# + +function pathgen() +{ + echo -n 'lib/plugins/*' + for x in lib/dependencies/* + do + if [[ $x =~ ^.*\.jar$ ]] + then + echo -n ":$x" + elif [[ -d $x ]] + then + echo -n ":${x}/*" + fi + done +} + +if [[ $# > 0 && $1 == '-d' ]] +then + dbArg='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5118' +else + dbArg='' +fi + +(cd $(dirname "$0")/.. +PIDFILE=collabserver.pid +if [[ -e $PIDFILE ]] +then + echo "PID file already exists at $PIDFILE, exiting" + exit 1 +fi +nohup java $dbArg -server -cp $(pathgen) com.raytheon.collaboration.dataserver.DataserverMain & + +echo $! > $PIDFILE +) diff --git a/javaUtilities/collaboration.dataserver/scriptBin/stop.sh b/javaUtilities/collaboration.dataserver/scriptBin/stop.sh new file mode 100755 index 0000000000..ebdd3ac87b --- /dev/null +++ b/javaUtilities/collaboration.dataserver/scriptBin/stop.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +# +# +# SOFTWARE HISTORY +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# Mar 03, 2014 2756 bclement initial creation +# +# + +(cd $(dirname "$0")/.. +PIDFILE=collabserver.pid +if [[ -e $PIDFILE ]] +then + kill `cat $PIDFILE` + rm $PIDFILE +fi +) diff --git a/javaUtilities/collaboration.dataserver/start.sh b/javaUtilities/collaboration.dataserver/start.sh deleted file mode 100755 index 651690b6e1..0000000000 --- a/javaUtilities/collaboration.dataserver/start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -(cd $(dirname "$0") -PIDFILE=collabserver.pid -if [[ -e $PIDFILE ]] -then - echo "PID file already exists at $PIDFILE, exiting" - exit 1 -fi -nohup java -server -jar collabserver.jar & -echo $! > $PIDFILE -) diff --git a/javaUtilities/collaboration.dataserver/stop.sh b/javaUtilities/collaboration.dataserver/stop.sh deleted file mode 100755 index 2d6a071f8f..0000000000 --- a/javaUtilities/collaboration.dataserver/stop.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -(cd $(dirname "$0") -PIDFILE=collabserver.pid -if [[ -e $PIDFILE ]] -then - kill `cat $PIDFILE` - rm $PIDFILE -fi -)