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

20
.env
View File

@ -6,6 +6,11 @@ PINPOINT_HBASE_NAME=pinpoint-hbase
#config for hbase in external docker
EXTERNAL_HBASE_PORT=2180
### Pinpoint-mysql
MYSQL_ROOT_PASSWORD=root123
MYSQL_USER=admin
MYSQL_PASSWORD=admin
MYSQL_DATABASE=pinpoint
### Pinpoint-Web
@ -32,6 +37,21 @@ BATCH_FLINK_SERVER=pinpoint-flink-jobmanager
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

View File

@ -39,12 +39,21 @@ This will install and run all services required to run all features in Pinpoint
- Pinpoint-Zookeeper
- Pinpoint-Hbase
- Pinpoint-QuickStart(a sample application)
- Pinpoint-Mysql
This may take several minutes to download all necessary images.
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 [`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)
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:
- "13306:3306"
environment:
MYSQL_ROOT_PASSWORD: root123
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_DATABASE: pinpoint
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
volumes:
- mysql_data:/var/lib/mysql
@ -91,21 +91,21 @@ services:
- BATCH_ENABLE=${BATCH_ENABLE}
- BATCH_SERVER_IP=${BATCH_SERVER_IP}
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
- 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='true'
- 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}
links:
- "pinpoint-mysql:pinpoint-mysql"
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
ENV PINPOINT_VERSION=1.8.0
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.8.0}
RUN apt update \
&& 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
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_SERVER_IP=${BATCH_SERVER_IP}
- 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}