提交 442c301f 编写于 作者: A ascrutae

完成镜像打包

上级 12b41c1d
FROM openjdk:8u111-jdk
ENV ALARM_COORDINATE_ZK_ADDRESS=localhost:2181 \
MYSQL_SERVER=localhost:3306 \
MYSQL_USER=root \
MYSQL_PASSWORD=root \
REDIS_SERVER=localhost:6379 \
ALARM_MAIL_HOST=smtp.mail.com \
MAIL_SSL_ENABLE=true \
MAIL_USER_NAME=skywalking \
MAIL_PASSWORD=skywalking \
MAIL_SENDER_MAIL=skywalking@mail.com \
WEBUI_DEPLOY_ADDRESS=localhost:8080 \
WEBUI_CONTEXT_NAME=skywalking
ADD skywalking-alarm.tar /usr/local/
COPY config.properties /usr/local/skywalking-alarm/config
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/local/skywalking-alarm/bin/sw-alarm-server.sh"]
#告警处理线程数
server.process_thread_size=2
#守护线程等待周期
server.daemon_thread_wait_interval=50000
#告警规则生效周期
server.alarm_rule_activity_interval=3600000
#处理线程等待周期
processthread.thread_wait_interval=5000
#zookeeper连接地址
zkpath.connect_str={ALARM_COORDINATE_ZK_ADDRESS}
#zookeeper连接超时时间(单位:毫秒)
zkpath.connect_timeout=1000
#zookeeper重试次数
zkpath.retry_times=3
#zookeeper重试超时时间(单位:毫秒)
zkpath.retry_timeout=1000
#告警规则的path前缀
zkpath.node_prefix=/skywalking
#告警服务的处理线程注册地址
zkpath.register_server_path=/skywalking/alarm-server/register-servers
#告警服务的协调器的竞争锁地址
zkpath.coordinator_path=/skywalking/alarm-server/coordinator/lock
#尝试成为协调器的竞争锁周期(单位:秒)
coordinator.retry_get_coordinator_lock_interval=5
#尝试成为协调器的等待时间(单位:毫秒)
coordinator.retry_become_coordinator_wait_time=10000
#检查是否需要重新分配的周期(单位:毫秒)
coordinator.check_redistribute_interval=5000
#检查所有处理线程的周期(单位:毫秒)
coordinator.check_all_process_thread_interval=500
#数据库驱动类
db.driver_class=com.mysql.jdbc.Driver
#数据库连接地址
db.url=jdbc:mysql://{MYSQL_SERVER}/test
#数据库用户名
db.user_name={MYSQL_USER}
#数据库密码
db.password={MYSQL_PASSWORD}
#数据库连接最大空闲数
db.max_idle=1
#数据库最大连接数
db.max_pool_size=20
#数据连接超时时间
db.connect_timeout=10000
#告警信息存在的redis服务器地址
alarm.redis_server={REDIS_SERVER}
#redis的最大空闲连接数
alarm.redis_max_idle=20
#redis的最小空闲连接数
alarm.redis_min_idle=1
#redis最大连接数
alarm.redis_max_total=50
#是否关闭告警发送
alarm.alarm_off_flag=false
alarm.checker.turn_on_exception_checker=true
#告警检查器:执行时间超时告警检查
alarm.checker.turn_on_execute_time_checker=true
#邮件发送配置id
mailsenderinfo.mail_host={ALARM_MAIL_HOST}
mailsenderinfo.transport_protocol=smtp
mailsenderinfo.smtp_auth=true
mailsenderinfo.smtp_start_ssl_enable={MAIL_SSL_ENABLE}
mailsenderinfo.username={MAIL_USER_NAME}
mailsenderinfo.password={MAIL_PASSWORD}
mailsenderinfo.sender={MAIL_SENDER_MAIL}
mailsenderinfo.ssl_enable={MAIL_SSL_ENABLE}
#邮件模板配置id
templateinfo.portal_url=http://{WEBUI_DEPLOY_ADDRESS}/{WEBUI_CONTEXT_NAME}
#尝试获取轮询锁的周期(单位:毫秒)
inspectthread.retry_get_inspect_lock_interval=10000
#尝试检查用户列表的周期(单位:毫秒)
inspectthread.check_user_list_interval=300000
#!/bin/bash #!/bin/bash
echo "replace ALARM_COORDINATE_ZK_ADDRESS with $ALARM_COORDINATE_ZK_ADDRESS"
eval sed -i -e 's/\{ALARM_COORDINATE_ZK_ADDRESS\}/$ALARM_COORDINATE_ZK_ADDRESS/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MYSQL_SERVER with $MYSQL_SERVER"
eval sed -i -e 's/\{MYSQL_SERVER\}/$MYSQL_SERVER/' /usr/local/skywalking-alarm/config/config.properties
exec "$@" echo "replace MYSQL_USER with $MYSQL_USER"
\ No newline at end of file eval sed -i -e 's/\{MYSQL_USER\}/$MYSQL_USER/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MYSQL_PASSWORD with $MYSQL_PASSWORD"
eval sed -i -e 's/\{MYSQL_PASSWORD\}/$MYSQL_PASSWORD/' /usr/local/skywalking-alarm/config/config.properties
echo "replace REDIS_SERVER with $REDIS_SERVER"
eval sed -i -e 's/\{REDIS_SERVER\}/$REDIS_SERVER/' /usr/local/skywalking-alarm/config/config.properties
echo "replcae ALARM_MAIL_HOST with $ALARM_MAIL_HOST"
eval sed -i -e 's/\{ALARM_MAIL_HOST\}/$ALARM_MAIL_HOST/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MAIL_SSL_ENABLE with $MAIL_SSL_ENABLE"
eval sed -i -e 's/\{MAIL_SSL_ENABLE\}/$MAIL_SSL_ENABLE/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MAIL_USER_NAME with $MAIL_USER_NAME"
eval sed -i -e 's/\{MAIL_USER_NAME\}/$MAIL_USER_NAME/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MAIL_PASSWORD with $MAIL_PASSWORD"
eval sed -i -e 's/\{MAIL_PASSWORD\}/$MAIL_PASSWORD/' /usr/local/skywalking-alarm/config/config.properties
echo "replace MAIL_SENDER_MAIL with $MAIL_SENDER_MAIL"
eval sed -i -e 's/\{MAIL_SENDER_MAIL\}/$MAIL_SENDER_MAIL/' /usr/local/skywalking-alarm/config/config.properties
echo "replace WEBUI_DEPLOY_ADDRESS with $WEBUI_DEPLOY_ADDRESS"
eval sed -i -e 's/\{WEBUI_DEPLOY_ADDRESS\}/$WEBUI_DEPLOY_ADDRESS/' /usr/local/skywalking-alarm/config/config.properties
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
exec "$@"
...@@ -106,7 +106,19 @@ ...@@ -106,7 +106,19 @@
<artifactId>docker-maven-plugin</artifactId> <artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version> <version>${docker.plugin.version}</version>
<configuration> <configuration>
<skipDocker>true</skipDocker> <skipDocker>false</skipDocker>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<imageName>skywalking/skywalking-alarm</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
</imageTags>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${build.finalName}.tar</include>
</resource>
</resources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,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"> 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></id> <id></id>
<formats> <formats>
<format>zip</format> <format>tar</format>
</formats> </formats>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
......
FROM openjdk:8u111-jdk
ENV SERVER_PORT=23000 \
REGISTRY_CENTER_URL=localhost:2181 \
ALARM_REDIS_SERVER=localhost:6379
ADD skywalking-routing.tar /usr/local/
COPY config.properties /usr/local/skywalking-routing/config/
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/local/skywalking-routing/bin/routingServer.sh"]
# the port which routing server listening
server.port={SERVER_PORT}
#
#search.check_cycle=100
#
#search.timeout=3000
# the type of registry center (default: zookeeper)
#registrycenter.type=zookeeper
# the connect url that registry center
registrycenter.connect_url={REGISTRY_CENTER_URL}
# auth schema that registry center
#registrycenter.auth_schema=
# the auth info that registry center
#registrycenter.auth_info=
#
#registrycenter.path_prefix=/skywalking/routing_list/
#
#storagenode.subscribe_path=/skywalking/storage_list
#
#disruptor.buffer_size=524288
#
#disruptor.flush_size=100
# the connect url for alarm
alarm.redis_server={ALARM_REDIS_SERVER}
#
#alarm.alarm_off_flag=true
#
#alarm.alarm_exception_stack_length=300
#
#alarm.alarm_redis_inspector_interval=100
#
#alarm.redis_max_idle=10
#
#alarm.redis_min_idle=1
#
#alarm.redis_max_total=30
#
#alarm.alarm_expire_seconds=3600000
\ No newline at end of file
#!/bin/bash #!/bin/bash
echo "replace SERVER_PORT with $SERVER_PORT"
eval sed -i -e 's/\{SERVER_PORT\}/$SERVER_PORT/' /usr/local/skywalking-routing/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-routing/config/config.properties
echo "replace ALARM_REDIS_SERVER whit $ALARM_REDIS_SERVER"
eval sed -i -e 's/\{ALARM_REDIS_SERVER\}/$ALARM_REDIS_SERVER/' /usr/local/skywalking-routing/config/config.properties
exec "$@" exec "$@"
\ No newline at end of file
...@@ -58,12 +58,33 @@ ...@@ -58,12 +58,33 @@
</goals> </goals>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor> <descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors> </descriptors>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<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-routing</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
</imageTags>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${build.finalName}.tar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,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"> 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></id> <id></id>
<formats> <formats>
<format>zip</format> <format>tar</format>
</formats> </formats>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
......
FROM openjdk:8u111-jdk
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 /
RUN chmod +x /docker-entrypoint.sh
VOLUME ["/usr/local/skywalking-storage/data/file", "/usr/local/skywalking-storage/data/index/data"]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/local/skywalking-storage/bin/storageServer.sh"]
# the port which storage server listening
server.port={SERVER_PORT}
#
# the size of channel which storage span data
#dataconsumer.channel_size = 10
#
# the buffer size for each channel
#dataconsumer.buffer_size = 1000
#
# the size of data consumer
#dataconsumer.consumer_size = 5
#
# the path that storage data file
#datafile.path=/data/file
#
# the max size of data file (byte)
#datafile.size=50000000
#
# the auth info which registry center
#registrycenter.auth_info=
#
# the auth schema which registry center
#registrycenter.auth_schema=
#
# the registry center connect url (Default: zookeeper)
registrycenter.connect_url={REGISTRY_CENTER_URL}
#
# the prefix of path that each storage node register
#registrycenter.path_prefix=/skywalking/storage_list/
#
# the level1 size of block index engine
#blockindexengine.l1_cache_size=10
#
# the cached size of finder
#finder.cached_size=10
#
# the max pool size of data source that finder operate
#finder.datasource.max_pool_size=20
#
# the min idle of data source that finder operate
#finder.datasource.min_idle=5
#
# the total size of finder
#indexoperator.finder.total=50
#
# the max idel of finder
#indexoperator.finder.idel=20
#!/bin/bash #!/bin/bash
echo "replace SERVER_PORT with $SERVER_PORT"
eval sed -i -e 's/\{SERVER_PORT\}/$SERVER_PORT/' /usr/local/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
exec "$@" exec "$@"
\ No newline at end of file
...@@ -106,6 +106,27 @@ ...@@ -106,6 +106,27 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<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-storage</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
</imageTags>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${build.finalName}.tar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,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"> 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></id> <id></id>
<formats> <formats>
<format>zip</format> <format>tar</format>
</formats> </formats>
<dependencySets> <dependencySets>
<dependencySet> <dependencySet>
......
...@@ -5,7 +5,8 @@ ENV JPDA_ADDRESS="8000" \ ...@@ -5,7 +5,8 @@ ENV JPDA_ADDRESS="8000" \
MYSQL_URL=localhost:3306 \ MYSQL_URL=localhost:3306 \
MYSQL_USER=root \ MYSQL_USER=root \
MYSQL_PASSWORD=root \ MYSQL_PASSWORD=root \
REGISTRY_CENTER_URL=localhost:2181 REGISTRY_CENTER_URL=localhost:2181 \
JDBC_INIT_DB=true
COPY skywalking /usr/local/tomcat/webapps/skywalking COPY skywalking /usr/local/tomcat/webapps/skywalking
COPY classes /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/ COPY classes /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/
......
...@@ -10,6 +10,9 @@ eval sed -i -e 's/\{mysql-username\}/$MYSQL_USER/' /usr/local/tomcat/webapps/sky ...@@ -10,6 +10,9 @@ eval sed -i -e 's/\{mysql-username\}/$MYSQL_USER/' /usr/local/tomcat/webapps/sky
echo "replace mysql-password with $MYSQL_PASSWORD" 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 eval sed -i -e 's/\{mysql-password\}/$MYSQL_PASSWORD/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/jdbc.properties
echo "replace jdbc_init_db with $JDBC_INIT_DB"
eval sed -i -e 's/\{init_db\}/$JDBC_INIT_DB/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/jdbc.properties
echo "replace registry_center_url with $REGISTRY_CENTER_URL" 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 eval sed -i -e 's/\{registry_center_url\}/$REGISTRY_CENTER_URL/' /usr/local/tomcat/webapps/skywalking/WEB-INF/classes/config.properties
......
...@@ -6,3 +6,4 @@ jdbc.maxTotal=200 ...@@ -6,3 +6,4 @@ jdbc.maxTotal=200
jdbc.maxIdle=50 jdbc.maxIdle=50
jdbc.maxWaitMillis=1000 jdbc.maxWaitMillis=1000
jdbc.defaultAutoCommit=false jdbc.defaultAutoCommit=false
jdbc.init_db={init_db}
...@@ -6,3 +6,4 @@ jdbc.maxTotal=200 ...@@ -6,3 +6,4 @@ jdbc.maxTotal=200
jdbc.maxIdle=50 jdbc.maxIdle=50
jdbc.maxWaitMillis=1000 jdbc.maxWaitMillis=1000
jdbc.defaultAutoCommit=false jdbc.defaultAutoCommit=false
jdbc.init_db=false
\ No newline at end of file
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<property name="dataSource" ref="dataSource"/> <property name="dataSource" ref="dataSource"/>
</bean> </bean>
<jdbc:initialize-database data-source="dataSource" enabled="true"> <jdbc:initialize-database data-source="dataSource" enabled="${jdbc.init_db}">
<jdbc:script location="classpath:table.mysql"/> <jdbc:script location="classpath:table.mysql"/>
</jdbc:initialize-database> </jdbc:initialize-database>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册