From 34cbc98aee004a0857e91cb415ec3277bc9825c5 Mon Sep 17 00:00:00 2001 From: Roy Kim Date: Tue, 17 Mar 2020 17:30:13 +0900 Subject: [PATCH] [#naver/pinpoint#6598] apply grpc --- .env | 17 +++++++++----- docker-compose.yml | 22 +++++++++---------- pinpoint-agent/.env | 9 +++++--- .../build/scripts/configure-agent.sh | 10 +++++---- pinpoint-agent/docker-compose.yml | 7 +++--- pinpoint-collector/.env | 7 +++--- .../build/scripts/start-collector.sh | 3 +-- pinpoint-collector/docker-compose.yml | 15 ++++++------- pinpoint-hbase/Dockerfile | 2 +- pinpoint-quickstart/.env | 9 +++++--- 10 files changed, 57 insertions(+), 44 deletions(-) diff --git a/.env b/.env index 503fa94..9c8e20b 100644 --- a/.env +++ b/.env @@ -54,13 +54,15 @@ MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=true MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=true MAIL_PROPERTIES_MAIL_DEBUG=false + ### Pinpoint-Collector PINPOINT_COLLECTOR_NAME=pinpoint-collector -COLLECTOR_RECEIVER_BASE_PORT=9994 -COLLECTOR_RECEIVER_STAT_UDP_PORT=9995 -COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996 +COLLECTOR_RECEIVER_AGENT_PORT=9991 +COLLECTOR_RECEIVER_METADATA_PORT=9991 +COLLECTOR_RECEIVER_STAT_PORT=9992 +COLLECTOR_RECEIVER_SPAN_PORT=9993 FLINK_CLUSTER_ENABLE=true FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1 @@ -72,9 +74,12 @@ COLLECTOR_DEBUG_LEVEL=INFO PINPOINT_AGENT_NAME=pinpoint-agent COLLECTOR_IP=pinpoint-collector -COLLECTOR_TCP_PORT=9994 -COLLECTOR_STAT_PORT=9995 -COLLECTOR_SPAN_PORT=9996 + +PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992 +PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993 + # Set sampling rate. If you set it to N, 1 out of N transaction will be sampled. PROFILER_SAMPLING_RATE=1 diff --git a/docker-compose.yml b/docker-compose.yml index 9274010..b096ed4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -126,15 +126,14 @@ services: - pinpoint-hbase restart: always expose: - - "9994" - - "9995" - - "9996" + - "9991" + - "9992" + - "9993" ports: - - "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994" - - "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp" - - "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp" - - "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp" - - "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp" + - "${COLLECTOR_RECEIVER_AGENT_PORT:-9991}:9991/udp" + - "${COLLECTOR_RECEIVER_METADATA_PORT:-9991}:9991/tcp" + - "${COLLECTOR_RECEIVER_STAT_PORT:-9992}:9992/udp" + - "${COLLECTOR_RECEIVER_SPAN_PORT:-9993}:9993/udp" networks: - pinpoint environment: @@ -184,9 +183,10 @@ services: environment: - SPRING_PROFILES=${SPRING_PROFILES} - COLLECTOR_IP=${COLLECTOR_IP} - - COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT} - - COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT} - - COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT} + - PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT} + - PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT} + - PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT} + - PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT} - PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE} - DEBUG_LEVEL=${AGENT_DEBUG_LEVEL} depends_on: diff --git a/pinpoint-agent/.env b/pinpoint-agent/.env index 4527676..39bf3ac 100644 --- a/pinpoint-agent/.env +++ b/pinpoint-agent/.env @@ -4,11 +4,14 @@ SPRING_PROFILES=release ### Pinpoint-Agent PINPOINT_AGENT_NAME=pinpoint-agent + #collector information required COLLECTOR_IP= -COLLECTOR_TCP_PORT=9994 -COLLECTOR_STAT_PORT=9995 -COLLECTOR_SPAN_PORT=9996 +PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992 +PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993 + # Set sampling rate. If you set it to N, 1 out of N transaction will be sampled. PROFILER_SAMPLING_RATE=1 diff --git a/pinpoint-agent/build/scripts/configure-agent.sh b/pinpoint-agent/build/scripts/configure-agent.sh index 58f3232..4ddbc01 100644 --- a/pinpoint-agent/build/scripts/configure-agent.sh +++ b/pinpoint-agent/build/scripts/configure-agent.sh @@ -2,10 +2,12 @@ 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.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config +sed -i "/profiler.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/profiles/${SPRING_PROFILES}/pinpoint-env.config +sed -i "/profiler.transport.grpc.agent.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config +sed -i "/profiler.transport.grpc.metadata.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config +sed -i "/profiler.transport.grpc.stat.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config +sed -i "/profiler.transport.grpc.span.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}/" /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/profiles/${SPRING_PROFILES}/log4j.xml diff --git a/pinpoint-agent/docker-compose.yml b/pinpoint-agent/docker-compose.yml index 3217658..210d807 100644 --- a/pinpoint-agent/docker-compose.yml +++ b/pinpoint-agent/docker-compose.yml @@ -19,9 +19,10 @@ services: environment: - SPRING_PROFILES=${SPRING_PROFILES} - COLLECTOR_IP=${COLLECTOR_IP} - - COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT} - - COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT} - - COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT} + - PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT} + - PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT} + - PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT} + - PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT} - PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE} - DEBUG_LEVEL=${AGENT_DEBUG_LEVEL} networks: diff --git a/pinpoint-collector/.env b/pinpoint-collector/.env index 98a2b62..4b41288 100644 --- a/pinpoint-collector/.env +++ b/pinpoint-collector/.env @@ -13,9 +13,10 @@ HBASE_PORT= PINPOINT_COLLECTOR_NAME=pinpoint-collector -COLLECTOR_RECEIVER_BASE_PORT=9994 -COLLECTOR_RECEIVER_STAT_UDP_PORT=9995 -COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996 +COLLECTOR_RECEIVER_AGENT_PORT=9991 +COLLECTOR_RECEIVER_METADATA_PORT=9991 +COLLECTOR_RECEIVER_STAT_PORT=9992 +COLLECTOR_RECEIVER_SPAN_PORT=9993 FLINK_CLUSTER_ENABLE=true FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1 diff --git a/pinpoint-collector/build/scripts/start-collector.sh b/pinpoint-collector/build/scripts/start-collector.sh index 42b52ff..157ff58 100644 --- a/pinpoint-collector/build/scripts/start-collector.sh +++ b/pinpoint-collector/build/scripts/start-collector.sh @@ -12,5 +12,4 @@ sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/RO 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 +exec /usr/local/tomcat/bin/catalina.sh run \ No newline at end of file diff --git a/pinpoint-collector/docker-compose.yml b/pinpoint-collector/docker-compose.yml index 0648297..1c8613e 100644 --- a/pinpoint-collector/docker-compose.yml +++ b/pinpoint-collector/docker-compose.yml @@ -13,15 +13,14 @@ services: restart: always expose: - - "9994" - - "9995" - - "9996" + - "9991" + - "9992" + - "9993" ports: - - "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994" - - "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp" - - "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp" - - "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp" - - "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp" + - "${COLLECTOR_RECEIVER_AGENT_PORT:-9991}:9991/udp" + - "${COLLECTOR_RECEIVER_METADATA_PORT:-9991}:9991/tcp" + - "${COLLECTOR_RECEIVER_STAT_PORT:-9992}:9992/udp" + - "${COLLECTOR_RECEIVER_SPAN_PORT:-9993}:9993/udp" environment: - SPRING_PROFILES=${SPRING_PROFILES} diff --git a/pinpoint-hbase/Dockerfile b/pinpoint-hbase/Dockerfile index 7291fcf..fa80411 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.0} +ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.1} ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase diff --git a/pinpoint-quickstart/.env b/pinpoint-quickstart/.env index d3002eb..297a6d5 100644 --- a/pinpoint-quickstart/.env +++ b/pinpoint-quickstart/.env @@ -4,11 +4,14 @@ SPRING_PROFILES=release ### Pinpoint-Agent PINPOINT_AGENT_NAME=pinpoint-agent + #collector information required COLLECTOR_IP= -COLLECTOR_TCP_PORT=9994 -COLLECTOR_STAT_PORT=9995 -COLLECTOR_SPAN_PORT=9996 +PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991 +PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992 +PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993 + # Set sampling rate. If you set it to N, 1 out of N transaction will be sampled. PROFILER_SAMPLING_RATE=1