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: 7d476e67ad00cc8e9c494ed04c7ce0ecc691059a
This commit is contained in:
parent
869909cc66
commit
934ce73e4b
9 changed files with 301 additions and 29 deletions
|
@ -116,13 +116,22 @@
|
|||
</then>
|
||||
</if>
|
||||
|
||||
<ant antfile="${basedir}/deploy-common/external-rules.xml"
|
||||
inheritAll="false">
|
||||
<property name="plugin._directory"
|
||||
value="${plugin.base}" />
|
||||
<property name="deployment._root"
|
||||
value="${edex.root.directory}" />
|
||||
</ant>
|
||||
<if>
|
||||
<!-- skip external rules if we are not deploying to edex -->
|
||||
<isset property="edex.root.directory" />
|
||||
<then>
|
||||
<ant antfile="${basedir}/deploy-common/external-rules.xml"
|
||||
inheritAll="false">
|
||||
<property name="plugin._directory"
|
||||
value="${plugin.base}" />
|
||||
<property name="deployment._root"
|
||||
value="${edex.root.directory}" />
|
||||
</ant>
|
||||
</then>
|
||||
<else>
|
||||
<echo>Missing property edex.root.directory, skipping external rules for deployment</echo>
|
||||
</else>
|
||||
</if>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
|
|
17
javaUtilities/collaboration.dataserver.feature/.project
Normal file
17
javaUtilities/collaboration.dataserver.feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>collaboration.dataserver.feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1 @@
|
|||
bin.includes = feature.xml
|
71
javaUtilities/collaboration.dataserver.feature/feature.xml
Normal file
71
javaUtilities/collaboration.dataserver.feature/feature.xml
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="collaboration.dataserver.feature"
|
||||
label="Dataserver Feature"
|
||||
version="1.14">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
</description>
|
||||
|
||||
<copyright url="http://www.example.com/copyright">
|
||||
[Enter Copyright Description here.]
|
||||
</copyright>
|
||||
|
||||
<license url="http://www.example.com/license">
|
||||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<plugin
|
||||
id="collaboration.dataserver"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.xmpp"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.http"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.util"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.jetty"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.jivesoftware.smack"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.http"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.collections"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
</feature>
|
|
@ -0,0 +1,99 @@
|
|||
<project default="main" basedir=".">
|
||||
|
||||
<property name="workspace" value="${basedir}/../.." />
|
||||
<property name="esb.build.directory" value="${workspace}/edexOsgi/build.edex" />
|
||||
<property name="feature.file" value="${basedir}.feature/feature.xml"/>
|
||||
<property name="dataserver.root.directory" value="/awips2/collab-dataserver" />
|
||||
<property name="includegen.filter" value="raytheon|collaboration.dataserver" />
|
||||
<property name="basedirectories" value="${workspace}/edexOsgi;${workspace}/javaUtilities;${workspace}/cots" />
|
||||
|
||||
|
||||
<!-- import -->
|
||||
<import file="${esb.build.directory}/deploy-common/plugin-methods.xml" />
|
||||
|
||||
<!-- public static final -->
|
||||
<path id="ant.classpath">
|
||||
<fileset dir="${esb.build.directory}/lib/ant">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
|
||||
<target name="main" >
|
||||
<sequential>
|
||||
<!-- prepare to run includegen -->
|
||||
<var name="includes.directory" value="${basedir}/tmp/includes" />
|
||||
<if>
|
||||
<available file="${includes.directory}" type="dir" />
|
||||
<then>
|
||||
<delete verbose="true" includeemptydirs="true">
|
||||
<fileset dir="${includes.directory}"
|
||||
includes="*/**" />
|
||||
</delete>
|
||||
</then>
|
||||
</if>
|
||||
<mkdir dir="${includes.directory}" />
|
||||
|
||||
<!-- run includegen -->
|
||||
<echo message="Generating deployment list for feature: ${feature}" />
|
||||
|
||||
<includegen providerfilter="${includegen.filter}"
|
||||
basedirectories="${basedirectories}"
|
||||
featurefile="${feature.file}"
|
||||
cotsout="${includes.directory}/cots.includes"
|
||||
plugsout="${includes.directory}/plugins.includes"
|
||||
coreout="${includes.directory}/core.includes" />
|
||||
|
||||
<var name="destination.directory"
|
||||
value="${dataserver.root.directory}/lib/plugins" />
|
||||
<mkdir dir="${destination.directory}" />
|
||||
<processPlugins
|
||||
includes.file="${includes.directory}/plugins.includes"
|
||||
plugin.type="plugins"
|
||||
plugin.directories="${basedirectories}"
|
||||
destination.directory="${destination.directory}" />
|
||||
<processPlugins
|
||||
includes.file="${includes.directory}/core.includes"
|
||||
plugin.type="core"
|
||||
plugin.directories="${basedirectories}"
|
||||
destination.directory="${destination.directory}" />
|
||||
|
||||
<var name="destination.directory"
|
||||
value="${dataserver.root.directory}/lib/dependencies" />
|
||||
<mkdir dir="${destination.directory}" />
|
||||
<processPlugins
|
||||
includes.file="${includes.directory}/cots.includes"
|
||||
plugin.type="cots"
|
||||
plugin.directories="${basedirectories}"
|
||||
destination.directory="${destination.directory}" />
|
||||
|
||||
<!-- deploy scripts and config -->
|
||||
<copy todir="${dataserver.root.directory}/config" overwrite="false" verbose="true">
|
||||
<fileset dir="${basedir}/config" />
|
||||
</copy>
|
||||
<copy todir="${dataserver.root.directory}/bin" overwrite="true" verbose="true">
|
||||
<fileset dir="${basedir}/scriptBin" />
|
||||
</copy>
|
||||
<chmod dir="${dataserver.root.directory}/bin" perm="ug+rx" includes="**/*.sh"/>
|
||||
|
||||
<!-- cleanup the temporary directories -->
|
||||
<if>
|
||||
<available file="${basedir}/tmp" type="dir" />
|
||||
<then>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}"
|
||||
includes="tmp/**" />
|
||||
</delete>
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- static -->
|
||||
<taskdef name="includegen"
|
||||
classname="com.raytheon.uf.anttasks.includesgen.GenerateIncludesFromFeature"
|
||||
classpathref="ant.classpath" />
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml"
|
||||
classpath="${esb.build.directory}/lib/ant/ant-contrib-1.0b3.jar" />
|
||||
</project>
|
61
javaUtilities/collaboration.dataserver/scriptBin/start.sh
Executable file
61
javaUtilities/collaboration.dataserver/scriptBin/start.sh
Executable file
|
@ -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
|
||||
)
|
36
javaUtilities/collaboration.dataserver/scriptBin/stop.sh
Executable file
36
javaUtilities/collaboration.dataserver/scriptBin/stop.sh
Executable file
|
@ -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
|
||||
)
|
|
@ -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
|
||||
)
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
(cd $(dirname "$0")
|
||||
PIDFILE=collabserver.pid
|
||||
if [[ -e $PIDFILE ]]
|
||||
then
|
||||
kill `cat $PIDFILE`
|
||||
rm $PIDFILE
|
||||
fi
|
||||
)
|
Loading…
Add table
Reference in a new issue