This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch 6.0
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/6.0 by this push:
     new d2fb70e  Add assembly and startup scripts for oap server
     new efd975e  Merge remote-tracking branch 'origin/6.0' into 6.0
d2fb70e is described below

commit d2fb70ee8ecb160c89604e2fc70c40ad66b7b76b
Author: Gao Hongtao <hanahm...@gmail.com>
AuthorDate: Thu Aug 2 14:52:30 2018 +0800

    Add assembly and startup scripts for oap server
    
    Add a new assembly xml file to oap-starter project, and add 
`oapService.sh/bat`
    files to apm-dist project.
    
    Remove `collectorService.sh/bat` scripts from apm-dist project.
---
 .../bin/{collectorService.bat => oapService.bat}   | 12 ++---
 .../bin/{collectorService.sh => oapService.sh}     | 22 ++++----
 apm-dist/bin/startup.bat                           |  2 +-
 apm-dist/bin/startup.sh                            |  4 +-
 apm-dist/pom.xml                                   |  4 +-
 apm-dist/src/main/assembly/binary.xml              |  6 +--
 oap-server/server-starter/pom.xml                  | 54 ++++++++++++++++++++
 .../server-starter/src/main/assembly/assembly.xml  | 58 ++++++++++++++++++++++
 .../server-starter/src/main/assembly/log4j2.xml    | 44 ++++++++++++++++
 9 files changed, 181 insertions(+), 25 deletions(-)

diff --git a/apm-dist/bin/collectorService.bat b/apm-dist/bin/oapService.bat
similarity index 71%
rename from apm-dist/bin/collectorService.bat
rename to apm-dist/bin/oapService.bat
index b16ee1b..299b1a6 100644
--- a/apm-dist/bin/collectorService.bat
+++ b/apm-dist/bin/oapService.bat
@@ -17,12 +17,12 @@
 @echo off
 
 setlocal
-set COLLECTOR_PROCESS_TITLE=Skywalking-Collector
-set COLLECTOR_HOME=%~dp0%..
-set COLLECTOR_OPTS="-Xms256M -Xmx512M -Dcollector.logDir=%COLLECTOR_HOME%\logs"
+set OAP_PROCESS_TITLE=Skywalking-Collector
+set OAP_HOME=%~dp0%..
+set OAP_OPTS="-Xms256M -Xmx512M -Doap.logDir=%OAP_HOME%\logs"
 
-set CLASSPATH=%COLLECTOR_HOME%\config;.;
-set CLASSPATH=%COLLECTOR_HOME%\collector-libs\*;%CLASSPATH%
+set CLASSPATH=%OAP_HOME%\config;.;
+set CLASSPATH=%OAP_HOME%\oap-libs\*;%CLASSPATH%
 
 if defined JAVA_HOME (
  set _EXECJAVA="%JAVA_HOME%\bin\java"
@@ -33,5 +33,5 @@ if not defined JAVA_HOME (
  set _EXECJAVA=java
 )
 
-start "%COLLECTOR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_OPTS%" -cp 
"%CLASSPATH%" org.apache.skywalking.apm.collector.boot.CollectorBootStartUp
+start "%OAP_PROCESS_TITLE%" %_EXECJAVA% "%OAP_OPTS%" -cp "%CLASSPATH%" 
org.apache.skywalking.oap.server.starter.OAPServerStartUp
 endlocal
diff --git a/apm-dist/bin/collectorService.sh b/apm-dist/bin/oapService.sh
similarity index 61%
rename from apm-dist/bin/collectorService.sh
rename to apm-dist/bin/oapService.sh
index b7b4082..ed49bc9 100644
--- a/apm-dist/bin/collectorService.sh
+++ b/apm-dist/bin/oapService.sh
@@ -18,33 +18,33 @@
 
 PRG="$0"
 PRGDIR=`dirname "$PRG"`
-[ -z "$COLLECTOR_HOME" ] && COLLECTOR_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+[ -z "$OAP_HOME" ] && OAP_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
 
-COLLECT_LOG_DIR="${COLLECTOR_HOME}/logs"
+OAP_LOG_DIR="${OAP_HOME}/logs"
 JAVA_OPTS=" -Xms256M -Xmx512M"
 
-if [ ! -d "${COLLECTOR_HOME}/logs" ]; then
-    mkdir -p "${COLLECT_LOG_DIR}"
+if [ ! -d "${OAP_HOME}/logs" ]; then
+    mkdir -p "${OAP_LOG_DIR}"
 fi
 
 _RUNJAVA=${JAVA_HOME}/bin/java
 [ -z "$JAVA_HOME" ] && _RUNJAVA=java
 
-CLASSPATH="$COLLECTOR_HOME/config:$CLASSPATH"
-for i in "$COLLECTOR_HOME"/collector-libs/*.jar
+CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+for i in "$OAP_HOME"/oap-libs/*.jar
 do
     CLASSPATH="$i:$CLASSPATH"
 done
 
-COLLECTOR_OPTIONS=" -Dcollector.logDir=${COLLECT_LOG_DIR}"
+OAP_OPTIONS=" -Doap.logDir=${OAP_LOG_DIR}"
 
-eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${COLLECTOR_OPTIONS} -classpath 
$CLASSPATH org.apache.skywalking.apm.collector.boot.CollectorBootStartUp \
-        2>${COLLECT_LOG_DIR}/collector.log 1> /dev/null &"
+eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${OAP_OPTIONS} -classpath $CLASSPATH 
org.apache.skywalking.oap.server.starter.OAPServerStartUp \
+        2>${OAP_LOG_DIR}/oap.log 1> /dev/null &"
 
 if [ $? -eq 0 ]; then
     sleep 1
-       echo "SkyWalking Collector started successfully!"
+       echo "SkyWalking OAP started successfully!"
 else
-       echo "SkyWalking Collector started failure!"
+       echo "SkyWalking OAP started failure!"
        exit 1
 fi
diff --git a/apm-dist/bin/startup.bat b/apm-dist/bin/startup.bat
index 4feecf3..f9d2747 100644
--- a/apm-dist/bin/startup.bat
+++ b/apm-dist/bin/startup.bat
@@ -17,6 +17,6 @@
 @echo off
 
 setlocal
-call "%~dp0"\collectorService.bat start
+call "%~dp0"\oapService.bat start
 call "%~dp0"\webappService.bat start
 endlocal
diff --git a/apm-dist/bin/startup.sh b/apm-dist/bin/startup.sh
index 72cd520..343fda2 100644
--- a/apm-dist/bin/startup.sh
+++ b/apm-dist/bin/startup.sh
@@ -18,9 +18,9 @@
 
 PRG="$0"
 PRGDIR=`dirname "$PRG"`
-COLLECTOR_EXE=collectorService.sh
+OAP_EXE=oapService.sh
 WEBAPP_EXE=webappService.sh
 
-"$PRGDIR"/"$COLLECTOR_EXE"
+"$PRGDIR"/"OAP_EXE"
 
 "$PRGDIR"/"$WEBAPP_EXE"
diff --git a/apm-dist/pom.xml b/apm-dist/pom.xml
index 458256b..d4a6318 100644
--- a/apm-dist/pom.xml
+++ b/apm-dist/pom.xml
@@ -38,12 +38,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.skywalking</groupId>
-            <artifactId>apm-collector-boot</artifactId>
+            <artifactId>server-starter</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.skywalking</groupId>
-            <artifactId>apm-collector-boot</artifactId>
+            <artifactId>apm-webapp</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
diff --git a/apm-dist/src/main/assembly/binary.xml 
b/apm-dist/src/main/assembly/binary.xml
index 193e693..35c41e9 100644
--- a/apm-dist/src/main/assembly/binary.xml
+++ b/apm-dist/src/main/assembly/binary.xml
@@ -36,7 +36,7 @@
             <fileMode>0755</fileMode>
         </fileSet>
         <fileSet>
-            
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/config</directory>
+            
<directory>${project.basedir}/../oap-server/server-starter/target/skywalking-oap-assembly/skywalking-oap/config</directory>
             <outputDirectory>/config</outputDirectory>
             <includes>
                 <include>*.yml</include>
@@ -44,8 +44,8 @@
             </includes>
         </fileSet>
         <fileSet>
-            
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/libs</directory>
-            <outputDirectory>/collector-libs</outputDirectory>
+            
<directory>${project.basedir}/../oap-server/server-starter/target/skywalking-oap-assembly/skywalking-oap/libs</directory>
+            <outputDirectory>/oap-libs</outputDirectory>
         </fileSet>
 
         <!-- Agent repackage into the dist -->
diff --git a/oap-server/server-starter/pom.xml 
b/oap-server/server-starter/pom.xml
index 5119310..27abb83 100644
--- a/oap-server/server-starter/pom.xml
+++ b/oap-server/server-starter/pom.xml
@@ -51,6 +51,11 @@
             <artifactId>cluster-zookeeper-plugin</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>cluster-kubernetes-plugin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <!-- cluster module -->
 
         <!-- receiver module -->
@@ -82,4 +87,53 @@
         </dependency>
         <!-- query module -->
     </dependencies>
+    <build>
+        <finalName>skywalking-oap</finalName>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${compiler.version}</source>
+                    <target>${compiler.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <configuration>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <excludes>
+                        <exclude>application.yml</exclude>
+                        <exclude>log4j2.xml</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                
<descriptor>src/main/assembly/assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/oap-server/server-starter/src/main/assembly/assembly.xml 
b/oap-server/server-starter/src/main/assembly/assembly.xml
new file mode 100644
index 0000000..0f234cd
--- /dev/null
+++ b/oap-server/server-starter/src/main/assembly/assembly.xml
@@ -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>assembly</id>
+    <formats>
+        <format>dir</format>
+    </formats>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/libs</outputDirectory>
+            <scope>runtime</scope>
+        </dependencySet>
+    </dependencySets>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/assembly</directory>
+            <outputDirectory>/config</outputDirectory>
+            <includes>
+                <include>log4j2.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <includes>
+                <include>application.yml</include>
+                <include>log4j2.xml</include>
+                <include>component-libraries.yml</include>
+            </includes>
+            <outputDirectory>/config</outputDirectory>
+        </fileSet>
+        <fileSet>
+            
<directory>${project.basedir}/../apm-collector-instrument/target</directory>
+            <includes>
+                <include>collector-instrument-agent.jar</include>
+            </includes>
+            <outputDirectory>/agent</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/oap-server/server-starter/src/main/assembly/log4j2.xml 
b/oap-server/server-starter/src/main/assembly/log4j2.xml
new file mode 100644
index 0000000..939fc04
--- /dev/null
+++ b/oap-server/server-starter/src/main/assembly/log4j2.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  ~
+  -->
+
+<Configuration status="info">
+    <Properties>
+        <Property name="log-path">${sys:oap.logDir}</Property>
+    </Properties>
+    <Appenders>
+        <RollingFile name="RollingFile" 
fileName="${log-path}/skywalking-oap-server.log"
+                     
filePattern="${log-path}/skywalking-oap-server-%d{yyyy-MM-dd}-%i.log" >
+            <PatternLayout>
+                <pattern>%d - %c -%-4r [%t] %-5p %x - %m%n</pattern>
+            </PatternLayout>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="102400KB" />
+            </Policies>
+            <DefaultRolloverStrategy max="30"/>
+        </RollingFile>
+    </Appenders>
+    <Loggers>
+        <logger name="org.eclipse.jetty" level="INFO"/>
+        <logger name="org.apache.zookeeper" level="INFO"/>
+        <logger name="io.grpc.netty" level="INFO"/>
+        <Root level="info">
+            <AppenderRef ref="RollingFile"/>
+        </Root>
+    </Loggers>
+</Configuration>

Reply via email to