Upgrading Migrate for Anthos to 1.5

The upgrade process you use is based on the environment where you run migctl:

  • When using a Google Kubernetes Engine (GKE) or Anthos processing cluster in Google Cloud, you run migctl in Cloud Shell.

    In Cloud Shell, the latest release of migctl is installed automatically. You then only have to upgrade your processing clusters.

  • When using a Anthos clusters on VMware processing cluster, install migctl on your admin workstation.

    You first download and install the latest release of migctl on your on-repm admin workstation, then use it to upgrade your processing clusters.

To upgrade a previous release of Migrate for Anthos to version 1.5:

  1. Connect to your processing cluster:

    Cloud Shell

    1. Visit the GKE menu in Cloud Console.

      Visit the GKE menu

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

    3. 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 cluster-name --zone zone-name --project project-name
      

    on-prem

    1. Connect to your cluster by using a command in the form:

      gcloud container clusters get-credentials cluster-name --zone zone-name --project project-name
      
  2. Check for any existing migrations and delete them:

    1. List current migrations:

      migctl migration list
      
      NAME                STATUS      CURRENT-OPERATION
      my-migration        Completed   GenerateArtifacts
      another-migration   Running     GenerateMigrationPlan
    2. Delete all completed migrations, one by one, using the following command:

      migctl migration delete my-migration
    3. For any migration that is currently running, repeat "Step a" above and wait for it to complete. Then delete it.

  3. Upgrade the cluster:

    Cloud Shell

    In Cloud Shell run the command:

    migctl setup upgrade

    The command:

    • Uninstalls version 1.4 of Migrate for Anthos and installs version 1.5.

    • Upgrades existing 1.4 migration sources to version 1.5.

    on-prem

    1. Deploy migctl on your admin workstation:

      wget https://anthos-migrate-release.storage.googleapis.com/v1.5.1/linux/amd64/migctl
      sudo cp migctl /usr/local/bin/
      sudo chmod +x /usr/local/bin/migctl
      . <(migctl completion bash)
    2. Run the upgrade:

      migctl setup upgrade --gkeop --json-key=m4a-install.json

      Where m4a-install.json is the JSON key file of the service account for accessing Container Registry and Cloud Storage you used to install Migrate for Anthos, as described in Configuring a service account.

      The command:

      • Uninstalls version 1.4 of Migrate for Anthos and installs version 1.5.

      • Upgrades existing 1.4 migration sources to version 1.5.

  4. Validate the upgrade by running the migctl doctor command.

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

    migctl doctor
    [✓] Deployment
      [✓] Admission Controller
      [!] Components
        Job controllers-deploy-cert is not ready
        Job controllers-upgrade is not ready
    

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

    migctl doctor
    [✓] Deployment
  5. After the upgrade completes, you must recreate your migrations to validate that the migration sources were upgraded successfully. See Creating a migration.

  6. After recreating your migrations successfully, perform the upgrade cleanup step:

    migctl setup upgrade --cleanup