diff --git a/.env b/.env index 8d61831..503fa94 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release ### Pinpoint-Hbase diff --git a/Readme.md b/Readme.md index 53ea9bc..bfb4ca6 100644 --- a/Readme.md +++ b/Readme.md @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 6375a12..9274010 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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} diff --git a/pinpoint-agent-attach-example/java/.env b/pinpoint-agent-attach-example/java/.env index 9e38698..f601ca7 100644 --- a/pinpoint-agent-attach-example/java/.env +++ b/pinpoint-agent-attach-example/java/.env @@ -1,4 +1,5 @@ ### Pinpoint with Java PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release AGENT_ID=app-in-docker APP_NAME=quickapp \ No newline at end of file diff --git a/pinpoint-agent-attach-example/java/Dockerfile b/pinpoint-agent-attach-example/java/Dockerfile index 2f53534..462da97 100644 --- a/pinpoint-agent-attach-example/java/Dockerfile +++ b/pinpoint-agent-attach-example/java/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="Roy Kim " 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 diff --git a/pinpoint-agent-attach-example/java/docker-compose.yml b/pinpoint-agent-attach-example/java/docker-compose.yml index 2c43fd1..bcb1d1f 100644 --- a/pinpoint-agent-attach-example/java/docker-compose.yml +++ b/pinpoint-agent-attach-example/java/docker-compose.yml @@ -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" diff --git a/pinpoint-agent-attach-example/tomcat/.env b/pinpoint-agent-attach-example/tomcat/.env index 3c773e2..0c99370 100644 --- a/pinpoint-agent-attach-example/tomcat/.env +++ b/pinpoint-agent-attach-example/tomcat/.env @@ -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 \ No newline at end of file diff --git a/pinpoint-agent-attach-example/tomcat/docker-compose.yml b/pinpoint-agent-attach-example/tomcat/docker-compose.yml index cb8d54d..5067c4a 100644 --- a/pinpoint-agent-attach-example/tomcat/docker-compose.yml +++ b/pinpoint-agent-attach-example/tomcat/docker-compose.yml @@ -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: diff --git a/pinpoint-agent/.env b/pinpoint-agent/.env index 212f451..4527676 100644 --- a/pinpoint-agent/.env +++ b/pinpoint-agent/.env @@ -1,4 +1,5 @@ PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release ### Pinpoint-Agent diff --git a/pinpoint-agent/build/scripts/configure-agent.sh b/pinpoint-agent/build/scripts/configure-agent.sh index 3e39791..58f3232 100644 --- a/pinpoint-agent/build/scripts/configure-agent.sh +++ b/pinpoint-agent/build/scripts/configure-agent.sh @@ -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 diff --git a/pinpoint-agent/docker-compose.yml b/pinpoint-agent/docker-compose.yml index a32a4c9..3217658 100644 --- a/pinpoint-agent/docker-compose.yml +++ b/pinpoint-agent/docker-compose.yml @@ -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} diff --git a/pinpoint-collector/.env b/pinpoint-collector/.env index 7067354..98a2b62 100644 --- a/pinpoint-collector/.env +++ b/pinpoint-collector/.env @@ -1,4 +1,5 @@ PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release ### Pinpoint-Collector diff --git a/pinpoint-collector/build/scripts/start-collector.sh b/pinpoint-collector/build/scripts/start-collector.sh index 99c7d54..42b52ff 100644 --- a/pinpoint-collector/build/scripts/start-collector.sh +++ b/pinpoint-collector/build/scripts/start-collector.sh @@ -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}/ \ No newline at end of file diff --git a/pinpoint-collector/docker-compose.yml b/pinpoint-collector/docker-compose.yml index 38dc749..0648297 100644 --- a/pinpoint-collector/docker-compose.yml +++ b/pinpoint-collector/docker-compose.yml @@ -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} diff --git a/pinpoint-hbase/Dockerfile b/pinpoint-hbase/Dockerfile index fa80411..ce84e43 100644 --- a/pinpoint-hbase/Dockerfile +++ b/pinpoint-hbase/Dockerfile @@ -2,7 +2,7 @@ FROM java:8-jdk LABEL maintainer="Roy Kim " -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 \ diff --git a/pinpoint-quickstart/.env b/pinpoint-quickstart/.env index 3ae23cf..d3002eb 100644 --- a/pinpoint-quickstart/.env +++ b/pinpoint-quickstart/.env @@ -1,4 +1,5 @@ PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release ### Pinpoint-Agent diff --git a/pinpoint-web/.env b/pinpoint-web/.env index 928b35e..4c9304d 100644 --- a/pinpoint-web/.env +++ b/pinpoint-web/.env @@ -1,4 +1,5 @@ PINPOINT_VERSION=2.0.1 +SPRING_PROFILES=release ### Pinpoint-Web diff --git a/pinpoint-web/docker-compose.yml b/pinpoint-web/docker-compose.yml index d23b185..2d3a961 100644 --- a/pinpoint-web/docker-compose.yml +++ b/pinpoint-web/docker-compose.yml @@ -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}