Migrating a Tomcat workload

This topic describes how to migrate Tomcat clusters to GKE with Migrate to Containers. Migrate to Containers helps accelerate the containerization of traditional workloads and their deployment into GKE and Anthos clusters.

To perform the migration, you will use a processing cluster you created with the steps in Installing Migrate to Containers.

When you use Migrate to Containers to migrate your Tomcat workloads, you can leverage Tomcat's features and architecture to:

  • Automatically separate subsets of applications into individual containers.
  • Retain your Tomcat application's existing keystores, truststores, and certificates from the source VM.
  • Dynamically determine optimal memory allocation for JVM applications.
  • Copy specific data volumes and data volume claims from your source VMs.


Unsupported features

The following Tomcat features are not supported:

  • Clustering/Session replication.

  • Windows support for Tomcat migrations using Windows workloads.

  • Password extraction: Migrate to Containers does not extract passwords embedded in the Tomcat server configuration files. We recommend consuming these passwords from environment variables, provided by mounted secrets. For more information, see using secrets as environment variables

Migration procedure

Diagram of steps to migrate with Migrate to Containers

The steps to migrate with Migrate to Containers:

  1. Add a migration source.

    You start a migration by configuring a source that represents the source platform from which you are migrating. If you already have a source from a previous migration and the VMs you're migrating are from the same source, you can re-use it.

  2. Create a migration plan.

    Create the migration plan that you then review and customize before executing the migration.

  3. Customize your migration plan.

    Edit the migration plan for your specific requirements before executing the migration.

  4. Execute the migration.

    Execute the migration to extract the container artifacts, which include the Dockerfile and other files necessary to build a container image.

  5. Monitor the migration.

    Monitor the progress of a migration and inspect migration activity logs.

  6. Build a Tomcat container image

    Use the generated artifacts to build a container that you can then deploy to a cluster.

The steps to deploy with Migrate to Containers:

  1. Deploy workload to cluster

    Deploy your container to a testing or production cluster.

  2. Monitor migrated workload.

    Use Cloud Logging or kubectl to view container logs.

Next Steps