[#naver/pinpoint#6598] add spring profiles

This commit is contained in:
Roy Kim 2020-03-16 16:01:28 +09:00 committed by Roy Kim
parent d26879d8f0
commit 3748be1ab7
18 changed files with 25 additions and 10 deletions

1
.env
View File

@ -1,4 +1,5 @@
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
### Pinpoint-Hbase

View File

@ -13,7 +13,7 @@ It supports and helps you understand your application in a glance and allow you
## Supported Tags
- 2.0.1
- 2.0.1 (under going)
- 1.8.5
- 1.8.4
- 1.8.3

View File

@ -80,6 +80,7 @@ services:
- "9997:9997"
- "${WEB_PAGE_PORT:-8080}:8080"
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
@ -137,6 +138,7 @@ services:
networks:
- pinpoint
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
- HBASE_HOST=${HBASE_HOST}
@ -180,6 +182,7 @@ services:
volumes:
- data-volume:/pinpoint-agent
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- COLLECTOR_IP=${COLLECTOR_IP}
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}

View File

@ -1,4 +1,5 @@
### Pinpoint with Java
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
AGENT_ID=app-in-docker
APP_NAME=quickapp

View File

@ -5,7 +5,7 @@ LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
ARG PINPOINT_VERSION
ARG AGENT_ID
ARG APP_NAME
ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dspring.profiles.active=${SPRING_PROFILES}"
RUN mkdir -p javasample
COPY build/Sample.java javasample

View File

@ -9,6 +9,7 @@ services:
- PINPOINT_VERSION=${PINPOINT_VERSION}
- AGENT_ID=${AGENT_ID}
- APP_NAME=${APP_NAME}
- SPRING_PROFILES=${SPRING_PROFILES}
container_name: "java"
image: "Your Image"

View File

@ -1,5 +1,6 @@
### Pinpoint with Tomcat
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
APP_PORT=8000
AGENT_ID=app-in-docker
APP_NAME=quickapp

View File

@ -13,7 +13,7 @@ services:
volumes_from:
- container:pinpoint-agent
environment:
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dspring.profiles.active=${SPRING_PROFILES}"
command: catalina.sh run
networks:

View File

@ -1,4 +1,5 @@
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
### Pinpoint-Agent

View File

@ -6,9 +6,9 @@ sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoi
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 "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" /pinpoint-agent/profiles/${SPRING_PROFILES}/pinpoint-env.config
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /pinpoint-agent/lib/log4j.xml
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /pinpoint-agent/profiles/${SPRING_PROFILES}/log4j.xml
#ln -s /pinpoint-agent /pinpoint-agent

View File

@ -17,6 +17,7 @@ services:
volumes:
- pinpoint-agent
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- COLLECTOR_IP=${COLLECTOR_IP}
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}

View File

@ -1,4 +1,5 @@
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
### Pinpoint-Collector

View File

@ -7,9 +7,10 @@ sed -i "/cluster.zookeeper.address=/ s/=.*/=${CLUSTER_ZOOKEEPER_ADDRESS}/g" /usr
sed -i "/flink.cluster.enable=/ s/=.*/=${FLINK_CLUSTER_ENABLE}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "/flink.cluster.zookeeper.address=/ s/=.*/=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
sed -i "/hbase.client.host=/ s/=.*/=${HBASE_HOST}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
sed -i "/hbase.client.host=/ s/=.*/=${HBASE_HOST}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/profiles/${SPRING_PROFILES}/hbase-env.properties
sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/profiles/${SPRING_PROFILES}/hbase-env.properties
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/profiles/${SPRING_PROFILES}/log4j.xml
exec /usr/local/tomcat/bin/catalina.sh run
profiles/${SPRING_PROFILES}/

View File

@ -24,6 +24,7 @@ services:
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
- HBASE_HOST=${HBASE_HOST}

View File

@ -2,7 +2,7 @@ FROM java:8-jdk
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.1}
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.0}
ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase
@ -19,7 +19,7 @@ RUN mkdir -p ${BASE_DIR} \
&& 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 \
&& mv ../../hbase-site.xml ../../${HBASE_HOME}/conf/hbase-site.xml \
&& curl -SL "https://raw.githubusercontent.com/naver/pinpoint/v${PINPOINT_VERSION}/hbase/scripts/hbase-create.hbase" -o ${BASE_DIR}/hbase-create.hbase \
&& curl -SL "https://raw.githubusercontent.com/naver/pinpoint/${PINPOINT_VERSION}/hbase/scripts/hbase-create.hbase" -o ${BASE_DIR}/hbase-create.hbase \
&& ${HBASE_HOME}/bin/start-hbase.sh \
&& sleep 10 \
&& ${HBASE_HOME}/bin/hbase shell ${BASE_DIR}/hbase-create.hbase \

View File

@ -1,4 +1,5 @@
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
### Pinpoint-Agent

View File

@ -1,4 +1,5 @@
PINPOINT_VERSION=2.0.1
SPRING_PROFILES=release
### Pinpoint-Web

View File

@ -19,6 +19,7 @@ services:
- "9997:9997"
- "${WEB_PAGE_PORT:-8080}:8080"
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}