How to Set Up Google Cloud Platform (GCP) for Migrations

This guide walks you through the process of configuring the necessary Google Cloud Platform (GCP) resources required for using CloudM Migrate. This includes creating a Service Account, generating a private key, and setting up a Google Cloud Storage bucket.

1. Overview

To perform a migration, CloudM Migrate requires a secure way to access Google Cloud Storage for temporary data staging. This is achieved by creating:

  • A GCP Project: A dedicated space to organize your Google Cloud resources.

  • A Service Account: A special, non-human account that CloudM Migrate will use to authenticate with Google's APIs.

  • A Private Key (JSON or P12): A secure file that acts as the password for the Service Account.

  • A Cloud Storage Bucket: A container for storing your migration data within Google Cloud.

The recommended method is to use our automated PowerShell script, which creates and configures all these resources for you.

CloudM Hosted Region Note: For migrations to Google Workspace using the CloudM Hosted platform, all infrastructure is located in the Google Cloud europe-west region.

2. Prerequisites

Before you begin, ensure you have the following:

  • GCP Account Permissions: An account with the resourcemanager.projects.create role or an account that is an "Owner" on an existing GCP project. 

  • PowerShell: The ability to run PowerShell as an Administrator on your machine.

  • Authenticated Browser: An active browser session where you are logged into your target GCP account. This should be the last browser tab you have used.

  • GCP Configuration Script: Download the script file by right-clicking and saving it from this link: GCP Configuration script.

3. Automated Setup via PowerShell (Recommended)

This process will initialize the Google Cloud command-line interface (CLI) on your machine and then run the configuration script.

Part 1: Install and Initialize the Google Cloud SDK

  1. Install Google Cloud CLI: If you haven't already, download and install the CLI from the official documentation: Install the Google Cloud CLI.

  2. Run PowerShell: Open PowerShell with "Run as Administrator".

  3. Initialize the SDK: Execute the following command to begin the initialization process.

    PowerShell
    gcloud init
    
  4. Re-initialize Configuration: When prompted, enter 1 to choose Re-initialize this configuration [default] with new settings.

  5. Log In: Enter 2 to Log in with a new account. Your browser will open to a Google authentication page. Log in with your high-privilege GCP account.

  6. Grant Permissions: Click Allow in the browser to grant the SDK permissions to access your account. The page will confirm, and you can close the browser tab and return to PowerShell.

  7. Create a New Project: When asked if you want to create a new project, enter Y.

  8. Enter a Project Name: Provide a unique name for your project. It must be between 6 and 30 characters and contain only lowercase letters.

    • Permission Error: If you see an error like Permission 'resourcemanager.projects.create' denied, it means the account you authenticated with does not have sufficient permissions to create a new project. You must use a different account or be granted the correct permissions.

Part 2: Execute the CloudM GCP Configuration Script

  1. Navigate to Script Location: In your PowerShell window, change the directory to where you saved the GCPConfig.ps1 script.

  2. Execute the Script: Run the script by entering:

    PowerShell
    .\GCPConfig.ps1
    
  3. Follow the Prompts: The script will now ask for several inputs. Enter a value for each prompt:

    • Project ID: Enter the Project Name you created in the previous section.

    • Service Account ID: Enter a name for the new service account (e.g., cloudm-migrate-svc). It must be 6-30 lowercase characters.

    • Region: Enter the region where your storage bucket will be created (e.g., us-central1 or europe-west1).

    • BucketName: Enter a globally unique name for your storage bucket. Follow Google's naming conventions.

    • KeyName (Optional): You can provide a custom name for the key file.

    • StorageClass (Optional): The default is 'STANDARD'. You can also choose 'NEARLINE', 'COLDLINE', or 'ARCHIVE'.

    • ServiceAccountKeyType (Optional): The default is 'json'. You can also choose 'p12'.

    • Output Path: Specify a local folder path where the generated key and log files will be saved (e.g., C:\CloudM\GCPConfig).

Part 3: Collect Your Credentials

Once the script completes, it will output the critical information you need for your CloudM Migrate configuration. Copy and save this information securely.

  • Service Account Email Address: [service-account-id]@[project-id].iam.gserviceaccount.com

  • Path to Service Account JSON key: The local path where your key file was saved.

  • Bucket URL: The URL of the newly created bucket.

  • KMS Key Path (Optional): If a Key Management Service key was used.

  • Encryption Key File Path (Optional): If you chose to use a customer-supplied encryption key.

Important: Due to Google's internal replication processes, there may be a delay of up to 2 hours before the newly created service account and bucket are fully active and usable for migrations.

Was this article helpful?
0 out of 0 found this helpful