liveBook · Manning

Migration plan

As explained in Google Anthos in Action

A migration plan is a configuration describing how an application is to be transformed and migrated from its source environment.

A migration plan is the generated configuration for transforming a source VM into a containerized workload with Migrate for Anthos (M4A). It gives you a point to review and adjust the transformation before generating deployment artifacts. Most plans need no changes, but you can remove unneeded VM components or add configuration. section 15.4.3 section 15.0

A practical migration sequence is:

  • Prepare a processing cluster and register a migration source. For a Compute Engine source, the example uses a service account with compute.viewer and compute.storageAdmin bindings and a JSON key. section 15.4.2
  • Create a migration by specifying its name, source, VM ID, and intent. The console workflow also asks for the VM OS type. M4A then generates the plan. section 15.4.2 section 15.4.3
  • Inspect the plan before generating artifacts. Use `migctl migration get my-migration` in the CLI or the console’s Options menu to review and edit it; `migctl migration status my-migration -v` provides detailed progress information. section 15.4.2 section 15.4.3
  • Generate and retrieve the artifacts. These can include a Dockerfile, container image, Deployment specification YAML, migration plan YAML, and artifact links YAML. Check the deployment specification separately for how the workload will be exposed. section 15.4.3 section 15.4.2

Compute Engine VM to container

For an Apache VM, `migctl migration create my-migration --source http-source --vm-id http-server-demo --intent Image` creates the migration and its plan. After inspection, `migctl migration generate-artifacts my-migration` produces artifacts for deployment. In the example, a LoadBalancer Service is added to the generated `deployment_spec.yaml` to make the migrated web server reachable on port 80. section 15.4.2

Windows workloads follow a similar plan-review sequence, but artifact handling differs: retrieve the plan, edit its YAML if needed, and upload the change with `migctl migration update my-migration`. The generated Windows artifacts are downloaded from Cloud Storage and used to build and push a container image before deployment to GKE. section 15.4.4

How Google Anthos in Action covers it

How deep it goes
Walks through plan creation, inspection, optional editing, and artifact generation without detailing individual migration plan YAML fields.
Examples
Uses an Apache VM CLI migration, a Tomcat console migration, and a Windows workload CLI workflow.
What it assumes
Assumes a configured processing cluster and migration source; the Compute Engine example also prepares source credentials and IAM bindings.
What you can do after
Operate/configure it with migctl or the Google Cloud console to review, optionally edit, and generate artifacts from a migration plan.
How it connects
Connects VM migration to migration sources, processing clusters, Dockerfiles, container images, and Kubernetes Deployment specifications.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.