Skip to content

Commit

Permalink
[#184] Apply changes in Pinpoint v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-ram committed Dec 27, 2023
1 parent 3258319 commit f5bcb0c
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 46 deletions.
37 changes: 24 additions & 13 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PINPOINT_VERSION=2.5.3
PINPOINT_VERSION=latest
SPRING_PROFILES=release

# Used to make collector ip fixed for external microservices which uses pinpoint agent with collector ip.
Expand Down Expand Up @@ -52,9 +52,12 @@ CONFIG_SHOW_APPLICATIONSTAT=true

#mysql information required if used
JDBC_DRIVERCLASSNAME=com.mysql.jdbc.Driver
JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
JDBC_USERNAME=admin
JDBC_PASSWORD=admin
SPRING_DATASOURCE_HIKARI_JDBCURL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
SPRING_DATASOURCE_HIKARI_USERNAME=admin
SPRING_DATASOURCE_HIKARI_PASSWORD=admin
SPRING_METADATASOURCE_HIKARI_JDBCURL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
SPRING_METADATASOURCE_HIKARI_USERNAME=admin
SPRING_METADATASOURCE_HIKARI_PASSWORD=admin

### Pinpoint-Collector

Expand Down Expand Up @@ -97,11 +100,13 @@ BATCH_FLINK_SERVER=pinpoint-flink-jobmanager

CONFIG_SHOW_APPLICATIONSTAT=true

#mysql information required if used
JDBC_DRIVERCLASSNAME=com.mysql.jdbc.Driver
JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
JDBC_USERNAME=admin
JDBC_PASSWORD=admin
#data source information required if used
SPRING_DATASOURCE_HIKARI_JDBCURL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
SPRING_DATASOURCE_HIKARI_USERNAME=admin
SPRING_DATASOURCE_HIKARI_PASSWORD=admin
SPRING_METADATASOURCE_HIKARI_JDBCURL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
SPRING_METADATASOURCE_HIKARI_USERNAME=admin
SPRING_METADATASOURCE_HIKARI_PASSWORD=admin

#mail server information required if used
ALARM_MAIL_SERVER_URL=smtp.gmail.com
Expand Down Expand Up @@ -157,9 +162,15 @@ FLINK_WEB_PORT=8081
APP_PORT=8085

### Pinpoint-pinot
PINPOINT_PINOT_JDBC_URL=jdbc:pinot://pinot-controller:9000
PINPOINT_PINOT_JDBC_USERNAME=admin
PINPOINT_PINOT_JDBC_PASSWORD=admin
SPRING_PINOTDATASOURCE_HIKARI_JDBCURL=jdbc:pinot://pinot-controller:9000
SPRING_PINOTDATASOURCE_HIKARI_USERNAME=admin
SPRING_PINOTDATASOURCE_HIKARI_PASSWORD=admin

### Pinpoint-kafka
PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS=pinpoint-kafka:9092
PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS=pinpoint-kafka:9092

### Pinpoint redis
SPRING_DATA_REDIS_HOST=pinpoint-redis
SPRING_DATA_REDIS_PORT=6379
SPRING_DATA_REDIS_USERNAME=default
SPRING_DATA_REDIS_PASSWORD=
57 changes: 39 additions & 18 deletions docker-compose-metric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,26 @@ services:
- LOGGING_LEVEL_ROOT=${WEB_LOGGING_LEVEL_ROOT}
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
- JDBC_DRIVERCLASSNAME=${JDBC_DRIVERCLASSNAME}
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- PINPOINT_PINOT_JDBC_URL=${PINPOINT_PINOT_JDBC_URL}
- PINPOINT_PINOT_JDBC_USERNAME=${PINPOINT_PINOT_JDBC_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${PINPOINT_PINOT_JDBC_PASSWORD}
- JDBC_URL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- JDBC_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- JDBC_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- PINPOINT_PINOT_JDBC_URL=${SPRING_PINOTDATASOURCE_HIKARI_JDBCURL}
- PINPOINT_PINOT_JDBC_USERNAME=${SPRING_PINOTDATASOURCE_HIKARI_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${SPRING_PINOTDATASOURCE_HIKARI_PASSWORD}
- SPRING_DATASOURCE_HIKARI_JDBCURL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- SPRING_DATASOURCE_HIKARI_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- SPRING_DATASOURCE_HIKARI_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- SPRING_METADATASOURCE_HIKARI_JDBCURL=${SPRING_METADATASOURCE_HIKARI_JDBCURL}
- SPRING_METADATASOURCE_HIKARI_USERNAME=${SPRING_METADATASOURCE_HIKARI_USERNAME}
- SPRING_METADATASOURCE_HIKARI_PASSWORD=${SPRING_METADATASOURCE_HIKARI_PASSWORD}
- SPRING_PINOTDATASOURCE_HIKARI_JDBCURL=${SPRING_PINOTDATASOURCE_HIKARI_JDBCURL}
- SPRING_PINOTDATASOURCE_HIKARI_USERNAME=${SPRING_PINOTDATASOURCE_HIKARI_USERNAME}
- SPRING_PINOTDATASOURCE_HIKARI_PASSWORD=${SPRING_PINOTDATASOURCE_HIKARI_PASSWORD}
- SPRING_DATA_REDIS_HOST=${SPRING_DATA_REDIS_HOST}
- SPRING_DATA_REDIS_PORT=${SPRING_DATA_REDIS_PORT}
- SPRING_DATA_REDIS_USERNAME=${SPRING_DATA_REDIS_USERNAME}
- SPRING_DATA_REDIS_PASSWORD=${SPRING_DATA_REDIS_PASSWORD}

links:
- "pinpoint-mysql:pinpoint-mysql"
networks:
Expand Down Expand Up @@ -84,10 +98,17 @@ services:
- LOGGING_LEVEL_ROOT=${COLLECTOR_LOGGING_LEVEL_ROOT}
- FLINK_CLUSTER_ENABLE=${FLINK_CLUSTER_ENABLE}
- FLINK_CLUSTER_ZOOKEEPER_ADDRESS=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}
- PINPOINT_PINOT_JDBC_URL=${PINPOINT_PINOT_JDBC_URL}
- PINPOINT_PINOT_JDBC_USERNAME=${PINPOINT_PINOT_JDBC_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${PINPOINT_PINOT_JDBC_PASSWORD}
- PINPOINT_PINOT_JDBC_URL=${SPRING_PINOTDATASOURCE_HIKARI_JDBCURL}
- PINPOINT_PINOT_JDBC_USERNAME=${SPRING_PINOTDATASOURCE_HIKARI_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${SPRING_PINOTDATASOURCE_HIKARI_PASSWORD}
- SPRING_PINOTDATASOURCE_HIKARI_JDBCURL=${SPRING_PINOTDATASOURCE_HIKARI_JDBCURL}
- SPRING_PINOTDATASOURCE_HIKARI_USERNAME=${SPRING_PINOTDATASOURCE_HIKARI_USERNAME}
- SPRING_PINOTDATASOURCE_HIKARI_PASSWORD=${SPRING_PINOTDATASOURCE_HIKARI_PASSWORD}
- PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS=${PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS}
- SPRING_DATA_REDIS_HOST=${SPRING_DATA_REDIS_HOST}
- SPRING_DATA_REDIS_PORT=${SPRING_DATA_REDIS_PORT}
- SPRING_DATA_REDIS_USERNAME=${SPRING_DATA_REDIS_USERNAME}
- SPRING_DATA_REDIS_PASSWORD=${SPRING_DATA_REDIS_PASSWORD}

pinpoint-kafka:
image: ubuntu/kafka:3.1-22.04_beta
Expand Down Expand Up @@ -162,14 +183,14 @@ services:
restart: "no"
entrypoint: >
sh -c "
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/uristat/uristat-common/src/main/pinot/pinot-uriStat-realtime-table.json > uriStatTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/uristat/uristat-common/src/main/pinot/pinot-uriStat-schema.json > uriStatSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-realtime-table.json > tagTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-schema.json > tagSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-realtime-table.json > doubleTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-schema.json > doubleSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-realtime-table.json > dataTypeTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-schema.json > dataTypeSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/uristat/uristat-common/src/main/pinot/pinot-uriStat-realtime-table.json > uriStatTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/uristat/uristat-common/src/main/pinot/pinot-uriStat-schema.json > uriStatSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-realtime-table.json > tagTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-schema.json > tagSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-realtime-table.json > doubleTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-schema.json > doubleSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-realtime-table.json > dataTypeTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-schema.json > dataTypeSchema.json &&
sed -i 's/localhost:19092/pinpoint-kafka:9092/g' uriStatTable.json tagTable.json doubleTable.json dataTypeTable.json &&
sed -i 's/.*replicasPerPartition.*/ \"replicasPerPartition\": \"1\",/g' uriStatTable.json tagTable.json doubleTable.json dataTypeTable.json &&
Expand Down Expand Up @@ -204,7 +225,7 @@ services:
- pinpoint-collector
entrypoint: >
sh -c "
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/telegraf/pinpoint-telegraf.conf > telegraf.conf &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/${PINPOINT_VERSION}/metric-module/metric/src/main/telegraf/pinpoint-telegraf.conf > telegraf.conf &&
sed -i 's/127.0.0.1/pinpoint-collector/g' telegraf.conf &&
telegraf -config telegraf.conf"
Expand Down
65 changes: 50 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@ services:
- zoo1

pinpoint-mysql:
build:
context: ./pinpoint-mysql/
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: pinpoint-mysql
restart: always
image: "pinpointdocker/pinpoint-mysql:${PINPOINT_VERSION}"
image: mysql:8.0
restart: no
hostname: pinpoint-mysql
entrypoint: >
sh -c "
curl -SL "https://raw.githubusercontent.com/ga-ram/pinpoint/latest/web/src/main/resources/sql/CreateTableStatement-mysql.sql" -o /docker-entrypoint-initdb.d/CreateTableStatement-mysql.sql &&
curl -SL "https://raw.githubusercontent.com/ga-ram/pinpoint/latest/web/src/main/resources/sql/SpringBatchJobRepositorySchema-mysql.sql" -o /docker-entrypoint-initdb.d/SpringBatchJobRepositorySchema-mysql.sql &&
sed -i '/^--/d' /docker-entrypoint-initdb.d/CreateTableStatement-mysql.sql &&
sed -i '/^--/d' /docker-entrypoint-initdb.d/SpringBatchJobRepositorySchema-mysql.sql &&
docker-entrypoint.sh mysqld
"
ports:
- "3306:3306"
environment:
Expand Down Expand Up @@ -87,6 +89,7 @@ services:
- pinpoint-hbase
- pinpoint-mysql
- zoo1
- redis
restart: always
expose:
- "9997"
Expand All @@ -103,9 +106,20 @@ services:
- LOGGING_LEVEL_ROOT=${WEB_LOGGING_LEVEL_ROOT}
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
- JDBC_DRIVERCLASSNAME=${JDBC_DRIVERCLASSNAME}
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- JDBC_URL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- JDBC_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- JDBC_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- SPRING_DATASOURCE_HIKARI_JDBCURL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- SPRING_DATASOURCE_HIKARI_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- SPRING_DATASOURCE_HIKARI_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- SPRING_METADATASOURCE_HIKARI_JDBCURL=${SPRING_METADATASOURCE_HIKARI_JDBCURL}
- SPRING_METADATASOURCE_HIKARI_USERNAME=${SPRING_METADATASOURCE_HIKARI_USERNAME}
- SPRING_METADATASOURCE_HIKARI_PASSWORD=${SPRING_METADATASOURCE_HIKARI_PASSWORD}
- SPRING_DATA_REDIS_HOST=${SPRING_DATA_REDIS_HOST}
- SPRING_DATA_REDIS_PORT=${SPRING_DATA_REDIS_PORT}
- SPRING_DATA_REDIS_USERNAME=${SPRING_DATA_REDIS_USERNAME}
- SPRING_DATA_REDIS_PASSWORD=${SPRING_DATA_REDIS_PASSWORD}

links:
- "pinpoint-mysql:pinpoint-mysql"
networks:
Expand All @@ -124,6 +138,7 @@ services:
depends_on:
- pinpoint-hbase
- zoo1
- redis
restart: always
expose:
- "9991"
Expand Down Expand Up @@ -151,6 +166,10 @@ services:
- LOGGING_LEVEL_ROOT=${COLLECTOR_LOGGING_LEVEL_ROOT}
- FLINK_CLUSTER_ENABLE=${FLINK_CLUSTER_ENABLE}
- FLINK_CLUSTER_ZOOKEEPER_ADDRESS=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}
- SPRING_DATA_REDIS_HOST=${SPRING_DATA_REDIS_HOST}
- SPRING_DATA_REDIS_PORT=${SPRING_DATA_REDIS_PORT}
- SPRING_DATA_REDIS_USERNAME=${SPRING_DATA_REDIS_USERNAME}
- SPRING_DATA_REDIS_PASSWORD=${SPRING_DATA_REDIS_PASSWORD}

pinpoint-quickstart:
build:
Expand All @@ -164,7 +183,7 @@ services:
volumes:
- data-volume:/pinpoint-agent
environment:
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dpinpoint.profiler.profiles.active=${SPRING_PROFILES}"
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dpinpoint.profiler.profiles.active=${SPRING_PROFILES}"
networks:
- pinpoint
depends_on:
Expand Down Expand Up @@ -195,9 +214,15 @@ services:
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
- JDBC_DRIVERCLASSNAME=${JDBC_DRIVERCLASSNAME}
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- JDBC_URL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- JDBC_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- JDBC_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- SPRING_DATASOURCE_HIKARI_JDBCURL=${SPRING_DATASOURCE_HIKARI_JDBCURL}
- SPRING_DATASOURCE_HIKARI_USERNAME=${SPRING_DATASOURCE_HIKARI_USERNAME}
- SPRING_DATASOURCE_HIKARI_PASSWORD=${SPRING_DATASOURCE_HIKARI_PASSWORD}
- SPRING_METADATASOURCE_HIKARI_JDBCURL=${SPRING_METADATASOURCE_HIKARI_JDBCURL}
- SPRING_METADATASOURCE_HIKARI_USERNAME=${SPRING_METADATASOURCE_HIKARI_USERNAME}
- SPRING_METADATASOURCE_HIKARI_PASSWORD=${SPRING_METADATASOURCE_HIKARI_PASSWORD}
- ALARM_MAIL_SERVER_URL=${ALARM_MAIL_SERVER_URL}
- ALARM_MAIL_SERVER_PORT=${ALARM_MAIL_SERVER_PORT}
- ALARM_MAIL_SERVER_USERNAME=${ALARM_MAIL_SERVER_USERNAME}
Expand Down Expand Up @@ -345,6 +370,16 @@ services:
networks:
- pinpoint

redis:
image: redis:7.0.14
restart: always
hostname: pinpoint-redis
ports:
- "6379:6379"
networks:
- pinpoint


volumes:
data-volume:
mysql_data:
Expand Down

0 comments on commit f5bcb0c

Please sign in to comment.