Skip to content

Mirror of exporter script from Waldur operational DB into a simplified statistical DB

License

Notifications You must be signed in to change notification settings

waldur/waldur-metrics-exporter

Repository files navigation

waldur-metrics-exporter

Available commands

  • manage.py migrate
  • manage.py update_country_limits
  • manage.py update_country_usage
  • manage.py update_country_quotas

Available env variables

  • START_YEAR

  • METRICS_DB_NAME

  • METRICS_DB_USER

  • METRICS_DB_PASSWORD

  • METRICS_DB_HOST

  • METRICS_DB_PORT

  • SOURCE_DB_NAME

  • SOURCE_DB_USER

  • SOURCE_DB_PASSWORD

  • SOURCE_DB_HOST

  • SOURCE_DB_PORT

Deployment in Kubernetes

  1. Install PostgreSQL release:

    helm repo add bitnami https://charts.bitnami.com/bitnami
    helm install postgresql-waldur-metrics-exporter bitnami/postgresql --version 12.2.8 -f k8s/psql-values.yaml -n puhuri-services
  2. Load Configmap with country quotas. Make sure that format of the CSV file is correct.

    kubectl create configmap country-quotas --from-file=country-quotas.csv=country-quotas.csv -n puhuri-services
  3. Prepare DB structure

    kubectl apply -f k8s/tracker_db_init.yaml -n puhuri-services
    # to rerun migration on new changes, use
    kubectl replace --force -f k8s/tracker_db_init.yaml -n puhuri-services
  4. Deploy aai_tracker cron jobs

    kubectl apply -f k8s/tracker_cron_limits.yaml -n puhuri-services
    kubectl apply -f k8s/tracker_cron_usage.yaml -n puhuri-services
    kubectl apply -f k8s/tracker_cron_quotas.yaml -n puhuri-services
    kubectl apply -f k8s/tracker_cron_resource_limits.yaml -n puhuri-services
    kubectl apply -f k8s/tracker_cron_resource_usages.yaml -n puhuri-services

About

Mirror of exporter script from Waldur operational DB into a simplified statistical DB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published