Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12619: Make PMM environment variables more consistent #2857

Merged
merged 29 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e009ada
refactored environment variables
idoqo Feb 28, 2024
526f2a6
update migration doc
idoqo Feb 28, 2024
881108d
replace test line
idoqo Feb 28, 2024
f40cc41
drop no lint rule
idoqo Feb 28, 2024
68a08ad
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Mar 3, 2024
21f48ea
fix parser tests
idoqo Mar 4, 2024
3311ed6
re-order table values
idoqo Mar 5, 2024
00d71ba
remove deprecated env variables
idoqo Mar 6, 2024
2812cb8
fix tests
idoqo Mar 6, 2024
8a66c6d
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Mar 11, 2024
47c31c6
use singluar advisor
idoqo Mar 11, 2024
dd23674
introduce PMM_DEV_ prefix for dev-related variables
idoqo Mar 12, 2024
2819f8a
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Mar 19, 2024
9f5d946
clean up environment variables
idoqo Mar 21, 2024
dd1a234
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Mar 21, 2024
e6a4d06
drop printf
idoqo Mar 21, 2024
0ae4b04
drop unused variable
idoqo Mar 26, 2024
78bae3e
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Mar 26, 2024
88b44ba
update tests
idoqo Mar 27, 2024
e920f5f
add notes for removed variable
idoqo Mar 27, 2024
9c4c072
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Apr 2, 2024
3e64259
update oauth variables
idoqo Apr 2, 2024
d52729d
update changed variable list
idoqo Apr 2, 2024
8c2ad98
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Apr 9, 2024
fd81967
update variable check validation
idoqo Apr 9, 2024
4f0939b
refactor tests
idoqo Apr 23, 2024
1557b56
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Apr 23, 2024
01d86a2
Merge branch 'v3' into PMM-12619-env-vars-rename
idoqo Apr 23, 2024
9d049da
surpress linter error
idoqo Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ jobs:
container_name: pmm-agent_pmm-server
environment:
- PMM_DEBUG=1
- PERCONA_TEST_CHECKS_INTERVAL=10s
- PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com
- PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
ports:
- 80:8080
- 443:8443
Expand Down
7 changes: 3 additions & 4 deletions agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ services:
- "127.0.0.1:443:8443"
environment:
- PMM_DEBUG=1
- PERCONA_TEST_CHECKS_INTERVAL=10s
# for local development
- PERCONA_TEST_CHECKS_FILE=/srv/checks/custom-checks.yml
- PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/custom-checks.yml
# for check-dev
# - PERCONA_TEST_SAAS_HOST=check-dev.percona.com:443
# - PERCONA_TEST_CHECKS_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=check-dev.percona.com:443
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
volumes:
- ./testdata/checks:/srv/checks

Expand Down
7 changes: 3 additions & 4 deletions api-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ services:
- 127.0.0.1:443:8443
environment:
- PMM_DEBUG=1
- PERCONA_TEST_CHECKS_INTERVAL=10s
# for local development
# - PERCONA_TEST_CHECKS_FILE=/srv/checks/custom-checks.yml
# - PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/custom-checks.yml
# for check-dev
- PERCONA_TEST_SAAS_HOST=check-dev.percona.com
- PERCONA_TEST_CHECKS_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=check-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
volumes:
- ./testdata/checks:/srv/checks

Expand Down
2 changes: 1 addition & 1 deletion api-tests/management/alerting/alerting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (

// Note: Even though the Alerting service checks for alerting enabled or disabled before returning results
// we don't enable or disable Alerting explicit in our tests since it is enabled by default through
// DISABLE_ALERTING env var.
// PMM_DISABLE_ALERTING env var.
func TestRulesAPI(t *testing.T) {
t.Parallel()
client := alertingClient.Default.Alerting
Expand Down
20 changes: 10 additions & 10 deletions build/ansible/roles/grafana/files/datasources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ datasources:
orgId: 1
type: postgres
access: proxy
url: ${PERCONA_TEST_POSTGRES_ADDR}
user: ${PERCONA_TEST_POSTGRES_USERNAME}
database: ${PERCONA_TEST_POSTGRES_DBNAME}
url: ${PMM_POSTGRES_ADDR}
user: ${PMM_POSTGRES_USERNAME}
database: ${PMM_POSTGRES_DBNAME}
jsonData:
sslRootCertFile: ${PERCONA_TEST_POSTGRES_SSL_CA_PATH}
sslKeyFile: ${PERCONA_TEST_POSTGRES_SSL_KEY_PATH}
sslCertFile: ${PERCONA_TEST_POSTGRES_SSL_CERT_PATH}
sslRootCertFile: ${PMM_POSTGRES_SSL_CA_PATH}
sslKeyFile: ${PMM_POSTGRES_SSL_KEY_PATH}
sslCertFile: ${PMM_POSTGRES_SSL_CERT_PATH}
postgresVersion: "1100"
sslmode: ${PERCONA_TEST_POSTGRES_SSL_MODE}
sslmode: ${PMM_POSTGRES_SSL_MODE}
secureJsonData:
password: ${PERCONA_TEST_POSTGRES_DBPASSWORD}
password: ${PMM_POSTGRES_DBPASSWORD}
- name: PTSummary
version: 2
orgId: 1
Expand All @@ -40,6 +40,6 @@ datasources:
version: 2
type: grafana-clickhouse-datasource
jsonData:
port: ${PERCONA_TEST_PMM_CLICKHOUSE_PORT}
server: ${PERCONA_TEST_PMM_CLICKHOUSE_HOST}
port: ${PMM_CLICKHOUSE_PORT}
server: ${PERCONA_DEV_PMM_CLICKHOUSE_HOST}
tlsSkipVerify: false
31 changes: 15 additions & 16 deletions build/docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ This example uses the tag `:3` to pull the latest PMM 3.x version, but other, [m

You can use these environment variables (-e VAR) when running the Docker image.

| Variable | Description |
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| DISABLE_UPDATES | Disable automatic updates |
| DISABLE_TELEMETRY | Disable built-in telemetry and disable STT if telemetry is disabled |
| DISABLE_ALERTING | Disable percona alerting |
| METRICS_RESOLUTION | High metrics resolution in seconds |
| METRICS_RESOLUTION_HR | High metrics resolution (same as above) |
| METRICS_RESOLUTION_MR | Medium metrics resolution in seconds |
| METRICS_RESOLUTION_LR | Low metrics resolution in seconds |
| DATA_RETENTION | How long to keep time-series data in ClickHouse. This variable accepts golang style duration format, example: 24h, 30m, 10s |
| ENABLE_VM_CACHE | Enable cache in VM |
| ENABLE_AZUREDISCOVER | Enable support for discovery of Azure databases |
| ENABLE_BACKUP_MANAGEMENT | Enable integrated backup tools |
| PMM_PUBLIC_ADDRESS | External IP address or the DNS name on which PMM server is running. |
| PMM_DEBUG | Enables a more verbose log level |
| PMM_TRACE | Enables a more verbose log level including traceback information |
| Variable | Description |
|------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| PMM_DISABLE_UPDATES | Disable automatic updates |
| PMM_DISABLE_TELEMETRY | Disable built-in telemetry and disable STT if telemetry is disabled |
| PMM_DISABLE_ALERTING | Disable Percona alerting |
| PMM_METRICS_RESOLUTION | High metrics resolution in seconds |
| PMM_METRICS_RESOLUTION_HR | High metrics resolution (same as above) |
| PMM_METRICS_RESOLUTION_MR | Medium metrics resolution in seconds |
| PMM_METRICS_RESOLUTION_LR | Low metrics resolution in seconds |
| PMM_DATA_RETENTION | How long to keep time-series data in ClickHouse. This variable accepts golang style duration format, example: 24h, 30m, 10s |
| PMM_ENABLE_VM_CACHE | Enable cache in VM |
| PMM_ENABLE_AZURE_DISCOVER | Enable support for discovery of Azure databases |
idoqo marked this conversation as resolved.
Show resolved Hide resolved
| PMM_PUBLIC_ADDRESS | External IP address or the DNS name on which PMM server is running. |
| PMM_DEBUG | Enables a more verbose log level |
| PMM_TRACE | Enables a more verbose log level including traceback information |

## For more information please visit:

Expand Down
165 changes: 82 additions & 83 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ services:
networks:
- ${NETWORK:-default}
environment:
- PMM_RELEASE_PATH=/root/go/bin
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
- ENABLE_RBAC=${ENABLE_RBAC:-0}
- LESS_LOG_NOISE=1
- PERCONA_TEST_VERSION_SERVICE_URL=${PERCONA_TEST_VERSION_SERVICE_URL}
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_PMM_CLICKHOUSE_ADDR=127.0.0.1:9000
# - PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
# - PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
# - PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- PMM_LESS_LOG_NOISE=1
- PMM_RELEASE_PATH=/root/go/bin
- PMM_ENABLE_RBAC=${PMM_ENABLE_RBAC:-0}
- PMM_DEV_VERSION_SERVICE_URL=${PMM_DEV_VERSION_SERVICE_URL}
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost
# - PMM_DEV_PERCONA_PLATFORM_INSECURE=1
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=<public key>
# - PMM_DEV_TELEMETRY_INTERVAL=10s
# - PMM_DEV_TELEMETRY_DISABLE_START_DELAY=1
# - PMM_DEV_TELEMETRY_RETRY_BACKOFF=10s
# - PMM_CLICKHOUSE_ADDR=127.0.0.1:9000
# - PMM_CLICKHOUSE_DATABASE=pmm
# - PMM_CLICKHOUSE_BLOCK_SIZE=10000
# - PMM_CLICKHOUSE_POOL_SIZE=2
# - PMM_DEBUG=1
# - PERCONA_TEST_CHECKS_FILE=/srv/checks/local-checks.yml
# - PERCONA_TEST_POSTGRES_ADDR=pg
# - PERCONA_TEST_POSTGRES_DBNAME=pmm-managed
# - PERCONA_TEST_POSTGRES_USERNAME=pmm-managed
# - PERCONA_TEST_POSTGRES_DBPASSWORD=pmm-managed
# - PERCONA_TEST_POSTGRES_SSL_MODE=verify-full
# - PERCONA_TEST_POSTGRES_SSL_CA_PATH=/tmp/certs/root.crt
# - PERCONA_TEST_POSTGRES_SSL_KEY_PATH=/tmp/certs/pmm-managed.key
# - PERCONA_TEST_POSTGRES_SSL_CERT_PATH=/tmp/certs/pmm-managed.crt
# - PERCONA_TEST_PMM_DISABLE_BUILTIN_POSTGRES=1
# - PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/local-checks.yml
# - PMM_POSTGRES_ADDR=pg
# - PMM_POSTGRES_DBNAME=pmm-managed
# - PMM_POSTGRES_USERNAME=pmm-managed
# - PMM_POSTGRES_DBPASSWORD=pmm-managed
# - PMM_POSTGRES_SSL_MODE=verify-full
# - PMM_POSTGRES_SSL_CA_PATH=/tmp/certs/root.crt
# - PMM_POSTGRES_SSL_KEY_PATH=/tmp/certs/pmm-managed.key
# - PMM_POSTGRES_SSL_CERT_PATH=/tmp/certs/pmm-managed.crt
# - PMM_DISABLE_BUILTIN_POSTGRES=1
# - GF_DATABASE_SSL_MODE=verify-full
# - GF_DATABASE_CA_CERT_PATH=/tmp/certs/root.crt
# - GF_DATABASE_CLIENT_KEY_PATH=/tmp/certs/grafana.key
Expand Down Expand Up @@ -206,26 +206,25 @@ services:
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
- ENABLE_BACKUP_MANAGEMENT=1
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
- PERCONA_TEST_PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
- PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
- PERCONA_TEST_PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PERCONA_TEST_POSTGRES_ADDR=pg:5432
- PERCONA_TEST_POSTGRES_USERNAME=pmm-managed
- PERCONA_TEST_POSTGRES_DBPASSWORD=pmm-managed
- PERCONA_TEST_PMM_DISABLE_BUILTIN_POSTGRES=1
# - PERCONA_TEST_POSTGRES_SSL_MODE=require
# - PERCONA_TEST_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PERCONA_TEST_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PERCONA_TEST_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost
# - PMM_DEV_PERCONA_PLATFORM_INSECURE=1
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=<public key>
# - PMM_DEV_TELEMETRY_INTERVAL=10s
# - PMM_DEV_TELEMETRY_RETRY_BACKOFF=10s
# - PMM_DEV_TELEMETRY_DISABLE_START_DELAY=1
- PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PMM_CLICKHOUSE_DATABASE=pmm
- PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PMM_CLICKHOUSE_POOL_SIZE=2
- PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PMM_POSTGRES_ADDR=pg:5432
- PMM_POSTGRES_USERNAME=pmm-managed
- PMM_POSTGRES_DBPASSWORD=pmm-managed
- PMM_DISABLE_BUILTIN_POSTGRES=1
# - PMM_POSTGRES_SSL_MODE=require
# - PMM_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PMM_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PMM_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
- GF_DATABASE_URL=postgres://grafana:grafana@pg:5432/grafana
# - GF_DATABASE_SSL_MODE=require
# - PMM_DEBUG=1
Expand Down Expand Up @@ -290,25 +289,25 @@ services:
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
- PERCONA_TEST_PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
- PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
- PERCONA_TEST_PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PERCONA_TEST_POSTGRES_ADDR=pg:5432
- PERCONA_TEST_POSTGRES_USERNAME=pmm-managed
- PERCONA_TEST_POSTGRES_DBPASSWORD=pmm-managed
- PERCONA_TEST_PMM_DISABLE_BUILTIN_POSTGRES=1
# - PERCONA_TEST_POSTGRES_SSL_MODE=require
# - PERCONA_TEST_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PERCONA_TEST_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PERCONA_TEST_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost
# - PMM_DEV_PERCONA_PLATFORM_INSECURE=1
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=<public key>
# - PMM_DEV_TELEMETRY_INTERVAL=10s
# - PMM_DEV_TELEMETRY_RETRY_BACKOFF=10s
# - PMM_DEV_TELEMETRY_DISABLE_START_DELAY=1
- PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PMM_CLICKHOUSE_DATABASE=pmm
- PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PMM_CLICKHOUSE_POOL_SIZE=2
- PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PMM_POSTGRES_ADDR=pg:5432
- PMM_POSTGRES_USERNAME=pmm-managed
- PMM_POSTGRES_DBPASSWORD=pmm-managed
- PMM_DISABLE_BUILTIN_POSTGRES=1
# - PMM_POSTGRES_SSL_MODE=require
# - PMM_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PMM_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PMM_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
- GF_DATABASE_URL=postgres://grafana:grafana@pg:5432/grafana
# - GF_DATABASE_SSL_MODE=require
# - PMM_DEBUG=1
Expand Down Expand Up @@ -372,25 +371,25 @@ services:
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
- PERCONA_TEST_PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
- PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
- PERCONA_TEST_PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PERCONA_TEST_POSTGRES_ADDR=pg:5432
- PERCONA_TEST_POSTGRES_USERNAME=pmm-managed
- PERCONA_TEST_POSTGRES_DBPASSWORD=pmm-managed
- PERCONA_TEST_PMM_DISABLE_BUILTIN_POSTGRES=1
# - PERCONA_TEST_POSTGRES_SSL_MODE=require
# - PERCONA_TEST_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PERCONA_TEST_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PERCONA_TEST_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost
# - PMM_DEV_PERCONA_PLATFORM_INSECURE=1
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=<public key>
# - PMM_DEV_TELEMETRY_INTERVAL=10s
# - PMM_DEV_TELEMETRY_RETRY_BACKOFF=10s
# - PMM_DEV_TELEMETRY_DISABLE_START_DELAY=1
- PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PMM_CLICKHOUSE_DATABASE=pmm
- PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PMM_CLICKHOUSE_POOL_SIZE=2
- PMM_DISABLE_BUILTIN_CLICKHOUSE=1
- PMM_POSTGRES_ADDR=pg:5432
- PMM_POSTGRES_USERNAME=pmm-managed
- PMM_POSTGRES_DBPASSWORD=pmm-managed
- PMM_DISABLE_BUILTIN_POSTGRES=1
# - PMM_POSTGRES_SSL_MODE=require
# - PMM_POSTGRES_SSL_CA_PATH=/certs/root.crt
# - PMM_POSTGRES_SSL_KEY_PATH=/certs/pmm-managed.key
# - PMM_POSTGRES_SSL_CERT_PATH=/certs/pmm-managed.crt
- GF_DATABASE_URL=postgres://grafana:grafana@pg:5432/grafana
# - GF_DATABASE_SSL_MODE=require
# - PMM_DEBUG=1
Expand Down
8 changes: 8 additions & 0 deletions docs/process/best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
- Supervisor-level dependencies between services are not strictly required (due to restarts everything will work eventually), but are nice to have: they help avoid scarry errors in logs.
- The big exception is exporters: we should follow practices established by the Prometheus community and not fail if the system under monitoring is not available. Other startup errors, like a missing certificate file, should still terminate the exporter.

### Environment Variables
For consistency, environment variables should keep to the following suggestions:
- Use the `PMM_DEV_` prefix for any environment variable that is to be used for *only* development/test purposes i.e.,
variables that are not meant for end-users in any circumstance e.g., `PMM_DEV_PERCONA_PLATFORM_ADDRESS`
- Use the `PMM_TEST_` prefix for any variable that is not part of PMM GA functionality.
- Use the `PMM_` prefix for variables that is part of PMM GA functionality.
- Use a sub-prefix if a number of env vars relate to one component, e.g., `PMM_TEST_HA_`
- The use of PERCONA_ prefix is prohibited (exception: PMM_PERCONA_PLATFORM_URL, since it's part of a proper name, not a prefix)
## Code style

- `gofumpt -s ` (note the `-s`)
Expand Down
Loading
Loading