Put parameters in .env files

Put all the parameters in .env files
Update readme file
This commit is contained in:
marcos 2018-12-19 15:09:07 -03:00
parent 2baa58e056
commit 372890e46c
7 changed files with 86 additions and 22 deletions

22
.env
View File

@ -6,6 +6,11 @@ PINPOINT_HBASE_NAME=pinpoint-hbase
#config for hbase in external docker #config for hbase in external docker
EXTERNAL_HBASE_PORT=2180 EXTERNAL_HBASE_PORT=2180
### Pinpoint-mysql
MYSQL_ROOT_PASSWORD=root123
MYSQL_USER=admin
MYSQL_PASSWORD=admin
MYSQL_DATABASE=pinpoint
### Pinpoint-Web ### Pinpoint-Web
@ -32,6 +37,21 @@ BATCH_FLINK_SERVER=pinpoint-flink-jobmanager
CONFIG_SHOW_APPLICATIONSTAT=true CONFIG_SHOW_APPLICATIONSTAT=true
JDBC_DRIVER=com.mysql.jdbc.Driver
JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
JDBC_USERNAME=admin
JDBC_PASSWORD=admin
MAIL_HOST=stmp.test.com
MAIL_PORT=123
MAIL_USERNAME=user
MAIL_PASSWORD=pass
MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=smtp
MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
MAIL_PROPERTIES_MAIL_SMTP_PORT=587
MAIL_PROPERTIES_MAIL_SMTP_FROM=test@example.com
MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=true
MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=true
MAIL_PROPERTIES_MAIL_DEBUG=false
### Pinpoint-Collector ### Pinpoint-Collector
@ -71,4 +91,4 @@ FLINK_WEB_PORT=8081
### Pinpoint-quickstart ### Pinpoint-quickstart
APP_PORT=8000 APP_PORT=8000

View File

@ -38,13 +38,22 @@ This will install and run all services required to run all features in Pinpoint
- Pinpoint-Flink - Pinpoint-Flink
- Pinpoint-Zookeeper - Pinpoint-Zookeeper
- Pinpoint-Hbase - Pinpoint-Hbase
- Pinpoint-QuickStart(a sample application) - Pinpoint-QuickStart(a sample application)
- Pinpoint-Mysql
This may take several minutes to download all necessary images. This may take several minutes to download all necessary images.
You can replace `QuickStart` application part with your application to start monitoring. You can replace `QuickStart` application part with your application to start monitoring.
- check [`Testing QuickStart application`](#testing-quickstart-application) for a quick demo of pinpoint - check [`Testing QuickStart application`](#testing-quickstart-application) for a quick demo of pinpoint
- check [`Monitoring YOUR Application`](#monitoring-your-application) part for further details - check [`Monitoring YOUR Application`](#monitoring-your-application) part for further details
### Mysql (optional)
The Pinpoint-Mysql server is running on port 13306 and contains the data structure used to register users, groups, and alerts to be sent.
To send email alerts, you must make BATCH_ENABLE=true and change the other mail-related environment variables (MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_PROPERTIES_MAIL_SMTP_FROM, ...) to the Pinpoint-Web server in *.env* file.
For more information see [Setting Alarm](http://naver.github.io/pinpoint/alarm.html) in Pinpoint documentation.
### Flink configuration (optional) ### Flink configuration (optional)
After all containers are started and ready to go. There is one more thing to do to use all existing features in Pinpoint. After all containers are started and ready to go. There is one more thing to do to use all existing features in Pinpoint.

View File

@ -49,10 +49,10 @@ services:
ports: ports:
- "13306:3306" - "13306:3306"
environment: environment:
MYSQL_ROOT_PASSWORD: root123 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
MYSQL_USER: admin - MYSQL_USER=${MYSQL_USER}
MYSQL_PASSWORD: admin - MYSQL_PASSWORD=${MYSQL_PASSWORD}
MYSQL_DATABASE: pinpoint - MYSQL_DATABASE=${MYSQL_DATABASE}
volumes: volumes:
- mysql_data:/var/lib/mysql - mysql_data:/var/lib/mysql
@ -91,21 +91,21 @@ services:
- BATCH_ENABLE=${BATCH_ENABLE} - BATCH_ENABLE=${BATCH_ENABLE}
- BATCH_SERVER_IP=${BATCH_SERVER_IP} - BATCH_SERVER_IP=${BATCH_SERVER_IP}
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER} - BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
- JDBC_DRIVER=com.mysql.jdbc.Driver - JDBC_DRIVER=${JDBC_DRIVER}
- JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8 - JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=admin - JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=admin - JDBC_PASSWORD=${JDBC_PASSWORD}
- MAIL_HOST=stmp.test.com - MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=123 - MAIL_PORT=${MAIL_PORT}
- MAIL_USERNAME=user - MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=pass - MAIL_PASSWORD=${MAIL_PASSWORD}
# - MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=smtp - MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=${MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL}
- MAIL_PROPERTIES_MAIL_SMTP_AUTH='true' - MAIL_PROPERTIES_MAIL_SMTP_AUTH=${MAIL_PROPERTIES_MAIL_SMTP_AUTH}
- MAIL_PROPERTIES_MAIL_SMTP_PORT=587 - MAIL_PROPERTIES_MAIL_SMTP_PORT=${MAIL_PROPERTIES_MAIL_SMTP_PORT}
# - MAIL_PROPERTIES_MAIL_SMTP_FROM=test@example.com - MAIL_PROPERTIES_MAIL_SMTP_FROM=${MAIL_PROPERTIES_MAIL_SMTP_FROM}
- MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE='true' - MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE}
# - MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED='true' - MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED}
# - MAIL_PROPERTIES_MAIL_DEBUG='true' - MAIL_PROPERTIES_MAIL_DEBUG=${MAIL_PROPERTIES_MAIL_DEBUG}
links: links:
- "pinpoint-mysql:pinpoint-mysql" - "pinpoint-mysql:pinpoint-mysql"
networks: networks:

1
pinpoint-mysql/.env Normal file
View File

@ -0,0 +1 @@
PINPOINT_VERSION=1.8.0

View File

@ -1,6 +1,6 @@
FROM mysql:5.7 FROM mysql:5.7
ENV PINPOINT_VERSION=1.8.0 ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.8.0}
RUN apt update \ RUN apt update \
&& apt-get install -y --no-install-recommends ca-certificates wget \ && apt-get install -y --no-install-recommends ca-certificates wget \

View File

@ -26,3 +26,22 @@ BATCH_SERVER_IP=127.0.0.127
BATCH_FLINK_SERVER=pinpoint-flink-jobmanager BATCH_FLINK_SERVER=pinpoint-flink-jobmanager
CONFIG_SHOW_APPLICATIONSTAT=true CONFIG_SHOW_APPLICATIONSTAT=true
#mysql information required
JDBC_DRIVER=com.mysql.jdbc.Driver
JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
JDBC_USERNAME=
JDBC_PASSWORD=
#mail server information required
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=
MAIL_PROPERTIES_MAIL_SMTP_AUTH=
MAIL_PROPERTIES_MAIL_SMTP_PORT=
MAIL_PROPERTIES_MAIL_SMTP_FROM=
MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=
MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=
MAIL_PROPERTIES_MAIL_DEBUG=

View File

@ -30,4 +30,19 @@ services:
- BATCH_ENABLE=${BATCH_ENABLE} - BATCH_ENABLE=${BATCH_ENABLE}
- BATCH_SERVER_IP=${BATCH_SERVER_IP} - BATCH_SERVER_IP=${BATCH_SERVER_IP}
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER} - BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
- JDBC_DRIVER=${JDBC_DRIVER}
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=${MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL}
- MAIL_PROPERTIES_MAIL_SMTP_AUTH=${MAIL_PROPERTIES_MAIL_SMTP_AUTH}
- MAIL_PROPERTIES_MAIL_SMTP_PORT=${MAIL_PROPERTIES_MAIL_SMTP_PORT}
- MAIL_PROPERTIES_MAIL_SMTP_FROM=${MAIL_PROPERTIES_MAIL_SMTP_FROM}
- MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE}
- MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED}
- MAIL_PROPERTIES_MAIL_DEBUG=${MAIL_PROPERTIES_MAIL_DEBUG}