29 Commits
Author SHA1 Message Date
junv 5116f92218 add refer link to spring boot 2017-04-28 14:45:43 +08:00
junv c6a4593f79 update readme. 2017-04-28 14:41:22 +08:00
junv ef4f58a5d0 update pinpoint web point and update readme. 2017-04-28 14:33:13 +08:00
junv 1e2dcdb079 update version to 1.6.1. 2017-04-28 10:39:46 +08:00
Dawid Malinowski f5eb8d3712 Add example app 2017-01-08 14:01:34 +01:00
Dawid Malinowski 1ae4cfd8ba Fix library path 2017-01-08 13:58:56 +01:00
Dawid Malinowski 317c8adfcd Update to alpine 3.5 2017-01-08 13:31:53 +01:00
Dawid Malinowski b8a830af29 Bump to 1.6.0 2017-01-06 13:57:14 +01:00
Dawid Malinowski f4efdfaa6f Bump to 1.6.0-RC1 2016-11-16 01:49:54 +01:00
Dawid Malinowski 8f9b1ab8ad Merge pull request #1 from yezhiming/master
fix hbase web console ports
2016-05-03 09:26:05 +02:00
Dawid Malinowski 6298ab6f5a New version:
- bump to 1.5.2
- sync with pinpoint changes
- fix hbase web port
- add docker-compose.yml
2016-05-01 10:01:44 +02:00
Dawid Malinowski d6f5d5dddd Put more info to readme and use exec 2016-04-30 23:42:59 +02:00
Justin Yip 29f5197faa update hbase web ports 2016-01-13 12:14:59 +08:00
Dawid Malinowski 9041db14f8 Fix build 2015-12-12 16:20:50 +01:00
Dawid Malinowski 2186a22b0f Bum to 1.5.1 2015-12-12 15:30:03 +01:00
Dawid Malinowski 76f8b5b0f5 Bum to 1.5.1 2015-12-12 15:29:40 +01:00
Dawid Malinowski 6d4f9f4e1c Bum to 1.5.1 2015-12-12 15:28:45 +01:00
Dawid Malinowski 74f82e181f Bum to 1.5.1 2015-12-12 15:28:03 +01:00
Dawid Malinowski 700c23412d Disable DEBUG 2015-11-25 17:56:31 +01:00
Dawid Malinowski af10486d5c Provide real fix for urls 2015-11-24 13:49:27 +01:00
Dawid Malinowski 6cba1ae5f6 Revert "Fix curl"
This reverts commit a47d5defce.
2015-11-24 13:46:34 +01:00
Dawid Malinowski a47d5defce Fix curl 2015-11-24 13:41:48 +01:00
Dawid Malinowski fdf5bbee63 Fix file name 2015-11-24 12:42:51 +01:00
Dawid Malinowski 10d8097314 Last fixes 2015-11-24 10:31:24 +01:00
Dawid Malinowski daba4f795c Fix collector build 2015-11-24 10:31:24 +01:00
Dawid Malinowski 0d23f29289 Fix build 2015-11-24 10:31:24 +01:00
Dawid Malinowski 6c0c7ff3b9 Bump to pinpoint 1.5.0 and small refactoring 2015-11-24 10:31:24 +01:00
Dawid Malinowski 1cd36c9d09 Sync with pinpoint 2015-11-19 15:30:13 +01:00
Dawid Malinowski 1f8e479501 Clean curl 2015-10-05 21:16:51 +02:00
18 changed files with 279 additions and 389 deletions
+54
View File
@@ -1 +1,55 @@
# docker-pinpoint
This repo contains the docker images for [Pinpoint](https://github.com/naver/pinpoint), or you can just use the docker compose file run pinpoint in seconds.
### To build the images
* Go to a folder
* `docker build -t repo-name:latest .` to build the image
### To run all containers
```
docker-compose up -d
```
Open your browser and then go to <http://localhost:28080>
### Add your own Java based application to be monitored.
* Modify the `pinpoint.config` if you need.
```
###########################################################
# Collector server #
###########################################################
profiler.collector.ip=127.0.0.1
# placeHolder support "${key}"
profiler.collector.span.ip=${profiler.collector.ip}
profiler.collector.span.port=9996
# placeHolder support "${key}"
profiler.collector.stat.ip=${profiler.collector.ip}
profiler.collector.stat.port=9995
# placeHolder support "${key}"
profiler.collector.tcp.ip=${profiler.collector.ip}
profiler.collector.tcp.port=9994
```
* The following script is a example for a spring boot application.
```shell
java -javaagent:/some-absolute-path/pinpoint-agent-1.6.1/pinpoint-bootstrap-1.6.1.jar -Dpinpoint.agentId=some-union-id -Dpinpoint.applicationName=some-name -jar build/libs/wise-log-1.0.0-SNAPSHOT.jar
```
You can find more samples at: <https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples>
If you plan to use external volumes for hbase you should fill hbase first.
Please run this script inside hbase container
```
${HBASE_HOME}/bin/hbase shell /opt/hbase/hbase-create.hbase; ${HBASE_HOME}/bin/stop-hbase.sh
```
+22
View File
@@ -0,0 +1,22 @@
rancher-server:
image: rancher/server:v1.3.0
restart: unless-stopped
volumes_from:
- pinpoint-agent
ports:
- 8080:8080
environment:
JAVA_OPTS: "-javaagent:/assets/pinpoint-agent/pinpoint-bootstrap-1.6.1.jar -Dpinpoint.agentId=app-in-docker -Dpinpoint.applicationName=app"
pinpoint-agent:
image: wahyd4/pinpoint-agent:1.6.1
net: "none"
restart: unless-stopped
# volumes:
# - /var/container_data/pinpoint-agent/log:/opt/app/pinpoint-agent/log:rw
environment:
COLLECTOR_IP: 192.168.99.100
COLLECTOR_TCP_PORT: 9994
COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
DISABLE_DEBUG: 'true'
+69
View File
@@ -0,0 +1,69 @@
pinpoint-hbase:
container_name: pinpoint-hbase
hostname: hbase
image: wahyd4/pinpoint-hbase:1.6.1
restart: always
expose:
- "2181"
- "16010"
ports:
- "2181:2181"
- "16010:16010"
pinpoint-collector:
container_name: pinpoint-collector
hostname: collector
image: wahyd4/pinpoint-collector:1.6.1
restart: always
expose:
- "9994"
- "9995"
- "9996"
ports:
- "9994:9994"
- "9995:9995/tcp"
- "9996:9996/tcp"
- "9995:9995/udp"
- "9996:9996/udp"
environment:
HBASE_HOST: hbase
HBASE_PORT: 2181
COLLECTOR_TCP_PORT: 9994
COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
CLUSTER_ENABLE: 'false'
DISABLE_DEBUG: 'true'
links:
- pinpoint-hbase:hbase
pinpoint-web:
container_name: pinpoint-web
hostname: web
image: wahyd4/pinpoint-web:1.6.1
restart: always
expose:
- "8080"
ports:
- "28080:8080"
environment:
HBASE_HOST: hbase
HBASE_PORT: 2181
CLUSTER_ENABLE: 'false'
ADMIN_PASSWORD: admin123
DISABLE_DEBUG: 'true'
links:
- pinpoint-hbase:hbase
# only example
#pinpoint-agent:
# image: wahyd4/pinpoint-agent:1.6.1
# net: "none"
# restart: unless-stopped
# volumes:
# - /var/container_data/pinpoint-agent/log:/opt/app/pinpoint-agent/log:rw
# environment:
# COLLECTOR_IP: 192.168.99.100
# COLLECTOR_TCP_PORT: 9994
# COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
# COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
# DISABLE_DEBUG: 'true'
+12 -11
View File
@@ -2,23 +2,24 @@
# TO_BUILD docker build -t pinpoint-agent .
# TO_RUN docker run --name=pinpoint-agent pinpoint-agent
FROM alpine:3.2
FROM alpine:3.5
ENV PINPOINT_VERSION 1.1.1
ENV PINPOINT_VERSION=1.6.1
RUN apk add --update curl bash
ADD configure-agent.sh /usr/local/bin/
RUN mkdir -p /opt/app \
&& curl -L -O -k "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-agent-$PINPOINT_VERSION.tar.gz" -o pinpoint-agent.tar.gz \
RUN apk add --update curl bash \
&& chmod a+x /usr/local/bin/configure-agent.sh \
&& mkdir -p /assets/pinpoint-agent \
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/agent/src/main/resources/pinpoint.config -o /assets/pinpoint.config \
&& curl -SL https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-agent-$PINPOINT_VERSION.tar.gz -o pinpoint-agent-$PINPOINT_VERSION.tar.gz \
&& gunzip pinpoint-agent-$PINPOINT_VERSION.tar.gz \
&& tar -xf pinpoint-agent-$PINPOINT_VERSION.tar -C /opt/app \
&& tar -xf pinpoint-agent-$PINPOINT_VERSION.tar -C /assets/pinpoint-agent \
&& sed -i 's/DEBUG/INFO/' /assets/pinpoint-agent/lib/log4j.xml \
&& rm pinpoint-agent-$PINPOINT_VERSION.tar \
&& apk del curl \
&& rm /var/cache/apk/*
ADD configure.sh /configure.sh
RUN chmod a+x /configure.sh
VOLUME ["/assets/pinpoint-agent"]
VOLUME /opt/app/pinpoint-agent
CMD ["/configure.sh"]
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
set -x
COLLECTOR_IP=${COLLECTOR_IP:-127.0.0.1}
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-9994}
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-9995}
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-9996}
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
cp -f /assets/pinpoint.config /assets/pinpoint-agent/pinpoint.config
sed -i "s/profiler.collector.ip=127.0.0.1/profiler.collector.ip=${COLLECTOR_IP}/g" /assets/pinpoint-agent/pinpoint.config
sed -i "s/profiler.collector.tcp.port=9994/profiler.collector.tcp.port=${COLLECTOR_TCP_PORT}/g" /assets/pinpoint-agent/pinpoint.config
sed -i "s/profiler.collector.stat.port=9995/profiler.collector.stat.port=${COLLECTOR_UDP_STAT_LISTEN_PORT}/g" /assets/pinpoint-agent/pinpoint.config
sed -i "s/profiler.collector.span.port=9996/profiler.collector.span.port=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/g" /assets/pinpoint-agent/pinpoint.config
if [ "$DISABLE_DEBUG" == "true" ]; then
sed -i 's/level value="DEBUG"/level value="INFO"/' /assets/lib/log4j.xml
fi
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
set -e
set -x
COLLECTOR_IP=${COLLECTOR_IP:-}
sed -i 's/profiler.collector.ip=127.0.0.1/profiler.collector.ip='"${COLLECTOR_IP}"'/' /opt/app/pinpoint-agent/pinpoint.config
-209
View File
@@ -1,209 +0,0 @@
#
# Pinpoint agent configuration
#
###########################################################
# Collector server #
###########################################################
profiler.collector.ip=collector
# placeHolder support "${key}"
profiler.collector.span.ip=${profiler.collector.ip}
profiler.collector.span.port=9996
# placeHolder support "${key}"
profiler.collector.stat.ip=${profiler.collector.ip}
profiler.collector.stat.port=9995
# placeHolder support "${key}"
profiler.collector.tcp.ip=${profiler.collector.ip}
profiler.collector.tcp.port=9994
###########################################################
# Profiler Global Configuration #
###########################################################
profiler.enable=true
profiler.jvm.collect.interval=1000
profiler.sampling.enable=true
# Set sampling rate. If you set it to 10, 1 out of 10 transaction will be sampled.
profiler.sampling.rate=1
profiler.io.buffering.enable=true
profiler.io.buffering.buffersize=20
profiler.spandatasender.write.queue.size=5120
#profiler.spandatasender.socket.sendbuffersize=1048576
#profiler.spandatasender.socket.timeout=3000
profiler.spandatasender.chunk.size=16384
profiler.statdatasender.write.queue.size=5120
#profiler.statdatasender.socket.sendbuffersize=1048576
#profiler.statdatasender.socket.timeout=3000
profiler.statdatasender.chunk.size=16384
profiler.agentInfo.send.retry.interval=300000
# Allows TCP data command
profiler.tcpdatasender.command.accept.enable=true
###########################################################
# application type #
###########################################################
#profiler.applicationservertype=TOMCAT
#profiler.applicationservertype=BLOC
###########################################################
# user defined classes #
###########################################################
profiler.include=
###########################################################
# TOMCAT #
###########################################################
profiler.tomcat.hidepinpointheader=true
profiler.tomcat.excludeurl=/aa/test.html, /bb/exclude.html
###########################################################
# JDBC #
###########################################################
profiler.jdbc=true
profiler.jdbc.sqlcachesize=1024
profiler.jdbc.maxsqlbindvaluesize=1024
#
# MYSQL
#
profiler.jdbc.mysql=true
profiler.jdbc.mysql.setautocommit=true
profiler.jdbc.mysql.commit=true
profiler.jdbc.mysql.rollback=true
#
# MSSQL Jtds
#
profiler.jdbc.jtds=true
profiler.jdbc.jtds.setautocommit=true
profiler.jdbc.jtds.commit=true
profiler.jdbc.jtds.rollback=true
#
# Oracle
#
profiler.jdbc.oracle=true
profiler.jdbc.oracle.setautocommit=true
profiler.jdbc.oracle.commit=true
profiler.jdbc.oracle.rollback=true
#
# CUBRID
#
profiler.jdbc.cubrid=true
profiler.jdbc.cubrid.setautocommit=true
profiler.jdbc.cubrid.commit=true
profiler.jdbc.cubrid.rollback=true
#
# DBCP
#
profiler.jdbc.dbcp=true
profiler.jdbc.dbcp.connectionclose=true
###########################################################
# Apache HTTP Client 3.x #
###########################################################
profiler.apache.httpclient3=true
profiler.apache.httpclient3.cookie=true
# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
profiler.apache.httpclient3.cookie.dumptype=ALWAYS
profiler.apache.httpclient3.cookie.sampling.rate=1
# Dump entities of POST or PUT request. limited to entities which is HttpEtity.isRepeatable() == true.
profiler.apache.httpclient3.entity=true
# When entities should be dumped. ALWAYS or EXCEPTION.
profiler.apache.httpclient3.entity.dumptype=ALWAYS
profiler.apache.httpclient3.entity.sampling.rate=1
###########################################################
# Apache HTTP Client 4.x #
###########################################################
profiler.apache.httpclient4=true
profiler.apache.httpclient4.cookie=true
# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
profiler.apache.httpclient4.cookie.dumptype=ALWAYS
profiler.apache.httpclient4.cookie.sampling.rate=1
# Dump entities of POST or PUT request. limited to entities which is HttpEtity.isRepeatable() == true.
profiler.apache.httpclient4.entity=true
# When entities should be dumped. ALWAYS or EXCEPTION.
profiler.apache.httpclient4.entity.dumptype=ALWAYS
profiler.apache.httpclient4.entity.sampling.rate=1
# Can profile status code value
profiler.apache.httpclient4.entity.statuscode=true
# Not supported yet
#profiler.apache.nio.httpclient4=true
###########################################################
# Ning Async HTTP Client #
###########################################################
profiler.ning.asynchttpclient=true
profiler.ning.asynchttpclient.cookie=true
profiler.ning.asynchttpclient.cookie.dumptype=ALWAYS
profiler.ning.asynchttpclient.cookie.dumpsize=1024
profiler.ning.asynchttpclient.cookie.sampling.rate=1
profiler.ning.asynchttpclient.entity=true
profiler.ning.asynchttpclient.entity.dumptype=ALWAYS
profiler.ning.asynchttpclient.entity.dumpsize=1024
profiler.ning.asynchttpclient.entity.sampling.rate=1
profiler.ning.asynchttpclient.param=true
profiler.ning.asynchttpclient.param.dumptype=ALWAYS
profiler.ning.asynchttpclient.param.dumpsize=1024
profiler.ning.asynchttpclient.param.sampling.rate=1
###########################################################
# Arcus #
###########################################################
profiler.arcus=true
profiler.arcus.keytrace=true
###########################################################
# Memcached #
###########################################################
profiler.memcached=true
profiler.memcached.keytrace=true
###########################################################
# ibatis #
###########################################################
profiler.orm.ibatis=true
###########################################################
# mybatis #
###########################################################
profiler.orm.mybatis=true
###########################################################
# spring-beans
###########################################################
profiler.spring.beans=true
profiler.spring.beans.name.pattern=
profiler.spring.beans.class.pattern=
profiler.spring.beans.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
+10 -12
View File
@@ -4,9 +4,15 @@
FROM tomcat:8-jre8
ENV PINPOINT_VERSION 1.1.1
ENV PINPOINT_VERSION=1.6.1
RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-collector-$PINPOINT_VERSION.war" -o pinpoint-collector.war \
ADD start-collector.sh /usr/local/bin/
RUN chmod a+x /usr/local/bin/start-collector.sh \
&& mkdir -p /assets \
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/collector/src/main/resources/pinpoint-collector.properties -o /assets/pinpoint-collector.properties \
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/collector/src/main/resources/hbase.properties -o /assets/hbase.properties \
&& curl -SL https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-collector-$PINPOINT_VERSION.war -o pinpoint-collector.war \
&& rm -rf /usr/local/tomcat/webapps \
&& mkdir -p /usr/local/tomcat/webapps \
&& sed -i -e 's/8005/9005/' /usr/local/tomcat/conf/server.xml \
@@ -16,14 +22,6 @@ RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERS
&& unzip pinpoint-collector.war -d /usr/local/tomcat/webapps/ROOT \
&& rm -rf pinpoint-collector.war
ADD start.sh /usr/local/tomcat/start.sh
RUN chmod a+x /usr/local/tomcat/start.sh
EXPOSE 9994 9995 9996
ADD hbase.properties /assets/hbase.properties
ADD pinpoint-collector.properties /assets/pinpoint-collector.properties
EXPOSE 9994
EXPOSE 9995
EXPOSE 9996
CMD ["/usr/local/tomcat/start.sh"]
ENTRYPOINT ["/usr/local/bin/start-collector.sh"]
-22
View File
@@ -1,22 +0,0 @@
hbase.client.host=HBASE_HOST
hbase.client.port=HBASE_PORT
# hbase timeout option==================================================================================
# hbase default:true
hbase.ipc.client.tcpnodelay=true
# hbase default:60000
hbase.rpc.timeout=10000
# hbase default:Integer.MAX_VALUE
hbase.client.operation.timeout=10000
# hbase socket read timeout. default: 200000
hbase.ipc.client.socket.timeout.read=20000
# socket write timeout. hbase default: 600000
hbase.ipc.client.socket.timeout.write=60000
# ==================================================================================
# hbase client thread pool option
hbase.client.thread.max=128
hbase.client.threadPool.queueSize=5120
# prestartAllCoreThreads
hbase.client.threadPool.prestart=false
@@ -1,30 +0,0 @@
# tcp listen ip
collector.tcpListenIp=0.0.0.0
collector.tcpListenPort=COLLECTOR_TCP_PORT
# udp listen ip
collector.udpStatListenIp=0.0.0.0
collector.udpStatListenPort=COLLECTOR_UDP_STAT_LISTEN_PORT
collector.l4.ip=
collector.udpStatWorkerThread=16
collector.udpStatWorkerQueueSize=512
collector.udpStatSocketReceiveBufferSize=4194304
# span listen port ---------------------------------------------------------------------
collector.udpSpanListenIp=0.0.0.0
collector.udpSpanListenPort=COLLECTOR_UDP_SPAN_LISTEN_PORT
collector.udpSpanWorkerThread=32
collector.udpSpanWorkerQueueSize=1024
collector.udpSpanSocketReceiveBufferSize=4194304
statistics.flushPeriod=1000
cluster.enable=false
cluster.zookeeper.address=
cluster.zookeeper.sessiontimeout=
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
set -e
set -x
CLUSTER_ENABLE=${CLUSTER_ENABLE:-false}
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-9994}
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-9995}
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-9996}
HBASE_HOST=${HBASE_HOST:-localhost}
HBASE_PORT=${HBASE_PORT:-2181}
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
cp /assets/pinpoint-collector.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "s/cluster.enable=true/cluster.enable=${CLUSTER_ENABLE}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "s/collector.tcpListenPort=9994/collector.tcpListenPort=${COLLECTOR_TCP_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "s/collector.udpStatListenPort=9995/collector.udpStatListenPort=${COLLECTOR_UDP_STAT_LISTEN_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "s/collector.udpSpanListenPort=9996/collector.udpSpanListenPort=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "s/hbase.client.host=localhost/hbase.client.host=${HBASE_HOST}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "s/hbase.client.port=2181/hbase.client.port=${HBASE_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
if [ "$DISABLE_DEBUG" == "true" ]; then
sed -i 's/level value="DEBUG"/level value="INFO"/' /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
fi
exec /usr/local/tomcat/bin/catalina.sh run
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash
set -e
set -x
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-}
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-}
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-}
HBASE_HOST=${HBASE_HOST:-}
HBASE_PORT=${HBASE_PORT:-}
cp /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties.bck
cp /assets/pinpoint-collector.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed 's/COLLECTOR_TCP_PORT/'"${COLLECTOR_TCP_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed 's/COLLECTOR_UDP_STAT_LISTEN_PORT/'"${COLLECTOR_UDP_STAT_LISTEN_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed 's/COLLECTOR_UDP_SPAN_LISTEN_PORT/'"${COLLECTOR_UDP_SPAN_LISTEN_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed 's/HBASE_HOST/'"${HBASE_HOST}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed 's/HBASE_PORT/'"${HBASE_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
/usr/local/tomcat/bin/catalina.sh run
+21 -21
View File
@@ -1,41 +1,41 @@
# DESCRIPTION Pinpoint APM HBase (Data Storage)
# TO_BUILD docker build -t pinpoint-hbase .
# TO_RUN docker run -d --net=host -p 2181:2181 -p 60000:60000 -p 60010:60010 -p 60020:60020 -p 60030:60030 --name=pinpoint-hbase pinpoint-hbase
# TO_RUN docker run -d --net=host -p 2181:2181 -p 60000:60000 -p 16010:16010 -p 60020:60020 -p 16030:16030 --name=pinpoint-hbase pinpoint-hbase
FROM java:8-jdk
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
ENV HBASE_VERSION 1.0.2
ENV HBASE_HOME /opt/hbase/hbase-$HBASE_VERSION
ENV PINPOINT_VERSION 1.1.1
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV HBASE_VERSION=1.2.3
ENV HBASE_HOME=/opt/hbase/hbase-$HBASE_VERSION
ENV PINPOINT_VERSION=1.6.1
ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase
RUN mkdir -p /opt/hbase && \
cd /opt/hbase && \
curl -SL "http://apache.mirrors.pair.com/hbase/hbase-$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz && \
tar xfvz hbase.tar.gz && \
rm -rf hbase.tar.gz
RUN mkdir -p /opt/hbase \
&& cd /opt/hbase \
&& curl -fSL "$HBASE_REPOSITORY/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz || curl -fSL "$HBASE_SUB_REPOSITORY/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz \
&& tar xfvz hbase.tar.gz \
&& rm -rf hbase.tar.gz
ADD hbase-site.xml /opt/hbase/hbase-$HBASE_VERSION/conf/hbase-site.xml
RUN curl -SL "https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/scripts/hbase-create.hbase" -o /opt/hbase/hbase-create.hbase && \
$HBASE_HOME/bin/start-hbase.sh && \
sleep 10 && \
$HBASE_HOME/bin/hbase shell /opt/hbase/hbase-create.hbase && \
$HBASE_HOME/bin/stop-hbase.sh
RUN curl -SL "https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/hbase/scripts/hbase-create.hbase" -o /opt/hbase/hbase-create.hbase \
&& $HBASE_HOME/bin/start-hbase.sh \
&& sleep 10 \
&& $HBASE_HOME/bin/hbase shell /opt/hbase/hbase-create.hbase \
&& $HBASE_HOME/bin/stop-hbase.sh
VOLUME /home/pinpoint/hbase
VOLUME /home/pinpoint/zookeeper
VOLUME ["/home/pinpoint/hbase", "/home/pinpoint/zookeeper"]
# zookeeper
EXPOSE 2181
# HBase Master API port
EXPOSE 60000
# HBase Master Web UI
EXPOSE 60010
EXPOSE 16010
# Regionserver API port
EXPOSE 60020
# HBase Regionserver web UI
EXPOSE 60030
CMD /opt/hbase/hbase-$HBASE_VERSION/bin/hbase master start
EXPOSE 16030
ENTRYPOINT /opt/hbase/hbase-$HBASE_VERSION/bin/hbase master start
+9 -7
View File
@@ -4,14 +4,15 @@
FROM tomcat:8-jre8
ENV PINPOINT_VERSION 1.1.1
ENV PINPOINT_VERSION=1.6.1
ADD start.sh /usr/local/tomcat/start.sh
ADD hbase.properties /assets/hbase.properties
ADD pinpoint-web.properties /assets/pinpoint-web.properties
ADD start-web.sh /usr/local/bin/
RUN chmod a+x /usr/local/tomcat/start.sh\
&& curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-web-$PINPOINT_VERSION.war" -o pinpoint-web.war \
RUN chmod a+x /usr/local/bin/start-web.sh \
&& mkdir -p /assets/ \
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/web/src/main/resources/pinpoint-web.properties -o /assets/pinpoint-web.properties \
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/web/src/main/resources/hbase.properties -o /assets/hbase.properties \
&& curl -SL https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-web-$PINPOINT_VERSION.war -o pinpoint-web.war \
&& rm -rf /usr/local/tomcat/webapps \
&& mkdir -p /usr/local/tomcat/webapps \
&& unzip pinpoint-web.war -d /usr/local/tomcat/webapps/ROOT \
@@ -19,4 +20,5 @@ RUN chmod a+x /usr/local/tomcat/start.sh\
EXPOSE 8080
CMD ["/usr/local/tomcat/start.sh"]
ENTRYPOINT ["/usr/local/bin/start-web.sh"]
-22
View File
@@ -1,22 +0,0 @@
hbase.client.host=HBASE_HOST
hbase.client.port=HBASE_PORT
# hbase timeout option==================================================================================
# hbase default:true
hbase.ipc.client.tcpnodelay=true
# hbase default:60000
hbase.rpc.timeout=10000
# hbase default:Integer.MAX_VALUE
hbase.client.operation.timeout=10000
# hbase socket read timeout. default: 200000
hbase.ipc.client.socket.timeout.read=20000
# socket write timeout. hbase default: 600000
hbase.ipc.client.socket.timeout.write=60000
# ==================================================================================
# hbase client thread pool option
hbase.client.thread.max=128
hbase.client.threadPool.queueSize=5120
# prestartAllCoreThreads
hbase.client.threadPool.prestart=false
-13
View File
@@ -1,13 +0,0 @@
# local
cluster.enable=false
cluster.web.tcp.port=9995
cluster.zookeeper.address=
cluster.zookeeper.sessiontimeout=
# FIXME - should be removed for proper authentication
admin.password=admin
#log site link
#log.enable=false
#log.page.url=
#log.button.name=
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
set -x
CLUSTER_ENABLE=${CLUSTER_ENABLE:-false}
ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
HBASE_HOST=${HBASE_HOST:-localhost}
HBASE_PORT=${HBASE_PORT:-2181}
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
cp /assets/pinpoint-web.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "s/cluster.enable=true/cluster.enable=${CLUSTER_ENABLE}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
sed -i "s/admin.password=admin/admin.password=${ADMIN_PASSWORD}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
sed -i "s/hbase.client.host=localhost/hbase.client.host=${HBASE_HOST}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "s/hbase.client.port=2181/hbase.client.port=${HBASE_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
if [ "$DISABLE_DEBUG" == "true" ]; then
sed -i 's/level value="DEBUG"/level value="INFO"/' /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
fi
exec /usr/local/tomcat/bin/catalina.sh run
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
set -e
set -x
HBASE_HOST=${HBASE_HOST:-}
HBASE_PORT=${HBASE_PORT:-}
cp /assets/pinpoint-web.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed 's/HBASE_HOST/'"${HBASE_HOST}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed 's/HBASE_PORT/'"${HBASE_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
/usr/local/tomcat/bin/catalina.sh run