Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-8434

PMM Server Public Address could be passed as environment variable

Details

    • New Feature
    • Status: Done
    • Medium
    • Resolution: Done
    • None
    • 2.27.0
    • PMM ManageD, PMM Server

    Description

      User story:

      In some cases Public Address for PMM Server could be already known and could be passed as parameter when starting the container.

      One of the scenario is starting PMM Server in k8s where DNS for it could be already know and configured.

      With Public Address configured it is much more simple to use DBaaS features for example.

       

      Acceptance criteria:

       

       

      Out of scope:

      Setting Env Variables
      DisableUpdates DISABLE_UPDATES
      DisableTelemetry DISABLE_TELEMETRY
      MetricsResolutions METRICS_RESOLUTION, METRICS_RESOLUTION_HR, METRICS_RESOLUTION_MR, METRICS_RESOLUTION_LR
      DataRetention DATA_RETENTION
      AWSPartitions
      SSHKey
      AlertManagerURL
      EnableSTT
      EnableSTTChecks
      EnableDBaaS PERCONA_TEST_DBAAS, ENABLE_DBAAS
      EnableAzurediscover ENABLE_AZUREDISCOVER
      EnableAlerting ENABLE_ALERTING
      EmailAlertingSettings
      SlackAlertingSettings
      EnableVMCache ENABLE_VM_CACHE
      EnableBackupManagement ENABLE_BACKUP_MANAGEMENT

      Suggested implementation:

      as all other env variable.

       

      How to test:

      Pass DNS or IP (2 test cases) as env for container, validated that it appears in settings and DBaaS could start DBs with monitoring.

       Test example

      Start PMM server setting the PMM_PUBLIC_ADDRESS to your local IP address.

      cat start-pmm.sh

      #!/bin/bash

      IMAGE="${1:-perconalab/pmm-server:dev-latest}"
      docker create -v /srv --name pmm-data ${IMAGE} /bin/true
      docker run -d \
      -p 80:80 \
      -p 443:443 \
      --volumes-from pmm-data \
      --name pmm-server \
      -e PERCONA_TEST_DBAAS=1 \
      -e PERCONA_TEST_VERSION_SERVICE_URL=https://check-dev.percona.com/versions/v1 \
      -e PMM_PUBLIC_ADDRESS=$(hostname -I | awk '

      Unknown macro: { print $1 }

      ') \
      ${IMAGE}

      Browse to https://localhost/graph/settings/advanced-settings

      The address should be already set

      Attachments

        Issue Links

          Activity

            People

              rasika.chivate Rasika Chivate
              denys.kondratenko Denys Kondratenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist