-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from this-is-spear/chore/pinpoint
apm 툴로 pinpoint 환경을 구성한다.
- Loading branch information
Showing
132 changed files
with
707 additions
and
1,387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
PINPOINT_VERSION=latest | ||
SPRING_PROFILES=release | ||
|
||
# Used to make collector ip fixed for external microservices which uses pinpoint agent with collector ip. | ||
PINPOINT_NETWORK_SUBNET=172.24.0.0/27 | ||
COLLECTOR_FIXED_IP=172.24.0.30 | ||
|
||
#zookeeper information required | ||
PINPOINT_ZOOKEEPER_ADDRESS=zoo1 | ||
|
||
### Pinpoint-Hbase | ||
|
||
PINPOINT_HBASE_NAME=pinpoint-hbase | ||
AGENTINFO_TTL=31536000 | ||
AGENTSTATV2_TTL=5184000 | ||
APPSTATAGGRE_TTL=5184000 | ||
APPINDEX_TTL=31536000 | ||
AGENTLIFECYCLE_TTL=5184000 | ||
AGENTEVENT_TTL=5184000 | ||
STRINGMETADATA_TTL=15552000 | ||
APIMETADATA_TTL=31536000 | ||
SQLMETADATA_TTL=15552000 | ||
TRACEV2_TTL=5184000 | ||
APPTRACEINDEX_TTL=5184000 | ||
APPMAPSTATCALLERV2_TTL=5184000 | ||
APPMAPSTATCALLEV2_TTL=5184000 | ||
APPMAPSTATSELFV2_TTL=5184000 | ||
HOSTAPPMAPV2_TTL=5184000 | ||
|
||
### Pinpoint-mysql | ||
MYSQL_ROOT_PASSWORD=root123 | ||
MYSQL_USER=admin | ||
MYSQL_PASSWORD=admin | ||
MYSQL_DATABASE=pinpoint | ||
|
||
### Pinpoint-Web | ||
|
||
PINPOINT_WEB_NAME=pinpoint-web | ||
|
||
WEB_SERVER_PORT=8080 | ||
|
||
WEB_LOGGING_LEVEL_ROOT=INFO | ||
|
||
CLUSTER_ENABLE=true | ||
|
||
ADMIN_PASSWORD=admin | ||
|
||
#analytics | ||
CONFIG_SENDUSAGE=true | ||
|
||
CONFIG_SHOW_APPLICATIONSTAT=true | ||
|
||
#mysql information required if used | ||
JDBC_DRIVERCLASSNAME=com.mysql.jdbc.Driver | ||
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 | ||
|
||
PINPOINT_COLLECTOR_NAME=pinpoint-collector | ||
|
||
CLUSTER_ENABLE=true | ||
|
||
COLLECTOR_LOGGING_LEVEL_ROOT=INFO | ||
|
||
#grpc | ||
COLLECTOR_RECEIVER_GRPC_AGENT_PORT=9991 | ||
COLLECTOR_RECEIVER_GRPC_STAT_PORT=9992 | ||
COLLECTOR_RECEIVER_GRPC_SPAN_PORT=9993 | ||
|
||
#thrift | ||
COLLECTOR_RECEIVER_BASE_PORT=9994 | ||
COLLECTOR_RECEIVER_STAT_UDP_PORT=9995 | ||
COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996 | ||
|
||
FLINK_CLUSTER_ENABLE=true | ||
FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1 | ||
|
||
### Pinpoint-Batch | ||
|
||
PINPOINT_BATCH_NAME=pinpoint-batch | ||
|
||
BATCH_SERVER_PORT=8079 | ||
|
||
BATCH_LOGGING_LEVEL_ROOT=INFO | ||
|
||
CLUSTER_ENABLE=true | ||
|
||
ADMIN_PASSWORD=admin | ||
|
||
#analytics | ||
CONFIG_SENDUSAGE=true | ||
|
||
#flink server information required if used | ||
BATCH_FLINK_SERVER=pinpoint-flink-jobmanager | ||
|
||
CONFIG_SHOW_APPLICATIONSTAT=true | ||
|
||
#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 | ||
ALARM_MAIL_SERVER_PORT=587 | ||
ALARM_MAIL_SERVER_USERNAME=username | ||
ALARM_MAIL_SERVER_PASSWORD=password | ||
ALARM_MAIL_SENDER_ADDRESS=[email protected] | ||
ALARM_MAIL_TRANSPORT_PROTOCOL=smtp | ||
ALARM_MAIL_SMTP_PORT=25 | ||
ALARM_MAIL_SMTP_AUTH=false | ||
ALARM_MAIL_SMTP_STARTTLS_ENABLE=false | ||
ALARM_MAIL_SMTP_STARTTLS_REQUIRED=false | ||
ALARM_MAIL_DEBUG=false | ||
|
||
### Pinpoint-Agent | ||
|
||
PINPOINT_AGENT_NAME=pinpoint-agent | ||
|
||
#network module(GRPC,THRIFT) | ||
PROFILER_TRANSPORT_MODULE=GRPC | ||
|
||
#collector information required | ||
COLLECTOR_IP=pinpoint-collector | ||
PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991 | ||
PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991 | ||
PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992 | ||
PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993 | ||
COLLECTOR_TCP_PORT=9994 | ||
COLLECTOR_STAT_PORT=9995 | ||
COLLECTOR_SPAN_PORT=9996 | ||
|
||
# Sampling Configurations | ||
PROFILER_SAMPLING_TYPE=COUNTING | ||
PROFILER_SAMPLING_COUNTING_SAMPLING_RATE=1 | ||
PROFILER_SAMPLING_PERCENT_SAMPLING_RATE=100 | ||
PROFILER_SAMPLING_NEW_THROUGHPUT=0 | ||
PROFILER_SAMPLING_CONTINUE_THROUGHPUT=0 | ||
|
||
AGENT_ID=app-in-docker | ||
APP_NAME=quickapp | ||
|
||
AGENT_DEBUG_LEVEL=INFO | ||
|
||
|
||
### Pinpoint-flink | ||
|
||
PINPOINT_FLINK_NAME=pinpoint-flink | ||
FLINK_WEB_PORT=8081 | ||
|
||
|
||
### Pinpoint-quickstart | ||
|
||
APP_PORT=8085 | ||
|
||
### Pinpoint-pinot | ||
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 redis | ||
SPRING_DATA_REDIS_HOST=pinpoint-redis | ||
SPRING_DATA_REDIS_PORT=6379 | ||
SPRING_DATA_REDIS_USERNAME=default | ||
SPRING_DATA_REDIS_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "pinpoint"] | ||
path = pinpoint | ||
url = https://github.com/pinpoint-apm/pinpoint-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
FROM openjdk:17-jdk | ||
ARG JAR_FILE=build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
|
||
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}" | ||
COPY ./build/libs/*SNAPSHOT.jar app.jar | ||
|
||
CMD echo 'sleep for initialze hbase' && sleep 30 && java -jar ${JAVA_OPTS} app.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,134 @@ | ||
version: "3.8" | ||
version: "3.6" | ||
|
||
services: | ||
database: | ||
container_name: mysql_db | ||
image: mysql/mysql-server:8.0-aarch64 | ||
money-transfer: | ||
deploy: | ||
replicas: 1 | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
args: | ||
- PINPOINT_VERSION=2.5.3 | ||
- AGENT_ID=java-app-in-docker | ||
- APP_NAME=money-transfer | ||
- SPRING_PROFILES=local | ||
volumes: | ||
- data-volume:/pinpoint-agent | ||
ports: | ||
- "80:8080" | ||
environment: | ||
SPRING_DATASOURCE_URL: jdbc:mysql://host.docker.internal:3307/money_transfer_service?characterEncoding=UTF-8&serverTimezone=Asia/Seoul | ||
SPRING_DATASOURCE_USERNAME: 'root' | ||
SPRING_DATASOURCE_PASSWORD: 'password!' | ||
depends_on: | ||
- pinpoint-web | ||
- pinpoint-hbase | ||
- pinpoint-agent | ||
- pinpoint-collector | ||
- money-transfer-database | ||
networks: | ||
- pinpoint | ||
|
||
money-transfer-database: | ||
image: mysql:8.0 | ||
environment: | ||
MYSQL_DATABASE: money_transfer_service | ||
MYSQL_ROOT_HOST: '%' | ||
MYSQL_ROOT_PASSWORD: password! | ||
MYSQL_ROOT_PASSWORD: 'password!' | ||
TZ: 'Asia/Seoul' | ||
ports: | ||
- "3306:3306" | ||
volumes: | ||
- ./mysql/conf.d:/etc/mysql/conf.d | ||
- "3307:3306" | ||
command: | ||
- "mysqld" | ||
- "--character-set-server=utf8mb4" | ||
- "--collation-server=utf8mb4_unicode_ci" | ||
- "--innodb_buffer_pool_size=256M" | ||
networks: | ||
- pinpoint | ||
|
||
application: | ||
container_name: money-transfer | ||
deploy: | ||
replicas: 1 | ||
restart: on-failure | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
SPRING_DATASOURCE_URL: jdbc:mysql://host.docker.internal:3306/money_transfer_service?characterEncoding=UTF-8&serverTimezone=Asia/Seoul | ||
SPRING_DATASOURCE_USERNAME: "root" | ||
SPRING_DATASOURCE_PASSWORD: "password!" | ||
depends_on: | ||
database: | ||
condition: service_healthy | ||
pinpoint-hbase: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: pinpoint-hbase | ||
networks: | ||
- pinpoint | ||
|
||
pinpoint-web: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: pinpoint-web | ||
networks: | ||
- pinpoint | ||
|
||
pinpoint-collector: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: pinpoint-collector | ||
networks: | ||
- pinpoint | ||
|
||
pinpoint-agent: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: pinpoint-agent | ||
networks: | ||
- pinpoint | ||
|
||
zoo1: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: zoo1 | ||
networks: | ||
- pinpoint | ||
|
||
zoo2: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: zoo2 | ||
networks: | ||
- pinpoint | ||
|
||
zoo3: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: zoo3 | ||
|
||
jobmanager: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: jobmanager | ||
networks: | ||
- pinpoint | ||
|
||
taskmanager: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: taskmanager | ||
networks: | ||
- pinpoint | ||
|
||
redis: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: redis | ||
networks: | ||
- pinpoint | ||
|
||
pinpoint-mysql: | ||
extends: | ||
file: ./pinpoint/docker-compose.yml | ||
service: pinpoint-mysql | ||
networks: | ||
- pinpoint | ||
|
||
volumes: | ||
data-volume: | ||
hbase_data: | ||
mysql_data: | ||
|
||
networks: | ||
pinpoint: | ||
driver: bridge | ||
ipam: | ||
config: | ||
- subnet: ${PINPOINT_NETWORK_SUBNET} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ble/bankingapi/BankingApiApplication.java → ...ava/bankingapi/BankingApiApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...va/numble/bankingapi/HelloController.java → ...main/java/bankingapi/HelloController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.