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-13090: Sync environment variables with v3-api-breaking-changes #2982

Merged
merged 5 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
PMM_SERVER_IMAGE: perconalab/pmm-server:3-dev-latest
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
OAUTH_PMM_CLIENT_ID: ${{ secrets.OAUTH_PMM_CLIENT_ID }}
OAUTH_PMM_CLIENT_SECRET: ${{ secrets.OAUTH_PMM_CLIENT_SECRET }}
PMM_DEV_OAUTH_CLIENT_ID: ${{ secrets.OAUTH_PMM_CLIENT_ID }}
PMM_DEV_OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_PMM_CLIENT_SECRET }}
DEVCONTAINER_CACHE_ENABLED: false

steps:
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
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: ${PMM_CLICKHOUSE_HOST}
tlsSkipVerify: false
33 changes: 17 additions & 16 deletions build/docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@ 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 |
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| ENABLE_UPDATES | Enable/disable automatic updates |
| ENABLE_TELEMETRY | Enable/disable built-in telemetry and disable Advisors if telemetry is disabled |
| ENABLE_ALERTING | Enable/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/disable cache in VM |
| ENABLE_AZUREDISCOVER | Enable/disable support for discovery of Azure databases |
| ENABLE_BACKUP_MANAGEMENT | Enable/disable 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_ENABLE_UPDATES | Disable automatic updates |
| PMM_ENABLE_TELEMETRY | Disable built-in telemetry and disable STT if telemetry is disabled |
| PMM_ENABLE_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 |
| PMM_ENABLE_BACKUP_MANAGEMENT | Enable/disable 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 |

## For more information please visit:

Expand Down
167 changes: 84 additions & 83 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,36 @@ 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_ACCESS_CONTROL=${PMM_ENABLE_ACCESS_CONTROL:-0}
- PMM_DEV_VERSION_SERVICE_URL=${PMM_DEV_VERSION_SERVICE_URL}
- PMM_WATCHTOWER_HOST=${PMM_WATCHTOWER_HOST:-http://watchtower:8080}
- PMM_WATCHTOWER_TOKEN=${PMM_WATCHTOWER_TOKEN:-INSECURE_TOKEN}
# - 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 +208,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 +291,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 +373,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