Configure PE to use Google Cloud SQL

Support for using Puppet Enterprise with Google Cloud SQL for PostgreSQL is currently a Limited Availability feature. Limited Availability features are supported for production use and are available on a limited basis.

This guide describes how to migrate an existing, working Puppet Enterprise (PE) installation from its PE-managed PostgreSQL database to a Google Cloud SQL for PostgreSQL instance.

Supported configuration

This procedure is supported for:

  • A healthy PE installation that uses PE-managed PostgreSQL on the primary server.

  • A migration performed after any PE upgrade is complete.

  • A single Google Cloud SQL instance that hosts all PE databases.

The following configurations are not supported:

  • Disaster recovery (HA replica) deployments with a Cloud SQL database.

  • Migrations performed as part of a PE upgrade.

  • New PE installations deployed directly on Google Cloud SQL.

Complete any PE upgrade first and confirm that PE is healthy before you begin. Do not combine this migration with a PE upgrade.
Before you begin:

Ensure the following:

  • The PE primary server passes puppet infrastructure status.

  • Administrative access to:

    • Google Cloud Platform (GCP)

    • The PE primary server

    • Any PE compilers

    • The PE console, or the classifier API, as a user who can edit the PE Infrastructure node group

  • Access to the following utilities on the PE primary. These utilities are installed with PE in /opt/puppetlabs/server/bin:

    • psql

    • pg_dump

    • pg_dumpall

    • pg_restore

  • Network connectivity from the PE primary and all compilers to the Cloud SQL instance.

  • A complete backup of the PE primary, for example:

    puppet-backup create

    PE services must be stopped during the migration process.

Configuring PE to use Google Cloud SQL involves the following high level steps:

  1. Provision a PostgreSQL instance in Google Cloud. See Provision a Cloud SQL PostgreSQL instance.

  2. Configure networking and SSL connectivity. See Configure database connectivity.

  3. Point PE's classification at the new instance, then migrate PE database roles and tables. See Migrate PE roles and database tables.

  4. Verify the migration. See Verify database migration.

  5. Update pe.conf to point to the external database. See Update pe.conf.

  6. Apply the configuration. See Apply configuration.

This procedure requires stopping PE services and migrating data. Ensure you have a full backup before proceeding.