mirror of
https://github.com/wahyd4/docker-pinpoint.git
synced 2026-08-09 12:55:59 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5116f92218 | ||
|
|
c6a4593f79 | ||
|
|
ef4f58a5d0 | ||
|
|
1e2dcdb079 | ||
|
|
f5eb8d3712 | ||
|
|
1ae4cfd8ba | ||
|
|
317c8adfcd | ||
|
|
b8a830af29 | ||
|
|
f4efdfaa6f | ||
|
|
8f9b1ab8ad | ||
|
|
29f5197faa |
@@ -1,20 +1,53 @@
|
||||
# docker-pinpoint
|
||||
|
||||
Create docker machine
|
||||
```
|
||||
docker-machine create --driver virtualbox --virtualbox-disk-size "50000" --engine-storage-driver "overlay" --virtualbox-memory "4096" --virtualbox-cpu-count "8" docker-vm
|
||||
```
|
||||
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.
|
||||
|
||||
Configure your shell
|
||||
```
|
||||
eval "$(docker-machine env docker-vm)"
|
||||
```
|
||||
### To build the images
|
||||
* Go to a folder
|
||||
* `docker build -t repo-name:latest .` to build the image
|
||||
|
||||
### To run all containers
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
@@ -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'
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
pinpoint-hbase:
|
||||
container_name: pinpoint-hbase
|
||||
hostname: hbase
|
||||
image: dawidmalina/pinpoint-hbase:1.5.2
|
||||
image: wahyd4/pinpoint-hbase:1.6.1
|
||||
restart: always
|
||||
expose:
|
||||
- "2181"
|
||||
@@ -13,7 +13,7 @@ pinpoint-hbase:
|
||||
pinpoint-collector:
|
||||
container_name: pinpoint-collector
|
||||
hostname: collector
|
||||
image: dawidmalina/pinpoint-collector:1.5.2
|
||||
image: wahyd4/pinpoint-collector:1.6.1
|
||||
restart: always
|
||||
expose:
|
||||
- "9994"
|
||||
@@ -39,12 +39,12 @@ pinpoint-collector:
|
||||
pinpoint-web:
|
||||
container_name: pinpoint-web
|
||||
hostname: web
|
||||
image: dawidmalina/pinpoint-web:1.5.2
|
||||
image: wahyd4/pinpoint-web:1.6.1
|
||||
restart: always
|
||||
expose:
|
||||
- "8080"
|
||||
ports:
|
||||
- "3080:8080"
|
||||
- "28080:8080"
|
||||
environment:
|
||||
HBASE_HOST: hbase
|
||||
HBASE_PORT: 2181
|
||||
@@ -56,7 +56,7 @@ pinpoint-web:
|
||||
|
||||
# only example
|
||||
#pinpoint-agent:
|
||||
# image: dawidmalina/pinpoint-agent:1.5.2
|
||||
# image: wahyd4/pinpoint-agent:1.6.1
|
||||
# net: "none"
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
@@ -66,4 +66,4 @@ pinpoint-web:
|
||||
# COLLECTOR_TCP_PORT: 9994
|
||||
# COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
|
||||
# COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
|
||||
# DISABLE_DEBUG: 'true'
|
||||
# DISABLE_DEBUG: 'true'
|
||||
|
||||
@@ -2,25 +2,24 @@
|
||||
# TO_BUILD docker build -t pinpoint-agent .
|
||||
# TO_RUN docker run --name=pinpoint-agent pinpoint-agent
|
||||
|
||||
FROM alpine:3.3
|
||||
FROM alpine:3.5
|
||||
|
||||
ENV PINPOINT_VERSION=1.5.2
|
||||
ENV PINPOINT_VERSION=1.6.1
|
||||
|
||||
ADD configure-agent.sh /usr/local/bin/
|
||||
|
||||
RUN apk add --update curl bash \
|
||||
&& chmod a+x /usr/local/bin/configure-agent.sh \
|
||||
&& mkdir -p /assets \
|
||||
&& 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 /assets \
|
||||
&& if test -d /assets/pinpoint-agent-$PINPOINT_VERSION; then mv /assets/pinpoint-agent-$PINPOINT_VERSION /assets/pinpoint-agent; fi \
|
||||
&& 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/*
|
||||
|
||||
VOLUME /assets/pinpoint-agent
|
||||
VOLUME ["/assets/pinpoint-agent"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
|
||||
|
||||
@@ -18,5 +18,5 @@ sed -i "s/profiler.collector.stat.port=9995/profiler.collector.stat.port=${COLLE
|
||||
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/pinpoint-agent/lib/log4j.xml
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' /assets/lib/log4j.xml
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION=1.5.2
|
||||
ENV PINPOINT_VERSION=1.6.1
|
||||
|
||||
ADD start-collector.sh /usr/local/bin/
|
||||
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
FROM java:8-jdk
|
||||
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ENV HBASE_VERSION=1.0.3
|
||||
ENV HBASE_VERSION=1.2.3
|
||||
ENV HBASE_HOME=/opt/hbase/hbase-$HBASE_VERSION
|
||||
ENV PINPOINT_VERSION=1.5.2
|
||||
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 \
|
||||
&& 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
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION=1.5.2
|
||||
ENV PINPOINT_VERSION=1.6.1
|
||||
|
||||
ADD start-web.sh /usr/local/bin/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user