Initial updates
This commit is contained in:
17
pinpoint-agent/.env
Normal file
17
pinpoint-agent/.env
Normal file
@@ -0,0 +1,17 @@
|
||||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Agent
|
||||
|
||||
PINPOINT_AGENT_NAME=pinpoint-agent
|
||||
#collector information required
|
||||
COLLECTOR_IP=
|
||||
COLLECTOR_TCP_PORT=9994
|
||||
COLLECTOR_STAT_PORT=9995
|
||||
COLLECTOR_SPAN_PORT=9996
|
||||
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
|
||||
PROFILER_SAMPLING_RATE=1
|
||||
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
||||
|
||||
AGENT_DEBUG_LEVEL=INFO
|
||||
24
pinpoint-agent/Dockerfile
Normal file
24
pinpoint-agent/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM alpine:3.7
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.7.2}
|
||||
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/${PINPOINT_VERSION}/pinpoint-agent-${PINPOINT_VERSION}.tar.gz
|
||||
|
||||
COPY /build/scripts/configure-agent.sh /usr/local/bin/
|
||||
|
||||
RUN apk add --update curl bash \
|
||||
&& chmod a+x /usr/local/bin/configure-agent.sh \
|
||||
&& mkdir -p /pinpoint-agent \
|
||||
&& chmod -R o+x /pinpoint-agent \
|
||||
&& curl -SL ${INSTALL_URL} -o pinpoint-agent.tar.gz \
|
||||
&& gunzip pinpoint-agent.tar.gz \
|
||||
&& tar -xf pinpoint-agent.tar -C /pinpoint-agent \
|
||||
&& rm pinpoint-agent.tar \
|
||||
&& apk del curl \
|
||||
&& rm /var/cache/apk/*
|
||||
|
||||
VOLUME ["/pinpoint-agent"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
|
||||
CMD ["tail", "-f", "/dev/null"]
|
||||
15
pinpoint-agent/build/scripts/configure-agent.sh
Normal file
15
pinpoint-agent/build/scripts/configure-agent.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_STAT_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_SPAN_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" /pinpoint-agent/pinpoint.config
|
||||
|
||||
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /pinpoint-agent/lib/log4j.xml
|
||||
|
||||
#ln -s /pinpoint-agent /pinpoint-agent
|
||||
|
||||
exec "$@"
|
||||
37
pinpoint-agent/docker-compose.yml
Normal file
37
pinpoint-agent/docker-compose.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: "3.6"
|
||||
|
||||
#pinpoint-agent image will not usually be used alone
|
||||
services:
|
||||
pinpoint-agent:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_AGENT_NAME}"
|
||||
image: "pinpointdocker/pinpoint-agent:${PINPOINT_VERSION}"
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
- pinpoint-agent
|
||||
environment:
|
||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
|
||||
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
|
||||
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
#networks:
|
||||
# default:
|
||||
# external:
|
||||
# name: pinpoint
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user