Configure PE to use Google Cloud SQL
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.
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:
-
Provision a PostgreSQL instance in Google Cloud. See Provision a Cloud SQL PostgreSQL instance.
-
Configure networking and SSL connectivity. See Configure database connectivity.
-
Point PE's classification at the new instance, then migrate PE database roles and tables. See Migrate PE roles and database tables.
-
Verify the migration. See Verify database migration.
-
Update
pe.confto point to the external database. See Update pe.conf. -
Apply the configuration. See Apply configuration.