[#naver/pinpoint#6598] add spring profiles
This commit is contained in:
parent
d26879d8f0
commit
3748be1ab7
1
.env
1
.env
|
@ -1,4 +1,5 @@
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
|
|
||||||
### Pinpoint-Hbase
|
### Pinpoint-Hbase
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ It supports and helps you understand your application in a glance and allow you
|
||||||
|
|
||||||
## Supported Tags
|
## Supported Tags
|
||||||
|
|
||||||
- 2.0.1
|
- 2.0.1 (under going)
|
||||||
- 1.8.5
|
- 1.8.5
|
||||||
- 1.8.4
|
- 1.8.4
|
||||||
- 1.8.3
|
- 1.8.3
|
||||||
|
|
|
@ -80,6 +80,7 @@ services:
|
||||||
- "9997:9997"
|
- "9997:9997"
|
||||||
- "${WEB_PAGE_PORT:-8080}:8080"
|
- "${WEB_PAGE_PORT:-8080}:8080"
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||||
|
@ -137,6 +138,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- pinpoint
|
- pinpoint
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||||
- HBASE_HOST=${HBASE_HOST}
|
- HBASE_HOST=${HBASE_HOST}
|
||||||
|
@ -180,6 +182,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- data-volume:/pinpoint-agent
|
- data-volume:/pinpoint-agent
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
### Pinpoint with Java
|
### Pinpoint with Java
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
AGENT_ID=app-in-docker
|
AGENT_ID=app-in-docker
|
||||||
APP_NAME=quickapp
|
APP_NAME=quickapp
|
|
@ -5,7 +5,7 @@ LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||||
ARG PINPOINT_VERSION
|
ARG PINPOINT_VERSION
|
||||||
ARG AGENT_ID
|
ARG AGENT_ID
|
||||||
ARG APP_NAME
|
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
|
RUN mkdir -p javasample
|
||||||
COPY build/Sample.java javasample
|
COPY build/Sample.java javasample
|
||||||
|
|
|
@ -9,6 +9,7 @@ services:
|
||||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||||
- AGENT_ID=${AGENT_ID}
|
- AGENT_ID=${AGENT_ID}
|
||||||
- APP_NAME=${APP_NAME}
|
- APP_NAME=${APP_NAME}
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
container_name: "java"
|
container_name: "java"
|
||||||
image: "Your Image"
|
image: "Your Image"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
### Pinpoint with Tomcat
|
### Pinpoint with Tomcat
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
APP_PORT=8000
|
APP_PORT=8000
|
||||||
AGENT_ID=app-in-docker
|
AGENT_ID=app-in-docker
|
||||||
APP_NAME=quickapp
|
APP_NAME=quickapp
|
|
@ -13,7 +13,7 @@ services:
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- container:pinpoint-agent
|
- container:pinpoint-agent
|
||||||
environment:
|
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
|
command: catalina.sh run
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
|
|
||||||
### Pinpoint-Agent
|
### Pinpoint-Agent
|
||||||
|
|
||||||
|
|
|
@ -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.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.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.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
|
#ln -s /pinpoint-agent /pinpoint-agent
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- pinpoint-agent
|
- pinpoint-agent
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
|
|
||||||
### Pinpoint-Collector
|
### Pinpoint-Collector
|
||||||
|
|
||||||
|
|
|
@ -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.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 "/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.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/hbase.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
|
exec /usr/local/tomcat/bin/catalina.sh run
|
||||||
|
profiles/${SPRING_PROFILES}/
|
|
@ -24,6 +24,7 @@ services:
|
||||||
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
|
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||||
- HBASE_HOST=${HBASE_HOST}
|
- HBASE_HOST=${HBASE_HOST}
|
||||||
|
|
|
@ -2,7 +2,7 @@ FROM java:8-jdk
|
||||||
|
|
||||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
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_REPOSITORY=http://apache.mirrors.pair.com/hbase
|
||||||
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/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 \
|
&& 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 \
|
&& tar xfvz hbase.tar.gz \
|
||||||
&& mv ../../hbase-site.xml ../../${HBASE_HOME}/conf/hbase-site.xml \
|
&& 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 \
|
&& ${HBASE_HOME}/bin/start-hbase.sh \
|
||||||
&& sleep 10 \
|
&& sleep 10 \
|
||||||
&& ${HBASE_HOME}/bin/hbase shell ${BASE_DIR}/hbase-create.hbase \
|
&& ${HBASE_HOME}/bin/hbase shell ${BASE_DIR}/hbase-create.hbase \
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
|
|
||||||
### Pinpoint-Agent
|
### Pinpoint-Agent
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
PINPOINT_VERSION=2.0.1
|
PINPOINT_VERSION=2.0.1
|
||||||
|
SPRING_PROFILES=release
|
||||||
|
|
||||||
### Pinpoint-Web
|
### Pinpoint-Web
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ services:
|
||||||
- "9997:9997"
|
- "9997:9997"
|
||||||
- "${WEB_PAGE_PORT:-8080}:8080"
|
- "${WEB_PAGE_PORT:-8080}:8080"
|
||||||
environment:
|
environment:
|
||||||
|
- SPRING_PROFILES=${SPRING_PROFILES}
|
||||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||||
|
|
Loading…
Reference in New Issue