Google Professional Cloud DevOps Engineer Question 204
Single answerGoogle Cloud PlatformYour team is tasked with setting up a development environment for a new project in Google Cloud. The environment must include pre-installed tools such as the Cloud SDK, a custom IDE configuration, and security policies. You want to ensure that developers can quickly and consistently provision environments without manual steps. Which approach should you take to achieve this goal?
- A
Use custom VM images with pre-installed tools and configurations, and deploy them using an instance template.
- B
Create a startup script that installs the required tools and configurations every time a VM instance is created.
- C
Manually configure the environment for each developer and document the steps for consistency.
- D
Use a containerized environment with Docker images containing the required tools and configurations.
Show answer and explanation
Correct answer: A
Explanation
Custom VM images pre-loaded with the required tools and configurations provide a reliable and efficient method for bootstrapping environments. Using instance templates ensures consistency and scalability, making it ideal for DevOps workflows. While other options like startup scripts or Docker may work, they are either less efficient or outside the scope of the specific requirements outlined in the question.
- A. Correct.
This is the correct approach because custom VM images allow for consistent provisioning of environments with pre-installed tools, ensuring speed and avoiding manual errors. Instance templates provide scalability and reusability.
- B. Incorrect.
While startup scripts can install tools dynamically, they might increase provisioning time and introduce variability if external dependencies fail. This is less efficient than using custom images.
- C. Incorrect.
Manually configuring environments is prone to errors, time-consuming, and cannot guarantee consistency across developers.
- D. Incorrect.
Using Docker images can be an alternative, but the question specifies bootstrapping environments for development, and custom VM images are more aligned with the use case in this scenario.