Merge pull request #852 from hanahmily/module/apm-backend-dist
Module/apm backend dist
This commit is contained in:
commit
fc5eadae39
|
|
@ -6,7 +6,7 @@ set COLLECTOR_HOME=%~dp0%..
|
|||
set COLLECTOR_OPTS="-Xms256M -Xmx512M -Dcollector.logDir=%COLLECTOR_HOME%\logs"
|
||||
|
||||
set CLASSPATH=%COLLECTOR_HOME%\config;.;
|
||||
set CLASSPATH=%COLLECTOR_HOME%\libs\*;%CLASSPATH%
|
||||
set CLASSPATH=%COLLECTOR_HOME%\collector-libs\*;%CLASSPATH%
|
||||
|
||||
if defined JAVA_HOME (
|
||||
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
|
||||
|
|
@ -15,7 +15,7 @@ _RUNJAVA=${JAVA_HOME}/bin/java
|
|||
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
|
||||
|
||||
CLASSPATH="$COLLECTOR_HOME/config:$CLASSPATH"
|
||||
for i in "$COLLECTOR_HOME"/libs/*.jar
|
||||
for i in "$COLLECTOR_HOME"/collector-libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
setlocal
|
||||
call "%~dp0"\collectorService.bat start
|
||||
call "%~dp0"\webappService.bat start
|
||||
endlocal
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
PRG="$0"
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
COLLECTOR_EXE=collectorService.sh
|
||||
WEBAPP_EXE=webappService.sh
|
||||
|
||||
"$PRGDIR"/"$COLLECTOR_EXE"
|
||||
|
||||
"$PRGDIR"/"$WEBAPP_EXE"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
@echo off
|
||||
|
||||
setlocal
|
||||
set WEBAPP_PROCESS_TITLE=Skywalking-Webapp
|
||||
set WEBAPP_HOME=%~dp0%..
|
||||
set JARPATH=%WEBAPP_HOME%\webapp
|
||||
|
||||
if defined JAVA_HOME (
|
||||
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
|
||||
)
|
||||
|
||||
if not defined JAVA_HOME (
|
||||
echo "JAVA_HOME not set."
|
||||
set _EXECJAVA=java
|
||||
)
|
||||
|
||||
start "%WEBAPP_PROCESS_TITLE%" %_EXECJAVA% -jar %JARPATH%/skywalking-webapp.jar
|
||||
endlocal
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
PRG="$0"
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
[ -z "$WEBAPP_HOME" ] && WEBAPP_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
|
||||
WEBAPP_LOG_DIR="${WEBAPP_HOME}/logs"
|
||||
JAVA_OPTS=" -Xms256M -Xmx512M"
|
||||
JAR_PATH="${WEBAPP_HOME}/webapp"
|
||||
|
||||
if [ ! -d "${WEBAPP_HOME}/logs" ]; then
|
||||
mkdir -p "${WEBAPP_LOG_DIR}"
|
||||
fi
|
||||
|
||||
_RUNJAVA=${JAVA_HOME}/bin/java
|
||||
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
|
||||
|
||||
eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} -jar ${JAR_PATH}/skywalking-webapp.jar \
|
||||
2>${WEBAPP_LOG_DIR}/webapp.log 1> /dev/null &"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
sleep 1
|
||||
echo "Skywalking Web Application started successfully!"
|
||||
else
|
||||
echo "Skywalking Web Application started failure!"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>5.0.0-alpha-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>apm-backend-dist</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-collector-boot</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-collector-boot</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>skywalking-backend</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>dist</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<attach>true</attach>
|
||||
<tarLongFileMode>posix</tarLongFileMode>
|
||||
<runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
|
||||
<descriptors>
|
||||
<descriptor>${project.basedir}/src/main/assembly/binary.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<copy file="${project.build.directory}/skywalking-backend.tar.gz"
|
||||
tofile="${project.basedir}/../packages/skywalking-backend.tar.gz" overwrite="true"/>
|
||||
<copy file="${project.build.directory}/skywalking-backend.zip"
|
||||
tofile="${project.basedir}/../packages/skywalking-backend.zip" overwrite="true"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>dist</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/bin</directory>
|
||||
<outputDirectory>/bin</outputDirectory>
|
||||
<includes>
|
||||
<include>*.sh</include>
|
||||
<include>*.bat</include>
|
||||
</includes>
|
||||
<fileMode>0755</fileMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/config</directory>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
<includes>
|
||||
<include>*.yml</include>
|
||||
<include>*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/libs</directory>
|
||||
<outputDirectory>/collector-libs</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.basedir}/../apm-webapp/target/skywalking-webapp.jar</source>
|
||||
<outputDirectory>/webapp</outputDirectory>
|
||||
<fileMode>0644</fileMode>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
PRG="$0"
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=collectorService.sh
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" start
|
||||
|
|
@ -227,26 +227,7 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<copy file="${project.build.directory}/skywalking-collector-assembly.tar.gz"
|
||||
tofile="${project.basedir}/../../packages/skywalking-collector.tar.gz" overwrite="true"/>
|
||||
<copy file="${project.build.directory}/skywalking-collector-assembly.zip"
|
||||
tofile="${project.basedir}/../../packages/skywalking-collector.zip" overwrite="true"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>assembly</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
<format>tar.gz</format>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
|
@ -32,15 +31,6 @@
|
|||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/bin</directory>
|
||||
<outputDirectory>/bin</outputDirectory>
|
||||
<includes>
|
||||
<include>*.sh</include>
|
||||
<include>*.bat</include>
|
||||
</includes>
|
||||
<fileMode>0755</fileMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
|
|
|
|||
Loading…
Reference in New Issue