nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #166

Your development team has been tasked with maintaining a .NET legacy application. The application incurs occasional changes and was recently updated. Your goal is to ensure that the application…

The correct answer is B. Use Cloud Build to deploy the application as a new Compute Engine image for each build. Use. Since containers are not approved, Cloud Run (A) and GKE (D) are eliminated. Using Cloud Build to create a new immutable Compute Engine VM image (a 'golden image') per build ensures that the exact same OS, runtime, and application state is deployed to every environment. This…

Building and deploying applications

Question

Your development team has been tasked with maintaining a .NET legacy application. The application incurs occasional changes and was recently updated. Your goal is to ensure that the application provides consistent results while moving through the CI/CD pipeline from environment to environment. You want to minimize the cost of deployment while making sure that external factors and dependencies between hosting environments are not problematic. Containers are not yet approved in your organization. What should you do?

Options

  • ARewrite the application using .NET Core, and deploy to Cloud Run. Use revisions to separate the
  • BUse Cloud Build to deploy the application as a new Compute Engine image for each build. Use
  • CDeploy the application using MS Web Deploy, and make sure to always use the latest, patched
  • DUse Cloud Build to package the application, and deploy to a Google Kubernetes Engine cluster.

How the community answered

(64 responses)
  • A
    11% (7)
  • B
    80% (51)
  • C
    6% (4)
  • D
    3% (2)

Explanation

Since containers are not approved, Cloud Run (A) and GKE (D) are eliminated. Using Cloud Build to create a new immutable Compute Engine VM image (a 'golden image') per build ensures that the exact same OS, runtime, and application state is deployed to every environment. This avoids environmental drift - the primary cause of 'works in dev, breaks in prod' issues. MS Web Deploy (C) applies changes on top of an existing server state, meaning the target environment's current configuration and installed software can influence the result, making deployments inconsistent. Immutable infrastructure via VM images is the correct pattern here.

Topics

#CI/CD#Deployment Strategies#Compute Engine#Immutable Infrastructure

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice