修复部分问题
This commit is contained in:
parent
fb87464db0
commit
7c4b547cb9
|
|
@ -37,6 +37,8 @@ services:
|
|||
image: skywalking/skywalking-routing:2.0-2016
|
||||
expose:
|
||||
- "23000"
|
||||
ports:
|
||||
- "23000:23000"
|
||||
depends_on:
|
||||
- registry-center-server
|
||||
links:
|
||||
|
|
@ -68,7 +70,6 @@ services:
|
|||
environment:
|
||||
MYSQL_DATABASE: test
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
STARTUP_SQL: /Users/xin/workbench/sky-walking/skywalking-webui/src/main/sql/table.mysql
|
||||
|
||||
registry-center-server:
|
||||
image: zookeeper:3.4.9
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ SW_ALARM_ALARM_LOG_DIR="${SW_ALARM_ALARM_SERVER_BIN_DIR}/../logs"
|
|||
SW_ALARM_ALARM_CFG_DIR="${SW_ALARM_ALARM_SERVER_BIN_DIR}/../config"
|
||||
|
||||
if [ ! -d "${SW_ALARM_ALARM_LOG_DIR}" ]; then
|
||||
echo "create directory $SW_ALARM_ALARM_LOG_DIR"
|
||||
mkdir -p ${SW_ALARM_ALARM_LOG_DIR}
|
||||
fi
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ fi
|
|||
|
||||
CLASSPATH="$SW_ALARM_ALARM_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${SW_ALARM_ALARM_SERVER_BIN_DIR}"/../lib/*.jar
|
||||
for i in "${SW_ALARM_ALARM_SERVER_BIN_DIR}"/../libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
|
@ -52,4 +53,5 @@ echo "CLASSPATH=$CLASSPATH"
|
|||
|
||||
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
|
||||
|
||||
$JAVA ${JAVA_OPTS} -classpath $CLASSPATH com.ai.cloud.skywalking.alarm.AlarmProcessServer >> ${SW_ALARM_ALARM_SERVER_BIN_DIR}/../log/sw-alarm-server.log & 2>&1&
|
||||
$JAVA ${JAVA_OPTS} -classpath $CLASSPATH com.a.eye.skywalking.alarm.AlarmProcessServer >> ${SW_ALARM_ALARM_LOG_DIR}/sw-alarm-server.log & 2>&1&
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ ENV ALARM_COORDINATE_ZK_ADDRESS=localhost:2181 \
|
|||
|
||||
ADD skywalking-alarm.tar /usr/local/
|
||||
COPY config.properties /usr/local/skywalking-alarm/config
|
||||
COPY sw-alarm-server.sh /usr/local/skywalking-alarm/bin
|
||||
COPY docker-entrypoint.sh /
|
||||
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh && chmod +x /usr/local/skywalking-alarm/bin/sw-alarm-server.sh
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/usr/local/skywalking-alarm/bin/sw-alarm-server.sh"]
|
||||
|
|
|
|||
|
|
@ -37,4 +37,6 @@ eval sed -i -e 's/\{WEBUI_DEPLOY_ADDRESS\}/$WEBUI_DEPLOY_ADDRESS/' /usr/local/sk
|
|||
echo "replace WEBUI_CONTEXT_NAME with $WEBUI_CONTEXT_NAME"
|
||||
eval sed -i -e 's/\{WEBUI_CONTEXT_NAME\}/$WEBUI_CONTEXT_NAME/' /usr/local/skywalking-alarm/config/config.properties
|
||||
|
||||
mkdir -p /usr/local/skywalking-alarm/logs
|
||||
|
||||
exec "$@"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
os400=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
OS400*) os400=true;;
|
||||
Darwin*) darwin=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
SW_ALARM_ALARM_SERVER_BIN="$0"
|
||||
|
||||
while [ -h "$SW_ALARM_ALARM_SERVER_BIN" ]; do
|
||||
ls=`ls -ld "$SW_ALARM_ALARM_SERVER_BIN"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SW_ALARM_ALARM_SERVER_BIN="$link"
|
||||
else
|
||||
SW_ALARM_ALARM_SERVER_BIN=`dirname "$SW_ALARM_ALARM_SERVER_BIN"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get standard environment variables
|
||||
SW_ALARM_ALARM_SERVER_BIN_DIR=`dirname "$SW_ALARM_ALARM_SERVER_BIN"`
|
||||
SW_ALARM_ALARM_PREFIX="${SW_ALARM_ALARM_SERVER_BIN_DIR}/.."
|
||||
SW_ALARM_ALARM_LOG_DIR="${SW_ALARM_ALARM_SERVER_BIN_DIR}/../logs"
|
||||
SW_ALARM_ALARM_CFG_DIR="${SW_ALARM_ALARM_SERVER_BIN_DIR}/../config"
|
||||
|
||||
if [ ! -d "${SW_ALARM_ALARM_LOG_DIR}" ]; then
|
||||
echo "create directory $SW_ALARM_ALARM_LOG_DIR"
|
||||
mkdir -p ${SW_ALARM_ALARM_LOG_DIR}
|
||||
fi
|
||||
|
||||
#echo $SW_ALARM_ALARM_SERVER_BIN_DIR
|
||||
#set java home
|
||||
if [ "$JAVA_HOME" != "" ]; then
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
CLASSPATH="$SW_ALARM_ALARM_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${SW_ALARM_ALARM_SERVER_BIN_DIR}"/../libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
||||
echo "CLASSPATH=$CLASSPATH"
|
||||
|
||||
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
|
||||
|
||||
$JAVA ${JAVA_OPTS} -classpath $CLASSPATH com.a.eye.skywalking.alarm.AlarmProcessServer
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<outputDirectory>/config</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/${build.finalName}</directory>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/libs</outputDirectory>
|
||||
<includes>
|
||||
<include>${build.finalName}.jar</include>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ ENV SERVER_PORT=23000 \
|
|||
|
||||
ADD skywalking-routing.tar /usr/local/
|
||||
COPY config.properties /usr/local/skywalking-routing/config/
|
||||
COPY routingServer.sh /usr/local/skywalking-routing/bin
|
||||
COPY docker-entrypoint.sh /
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh && chmod +x /usr/local/skywalking-routing/bin/routingServer.sh
|
||||
|
||||
EXPOSE 23000
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
ROUTING_HOME=`dirname "$0"`/..
|
||||
ROUTING_CFG_DIR="${ROUTING_HOME}/config"
|
||||
ROUTING_LOG_DIR="${ROUTING_HOME}/logs"
|
||||
|
||||
if [ "$JAVA_HOME" != "" ]; then
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
if [ ! -d "${ROUTING_LOG_DIR}" ]; then
|
||||
mkdir -p ${ROUTING_LOG_DIR}
|
||||
fi
|
||||
|
||||
CLASSPATH="$ROUTING_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${ROUTING_HOME}"/libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
||||
echo "CLASSPATH=$CLASSPATH"
|
||||
|
||||
|
||||
$JAVA ${JAVA_OPTS} -classpath $CLASSPATH com.a.eye.skywalking.routing.Main
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<outputDirectory>/config</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/${build.finalName}</directory>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/libs</outputDirectory>
|
||||
<includes>
|
||||
<include>${build.finalName}.jar</include>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ fi
|
|||
|
||||
CLASSPATH="$STORAGE_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${STORAGE_SERVER_BIN_DIR}"/../lib/*.jar
|
||||
for i in "${STORAGE_SERVER_BIN_DIR}"/../libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
|
@ -29,4 +29,4 @@ done
|
|||
echo "CLASSPATH=$CLASSPATH"
|
||||
|
||||
|
||||
$JAVA ${JAVA_OPTS} -DDATA_INDEX_HOME=${STORAGE_SERVER_BIN_DIR}/../data/index -classpath $CLASSPATH com.a.eye.skywalking.storage.Main >> ${STORAGE_SERVER_BIN_DIR}/../logs/storage-server.log & 2>&1&
|
||||
$JAVA ${JAVA_OPTS} -DSTORAGE_HOME=${STORAGE_SERVER_BIN_DIR}/.. -DDATA_INDEX_HOME=${STORAGE_SERVER_BIN_DIR}/../data/index -classpath $CLASSPATH com.a.eye.skywalking.storage.Main >> ${STORAGE_SERVER_BIN_DIR}/../logs/storage-server.log & 2>&1&
|
||||
|
|
|
|||
|
|
@ -1,17 +1,32 @@
|
|||
FROM openjdk:8u111-jdk
|
||||
|
||||
# grab gosu for easy step-down from root
|
||||
ENV GOSU_VERSION 1.7
|
||||
RUN set -x \
|
||||
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
|
||||
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
|
||||
&& export GNUPGHOME="$(mktemp -d)" \
|
||||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
|
||||
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
|
||||
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
|
||||
&& chmod +x /usr/local/bin/gosu \
|
||||
&& gosu nobody true
|
||||
|
||||
RUN useradd -r elasticsearch
|
||||
|
||||
ENV SERVER_PORT=34000 \
|
||||
REGISTRY_CENTER_URL=localhost:2181
|
||||
|
||||
ADD skywalking-storage.tar /usr/local/
|
||||
COPY config.properties /usr/local/skywalking-storage/config
|
||||
COPY docker-entrypoint.sh /
|
||||
ADD skywalking-storage.tar /home/elasticsearch
|
||||
COPY config.properties /home/elasticsearch/skywalking-storage/config
|
||||
COPY docker-entrypoint.sh /home/elasticsearch/skywalking-storage/bin
|
||||
COPY storageServer.sh /home/elasticsearch/skywalking-storage/bin
|
||||
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
RUN chmod +x /home/elasticsearch/skywalking-storage/bin/docker-entrypoint.sh && chmod +x /home/elasticsearch/skywalking-storage/bin/storageServer.sh && mkdir -p /home/elasticsearch/skywalking-storage/data/file && chown -R elasticsearch:elasticsearch /home/elasticsearch
|
||||
|
||||
VOLUME ["/usr/local/skywalking-storage/data/file", "/usr/local/skywalking-storage/data/index/data"]
|
||||
VOLUME ["/home/elasticsearch/skywalking-storage/data/file", "/home/elasticsearch/skywalking-storage/data/index/data"]
|
||||
|
||||
EXPOSE 34000
|
||||
EXPOSE 34000 8000
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/usr/local/skywalking-storage/bin/storageServer.sh"]
|
||||
ENTRYPOINT ["/home/elasticsearch/skywalking-storage/bin/docker-entrypoint.sh"]
|
||||
CMD ["/home/elasticsearch/skywalking-storage/bin/storageServer.sh"]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "replace SERVER_PORT with $SERVER_PORT"
|
||||
eval sed -i -e 's/\{SERVER_PORT\}/$SERVER_PORT/' /usr/local/skywalking-storage/config/config.properties
|
||||
eval sed -i -e 's/\{SERVER_PORT\}/$SERVER_PORT/' /home/elasticsearch/skywalking-storage/config/config.properties
|
||||
|
||||
echo "replace REGISTRY_CENTER_URL with $REGISTRY_CENTER_URL"
|
||||
eval sed -i -e 's/\{REGISTRY_CENTER_URL\}/$REGISTRY_CENTER_URL/' /usr/local/skywalking-storage/config/config.properties
|
||||
eval sed -i -e 's/\{REGISTRY_CENTER_URL\}/$REGISTRY_CENTER_URL/' /home/elasticsearch/skywalking-storage/config/config.properties
|
||||
|
||||
exec "$@"
|
||||
gosu elasticsearch "$@"
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
STORAGE_SERVER_BIN="$0"
|
||||
|
||||
# Get standard environment variables
|
||||
STORAGE_SERVER_BIN_DIR=`dirname "$STORAGE_SERVER_BIN"`
|
||||
STORAGE_PREFIX="${STORAGE_SERVER_BIN_DIR}/.."
|
||||
STORAGE_LOG_DIR="${STORAGE_SERVER_BIN_DIR}/../logs"
|
||||
STORAGE_CFG_DIR="${STORAGE_SERVER_BIN_DIR}/../config"
|
||||
|
||||
#echo $STORAGE_SERVER_BIN_DIR
|
||||
#set java home
|
||||
if [ "$JAVA_HOME" != "" ]; then
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
CLASSPATH="$STORAGE_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${STORAGE_SERVER_BIN_DIR}"/../libs/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
||||
echo "CLASSPATH=$CLASSPATH"
|
||||
|
||||
|
||||
$JAVA ${JAVA_OPTS} -DSTORAGE_HOME=${STORAGE_SERVER_BIN_DIR}/.. -DDATA_INDEX_HOME=${STORAGE_SERVER_BIN_DIR}/../data/index -classpath $CLASSPATH com.a.eye.skywalking.storage.Main
|
||||
BIN
skywalking-storage-center/skywalking-storage/lib/dataindex-es-5.0.1.zip
Executable file → Normal file
BIN
skywalking-storage-center/skywalking-storage/lib/dataindex-es-5.0.1.zip
Executable file → Normal file
Binary file not shown.
|
|
@ -25,6 +25,13 @@
|
|||
<directory>src/main/resources</directory>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/libs</outputDirectory>
|
||||
<includes>
|
||||
<include>${build.finalName}.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/${build.finalName}/data/index</directory>
|
||||
<outputDirectory>/data/index</outputDirectory>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.a.eye.skywalking.storage.listener.SearchListener;
|
|||
import com.a.eye.skywalking.storage.listener.StorageListener;
|
||||
import com.a.eye.skywalking.registry.assist.NetUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
|
@ -40,6 +41,7 @@ public class Main {
|
|||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
System.out.println(" =========== ::::::::::: {} " + System.getProperty("STORAGE_HOME") + File.separator );
|
||||
initConfig();
|
||||
HealthCollector.init(SERVER_REPORTER_NAME);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public class PathResolver {
|
|||
private final static String STORAGE_HOME;
|
||||
|
||||
static {
|
||||
STORAGE_HOME = System.getProperty("user.dir") + File.separator + "..";
|
||||
STORAGE_HOME = System.getProperty("STORAGE_HOME") + File.separator;
|
||||
}
|
||||
|
||||
public static String getAbsolutePath(String path) {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,13 @@
|
|||
# logger #
|
||||
log4j.rootLogger=Rolling_File,CONSOLE
|
||||
log4j.logger.org.apache=OFF
|
||||
log4j.logger.io.netty=OFF
|
||||
log4j.org.elasticsearch=OFF
|
||||
log4j.org.I0Itec=OFF
|
||||
log4j.logger.com.a.eye.skywalking.network.dependencies.io.grpc=OFF
|
||||
log4j.logger.com.a.eye.skywalking.network.dependencies.io.netty=OFF
|
||||
# log4j properties #
|
||||
|
||||
log4j.appender.Rolling_File=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.Rolling_File.Threshold=WARN
|
||||
log4j.appender.Rolling_File.File=../logs/storage-server-log4j.log
|
||||
log4j.appender.Rolling_File.Append=true
|
||||
log4j.appender.Rolling_File.MaxFileSize=100MB
|
||||
log4j.appender.Rolling_File.MaxBackupIndex=5
|
||||
log4j.appender.Rolling_File.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.Rolling_File.layout.ConversionPattern=%d %-5p %c{1}:%L - %m%n
|
||||
# logger #
|
||||
log4j.rootLogger=DEBUG,CONSOLE
|
||||
log4j.logger.org=ON
|
||||
#log4j.logger.org.systemgo.devframework=DEBUG
|
||||
|
||||
# Console Appender #
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.Target=System.out
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c{1}:%L - %m%n
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN" name="storage-server" packages="">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d %-5p %c{1}:%L - %m%n"/>
|
||||
</Console>
|
||||
<RollingFile name="RollingFile" fileName="../logs/storage-server.log"
|
||||
filePattern="logs/storage-server-%d{MM-dd-yyyy}.log.gz"
|
||||
ignoreExceptions="false">
|
||||
<PatternLayout>
|
||||
<Pattern>%d %-5p %c{1}:%L - %m%n</Pattern>
|
||||
</PatternLayout>
|
||||
<SizeBasedTriggeringPolicy size="200MB"/>
|
||||
<DefaultRolloverStrategy max="5"/>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="DEBUG">
|
||||
<AppenderRef ref="RollingFile" level="INFO"/>
|
||||
<AppenderRef ref="Console" level="DEBUG"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
<Configuration status="debug">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
Loading…
Reference in New Issue