Overview
If you have any questions while working through this documentation, contact your PlanetScale Solutions Engineer for assistance.NoteThis guide is only intended for PlanetScale Managed customers currently working with the PlanetScale team. You cannot set PlanetScale Managed up on your own without PlanetScale enabling it for your organization. If you are interested in PlanetScale Managed, please contact us.
Step 1: Account requirements
A new GCP project must be set up following this documentation to successfully bootstrap a new PlanetScale Managed cluster. To proceed with this guide, an existing GCP organization and an active Cloud Billing account are required. Further information on creating GCP organizations can be found in the creating and managing organization resources documentation.Dedicated GCP project
PlanetScale Managed requires the use of a standalone project in GCP. This project should not have any existing resources running within it, as PlanetScale will request a set of permissions as defined in step 2.Modification of accounts
Once the GCP project is handed over to PlanetScale via granting IAM permissions, it should not be modified. Issues caused by modifications of the GCP project or its resources void the PlanetScale Managed SLA. Contact support@planetscale.com to discuss configuration changes or customization.Step 2: Bootstrap GCP project
Before setting up the IAM roles, you must create a new GCP project, assign it to a GCP Billing Account, and enable the Compute Engine API.Create a new GCP project
A new GCP project can be created via the command line if the gcloud SDK is installed and configured:Assign the new project to a GCP Billing Account
Next, assign the new project to a GCP Billing Account inside your organization. The account to use will depend on your organization and its policies.NoteIf the user who created the project has the Billing Administrator role, the project may already have billing enabled. Please review the settings to ensure it is attached to the intended Billing Account.
Enable Compute Engine API
The Compute Engine API must be enabled on the new project. This can be done via the command line:Assign IAM Roles
For PlanetScale to provision resources in the project, the following IAM roles must be granted to the following service accounts:terraform-planner@planetscale-operations.iam.gserviceaccount.com
service account:roles/viewer
- Viewer
terraform-runner@planetscale-operations.iam.gserviceaccount.com
service account:roles/cloudkms.admin
- Cloud KMS Adminroles/compute.admin
- Compute Adminroles/container.admin
- Kubernetes Engine Adminroles/container.clusterAdmin
- Kubernetes Engine Cluster Adminroles/iam.roleAdmin
- IAM Role Adminroles/iam.securityAdmin
- Security Adminroles/iam.serviceAccountAdmin
- Service Account Adminroles/iam.serviceAccountKeyAdmin
- Service Account Key Adminroles/logging.admin
- Logging Adminroles/serviceusage.serviceUsageAdmin
- Service Usage Adminroles/storage.admin
- Storage Adminroles/viewer
- Viewer
gcloud
command line tool:
Step 3: Requesting an initial quota increase
By default, GCP provides most new projects with quotas that are too small for PlanetScale’s initial provisioning process. Submit increase requests for the following quotas. This must be done for all regions in which PlanetScale will provision resources. Depending on your organization, the default quotas may already be at or above these levels:compute.googleapis.com/ssd_total_storage
: 10000 GBcompute.googleapis.com/disks_total_storage
: 10000 GBcompute.googleapis.com/n2_cpus
: 256compute.googleapis.com/n2d_cpus
: 256compute.googleapis.com/cpus_all_regions
: 256compute.googleapis.com/instances
: 100
NoteAfter initial provisioning, PlanetScale will manage quotas on behalf of the customer. Customers do not need to request quota increases for future upgrades or scaling and should not restrict quotas. Limiting quotas may result in service interruptions.
Step 4: Initiating the provisioning process
Once the GCP project has been created, the IAM roles have been applied, and the quota increases have been granted, notify your Solutions Engineer, providing them the following information:- The name of the organization that you have created on
app.planetscale.com
. - The GCP project name
- A confirmation of the region(s) that you have chosen for the deployment to reside in. The canonical list of regions can be found in the Google Cloud Regions and Zones documentation.
NoteOptionally, PlanetScale can connect you to your databases via GCP Private Service Connect with PlanetScale Managed. See the GCP Private Service Connect documentation for more information on establishing a Private Service Connect connection.