Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Bootstrap and uninstall

Alexey Lesovsky edited this page May 5, 2021 · 2 revisions

Bootstrap and Uninstall.

pgSCV provides bootstrap and uninstall modes for quick install or (uninstall). During the bootstrap pgSCV does:

  • copy itself to system PATH catalog
  • create YAML configuration
  • create pgscv systemd service
  • enable and start pgscv systemd service

Uninstall mode revert all changes:

  • stop and disable pgscv systemd service
  • removes pgscv systemd service
  • remove YAML configuration
  • remove itself from system PATH

Executing bootstrap or uninstall requires root privileges or sudo for accessing to system paths.

For configuring YAML configuration during bootstrap, the following environment variables are available:

  • PGSCV_RUN_AS_USER - which user should be used for running pgscv systemd service
  • PGSCV_SEND_METRICS_URL - value for send_metrics_url YAML setting
  • PGSCV_AUTOUPDATE - value for autoupdate YAML setting
  • PGSCV_API_KEY - value for api_key YAML setting
  • PGSCV_PG_PASSWORD - value for defaults.postgres_password YAML setting
  • PGSCV_PGB_PASSWORD - value for defaults.pgbouncer_password YAML setting
  1. Bootstrap could be done using the following commands:
export PGSCV_RUN_AS_USER=root PGSCV_SEND_METRICS_URL="https://push.weaponry.io" PGSCV_AUTOUPDATE=true PGSCV_API_KEY=11111111-1111-1111-1111-111111111111 PGSCV_PG_PASSWORD=_SECRET_PASS_ PGSCV_PGB_PASSWORD=_SECRET_PASS_
sudo -E ./pgscv --bootstrap
  1. Uninstall doesn't requires any extra options:
sudo pgscv --uninstall