Installing Migrate for Anthos

This topic describes how to install Migrate for Anthos on a processing cluster.

A processing cluster is a GKE cluster with Migrate for Anthos components installed, and which you use to migrate VMs before deploying them to your production cluster.

Using the steps in this topic, you'll use the migctl command-line tool or the Google Cloud Console to install the required Migrate for Anthos components on a GKE cluster you've already created.

Once you've deployed your migrated VMs as images to a production cluster -- assuming the processing cluster is no longer needed -- you can delete the processing cluster.

About migctl

Along with support in the Google Cloud Console, Migrate for Anthos includes the migctl command-line tool that you can use to perform all parts of a migration:

Before you begin

Installing Migrate for Anthos

GKE migctl

Use migctl commands to install Migrate for Anthos and configure it with the basics you'll need for migrating.

  1. Ensure that you created a service account for accessing Container Registry and Cloud Storage, and download the JSON key file, as described in Configuring a service account.

  2. Visit the GKE menu in Cloud Console.

    Visit the GKE menu

  3. In the list of clusters, locate the cluster you'll be using as a processing cluster and click its Connect button.

  4. In the Connect to the cluster dialog, under Command-line access, click Run in Cloud Shell to run the connect command in Cloud Shell.

    gcloud container clusters get-credentials my-cluster --zone us-central1-c --project my-project
    
  5. Set up Migrate for Anthos components on your processing cluster by running the migctl setup install command in Cloud Shell and specifying the installation service account:

    migctl setup install --json-key=m4a-install.json
    
  6. Validate the Migrate for Anthos installation by running the migctl doctor command.

    Before installation has completed, you might see a message such as the following. If so, wait a few minutes for installation to finish before running migctl doctor.

    migctl doctor
    [!] Deployment
        validation job is in-progress
    

    In the following example output, the check mark indicates that Migrate for Anthos has been successfully deployed.

    migctl doctor
    [✓] Deployment
    

GKE on-prem migctl

  1. Create a service account for accessing Container Registry and Cloud Storage and download the JSON key file, as described in Configuring a service account.
  2. Set your default project ID:
    gcloud config set project project-id
  3. If you are working with zonal clusters, set your default compute zone:
    gcloud config set compute/zone compute-zone
  4. If you are working with regional clusters, set your default compute region:
    gcloud config set compute/region compute-region
  5. Deploy migctl on your admin workstation:
    wget https://anthos-migrate-release.storage.googleapis.com/v1.5.0/linux/amd64/migctl
    sudo cp migctl /usr/local/bin/
    sudo chmod +x /usr/local/bin/migctl
    . <(migctl completion bash)
  6. Set up Migrate for Anthos components on your processing cluster by running the migctl setup install command:
    migctl setup install --gkeop --json-key=m4a-install.json
    
  7. Validate the Migrate for Anthos installation by running the migctl doctor command. Before installation has completed, you might see a message such as the following. If so, wait a few minutes for installation to finish before running `migctl doctor`.
    migctl doctor
    [!] Deployment
        validation job is in-progress
        
    In the following example output, the check mark indicates that Migrate for Anthos has been successfully deployed.
    migctl doctor
    [✓] Deployment
        

Console

Google Cloud Console can help you with the installation process by generating the necessary installation commands and running them in Cloud Shell.

  1. Open the Migrate for Anthos page in the Cloud Console.

    Go to the Migrate for Anthos page

  2. Click Add Processing Cluster.

  3. Select the cluster from the drop-down list.

  4. Execute each of the commands in Cloud Shell to create a service account for accessing Container Registry and Cloud Storage and install Migrate for Anthos components.

  5. Use the last Cloud Shell command to monitor the installation status.

    Before the installation has completed, you might see a message such as the following. If so, wait a few minutes for the installation to finish before running migctl doctor again.

    migctl doctor
    [!] Deployment
       validation job is in-progress
    

    In the following example output, the check mark indicates that Migrate for Anthos has been successfully deployed.

    migctl doctor
    [✓] Deployment
    
  6. Select Done after installation succeeds.

Installation options

You can create clusters of many sizes and configurations. For example, you might have a cluster with several node pools. You then use one node pool for processing migrations, one node-pool for running workloads, and another node pool for other operations.

By default, Migrate for Anthos is installed on all cluster nodes. To control which nodes are used by Migrate for Anthos, you can use the --node-selectors and --tolerations options to the migctl setup install command:

  • --node-selectors LABEL1=VALUE1,LABEL2=VALUE2,...

    Specifies a comma-separated list of label-value pairs that determine the nodes used by Migrate for Anthos. See Creating and managing labels for more on using labels.

  • --tolerations KEY1=VALUE1:EFFECT1,KEY2=VALUE2:EFFECT2,...

    Specifies a comma-separated list key-value pairs associated with an effect which together specify a node taint. A toleration means that the pods can run on the node taint specified by the key-value and effect.

    If you omit EFFECT and/or VALUE, then the tolerations matches taints with KEY,VALUE (for any EFFECT) and/or KEY (for any VALUE:EFFECT).

    See Controlling scheduling with node taints for more on node taints.

Next Steps