修复部分问题
This commit is contained in:
parent
2c3e3ce33f
commit
12b41c1d14
|
|
@ -0,0 +1,32 @@
|
|||
version: '2'
|
||||
services:
|
||||
skywalking-webui:
|
||||
image: skywalking/skywalking-webui:2.0-2016
|
||||
expose:
|
||||
- "8080"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- mysql-server
|
||||
- registry-center-server
|
||||
links:
|
||||
- mysql-server
|
||||
- registry-center-server
|
||||
environment:
|
||||
- MYSQL_URL=mysql-server:3306
|
||||
- REGISTRY_CENTER_URL=registry-center-server:2181
|
||||
|
||||
|
||||
mysql-server:
|
||||
image: mysql:5.6
|
||||
expose:
|
||||
- "3306"
|
||||
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
|
||||
expose:
|
||||
- "2181"
|
||||
9
pom.xml
9
pom.xml
|
|
@ -24,6 +24,7 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
<powermock.version>1.6.4</powermock.version>
|
||||
<docker.plugin.version>0.4.13</docker.plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -71,6 +72,14 @@
|
|||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<skipDocker>true</skipDocker>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
exec "$@"
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>skywalking</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-alarm</artifactId>
|
||||
<version>2.0-2016</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>skywalking-alarm</name>
|
||||
|
|
@ -98,6 +101,14 @@
|
|||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<skipDocker>true</skipDocker>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ coordinator.check_all_process_thread_interval=500
|
|||
#数据库驱动类
|
||||
db.driver_class=com.mysql.jdbc.Driver
|
||||
#数据库连接地址
|
||||
db.url=jdbc:mysql://localhost:3307/test
|
||||
db.url=jdbc:mysql://localhost:3306/test
|
||||
#数据库用户名
|
||||
db.user_name=root
|
||||
#数据库密码
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
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>skywalking-application-toolkit</artifactId>
|
||||
<artifactId>skywalking-toolkit-activation</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
|
|
@ -12,12 +12,6 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>skywalking-toolkit-trace-context-activation</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
exec "$@"
|
||||
|
|
@ -7,7 +7,7 @@ server.port=23000
|
|||
# the type of registry center (default: zookeeper)
|
||||
#registrycenter.type=zookeeper
|
||||
# the connect url that registry center
|
||||
registrycenter.connect_url=127.0.0.1:2181
|
||||
registrycenter.connect_url=localhost:2181
|
||||
# auth schema that registry center
|
||||
#registrycenter.auth_schema=
|
||||
# the auth info that registry center
|
||||
|
|
@ -21,7 +21,7 @@ registrycenter.connect_url=127.0.0.1:2181
|
|||
#
|
||||
#disruptor.flush_size=100
|
||||
# the connect url for alarm
|
||||
alarm.redis_server=127.0.0.1:6379
|
||||
alarm.redis_server=localhost:6379
|
||||
#
|
||||
#alarm.alarm_off_flag=true
|
||||
#
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
exec "$@"
|
||||
|
|
@ -23,7 +23,7 @@ server.port=34000
|
|||
#registrycenter.auth_schema=
|
||||
#
|
||||
# the registry center connect url (Default: zookeeper)
|
||||
registrycenter.connect_url=127.0.0.1:2181
|
||||
registrycenter.connect_url=localhost:2181
|
||||
#
|
||||
# the prefix of path that each storage node register
|
||||
#registrycenter.path_prefix=/skywalking/storage_list/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
FROM tomcat:8.0.39-jre8
|
||||
|
||||
ENV JPDA_ADDRESS="8000" \
|
||||
JPDA_TRANSPORT="dt_socket" \
|
||||
MYSQL_URL=localhost:3306 \
|
||||
MYSQL_USER=root \
|
||||
MYSQL_PASSWORD=root \
|
||||
REGISTRY_CENTER_URL=localhost:2181
|
||||
|
||||
COPY skywalking /usr/local/tomcat/webapps/skywalking
|
||||
COPY classes /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/
|
||||
COPY jdbc.properties /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/
|
||||
COPY config.properties /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/
|
||||
COPY docker-entrypoint.sh /
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["catalina.sh", "jpda", "run"]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# the registry center connect url (Default: zookeeper)
|
||||
registrycenter.connect_url={registry_center_url}
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# replace all variables
|
||||
echo "replace mysql-server with $MYSQL_URL"
|
||||
eval sed -i -e 's/\{mysql-server\}/$MYSQL_URL/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/jdbc.properties
|
||||
|
||||
echo "replace mysql-username with $MYSQL_USER"
|
||||
eval sed -i -e 's/\{mysql-username\}/$MYSQL_USER/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/jdbc.properties
|
||||
|
||||
echo "replace mysql-password with $MYSQL_PASSWORD"
|
||||
eval sed -i -e 's/\{mysql-password\}/$MYSQL_PASSWORD/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/jdbc.properties
|
||||
|
||||
echo "replace registry_center_url with $REGISTRY_CENTER_URL"
|
||||
eval sed -i -e 's/\{registry_center_url\}/$REGISTRY_CENTER_URL/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/config.properties
|
||||
|
||||
exec "$@"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://{mysql-server}/test
|
||||
jdbc.username={mysql-username}
|
||||
jdbc.password={mysql-password}
|
||||
jdbc.maxTotal=200
|
||||
jdbc.maxIdle=50
|
||||
jdbc.maxWaitMillis=1000
|
||||
jdbc.defaultAutoCommit=false
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -14,9 +15,6 @@
|
|||
<properties>
|
||||
<project.spring.version>4.1.6.RELEASE</project.spring.version>
|
||||
</properties>
|
||||
<build>
|
||||
<finalName>skywalking</finalName>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
@ -117,4 +115,33 @@
|
|||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>skywalking</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<skipDocker>false</skipDocker>
|
||||
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
|
||||
<imageName>skywalking/skywalking-webui</imageName>
|
||||
<imageTags>
|
||||
<imageTag>${project.version}</imageTag>
|
||||
</imageTags>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/skywalking</targetPath>
|
||||
<directory>${project.build.directory}/${project.build.finalName}</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<targetPath>/classes</targetPath>
|
||||
<directory>${project.build.directory}/classes</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# the registry center connect url (Default: zookeeper)
|
||||
registrycenter.connect_url=127.0.0.1:2181
|
||||
registrycenter.connect_url=localhost:2181
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://localhost:3307/test
|
||||
jdbc.url=jdbc:mysql://localhost:3306/test
|
||||
jdbc.username=root
|
||||
jdbc.password=root
|
||||
jdbc.maxTotal=200
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
|
|
@ -10,10 +11,12 @@
|
|||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/jdbc
|
||||
http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
|
||||
|
||||
<!-- 配置数据源 -->
|
||||
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource">
|
||||
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" lazy-init="true">
|
||||
<property name="driverClassName" value="${jdbc.driverClassName}"/>
|
||||
<property name="jdbcUrl" value="${jdbc.url}"/>
|
||||
<property name="username" value="${jdbc.username}"/>
|
||||
|
|
@ -21,15 +24,19 @@
|
|||
</bean>
|
||||
|
||||
<bean id="jdbcTemplate"
|
||||
class="org.springframework.jdbc.core.JdbcTemplate">
|
||||
class="org.springframework.jdbc.core.JdbcTemplate" lazy-init="true">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="true">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<jdbc:initialize-database data-source="dataSource" enabled="true">
|
||||
<jdbc:script location="classpath:table.mysql"/>
|
||||
</jdbc:initialize-database>
|
||||
|
||||
<!--AOP 事务配置-->
|
||||
<tx:advice id="txAdvice" transaction-manager="transactionManager">
|
||||
<tx:attributes>
|
||||
|
|
|
|||
Loading…
Reference in New Issue