Review the migration artifacts

This page describes the migration artifacts that you generate as part of your migration.

Before you begin

About the generated artifact files

The artifact files generated during the migration include the following:

  • deployment_spec.yaml: The YAML file that configures your workload. You can use kubectl apply with this file to deploy the workload to another cluster, such as a production or test cluster.

  • Dockerfile: The Dockerfile used to build the image for your migrated VM.

  • blocklist.yaml: The list of container services to disable based on your settings in the migration plan. Edit this file to control the list of services. For more information, see Customize the services list.

  • migration.yaml: A copy of the migration plan. You can use this file to verify what was done as part of the migration.

  • logs.yaml: A list of log files detected on the source VM. Data written to these log files by the migrated workload is forwarded to Cloud Logging. Edit this file to control log writing. For more information, see Customize log data written to Cloud Logging.

The deployment_spec.yaml file

This file is a YAML file that you can use to deploy your workload to another cluster, such as a test or production cluster. If you don't configure a data migration, you will generate a Deployment object. When the data migration is configured, you generate a stateful set object.

Dockerfile

Use this file if you need to generate a new version of the image. For example, you might want to install a package and capture a new image afterward. Rebuilding the image can also be useful when the Migrate to Containers CLI is upgraded, for example to implement a bug fix, and you want to rebuild the image with the new Migrate to Containers CLI runtime. The upgraded runtime is available in the Container Registry.

You can edit this file like any other Dockerfile to customize your image. For tips, see Best practices for writing Dockerfiles. For information on how to edit the Dockerfile, see Post-migration image updates.

# Please refer to the documentation:
# https://cloud.google.com/migrate/containers/docs/dockerfile-reference

FROM gcr.io/my-project/v2k-run-embedded:v1.12.0

# Image containing data captured from the source VM
FROM gcr.io/my-project/my-vm-instance-1-non-runnable-base:v1.0.0 as source-content

COPY --from=migrate-for-anthos-runtime / /

ADD blocklist.yaml /.m4a/blocklist.yaml

ADD logs.yaml /code/config/logs/logsArtifact.yaml

# If you want to update parts of the image, add your commands here.
# For example:
# RUN apt-get update
# RUN apt-get install -y \
#       package1=version \
#       package2=version \
#       package3=version
# RUN yum update
# RUN wget http://github.com

# Migrate to Containers image includes entrypoint
ENTRYPOINT [ "/.v2k.go" ]

What's next