PROFESSIONAL-CLOUD-DEVELOPER · Question #191
You need to migrate a standalone Java application running in an on-premises Linux virtual machine (VM) to Google Cloud in a cost-effective manner. You decide not to take the lift-and-shift approach, a
The correct answer is D. Use Jib to build a Docker image from your source code, and upload it to Artifact Registry. Deploy. The correct answer is D: Use Jib to build a Docker image from source code and upload it to Artifact Registry, then deploy to GKE. Jib is an open-source Google tool that builds optimized Docker and OCI images for Java applications directly from Maven or Gradle, without requiring a
Question
You need to migrate a standalone Java application running in an on-premises Linux virtual machine (VM) to Google Cloud in a cost-effective manner. You decide not to take the lift-and-shift approach, and instead you plan to modernize the application by converting it to a container. How should you accomplish this task?
Options
- AUse Migrate for Anthos to migrate the VM to your Google Kubernetes Engine (GKE) cluster as a
- BExport the VM as a raw disk and import it as an image. Create a Compute Engine instance from
- CUse Migrate for Compute Engine to migrate the VM to a Compute Engine instance, and use
- DUse Jib to build a Docker image from your source code, and upload it to Artifact Registry. Deploy
How the community answered
(43 responses)- A9% (4)
- B2% (1)
- C5% (2)
- D84% (36)
Explanation
The correct answer is D: Use Jib to build a Docker image from source code and upload it to Artifact Registry, then deploy to GKE. Jib is an open-source Google tool that builds optimized Docker and OCI images for Java applications directly from Maven or Gradle, without requiring a local Docker daemon or a Dockerfile. This is a true modernization approach that produces a container image from source code with minimal effort. Migrate for Anthos (A) automates container migration from an existing VM, which is still essentially lift-and-shift; it preserves the legacy runtime environment rather than modernizing the code. Exporting the VM as a raw disk (B) is a lift-and-shift approach to Compute Engine, not containerization. Migrate for Compute Engine (C) migrates the VM to Compute Engine first and then requires additional steps - it is the most effort-intensive and not a direct modernization path.
Topics
Community Discussion
No community discussion yet for this question.