Out-of-the-Box Features for Deploying Custom Machine Images in Compute Engine

Deploying Custom Machine Images in Compute Engine

Question

Your application is built as a custom machine image.

You have multiple unique deployments of the machine image.

Each deployment is a separate managed instance group with its own template.

Each deployment requires a unique set of configuration values.

You want to provide these unique values to each deployment but use the same custom machine image in all deployments.

You want to use out-of-the-box features of Compute Engine.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

https://cloud.google.com/compute/docs/instance-groups

In this scenario, you have multiple unique deployments of a custom machine image, and each deployment requires a unique set of configuration values. You want to use the same custom machine image in all deployments and use out-of-the-box features of Compute Engine to provide these unique configuration values to each deployment.

There are several options available to provide unique configuration values to each deployment:

A. Place the unique configuration values in the persistent disk. This option involves creating a persistent disk and attaching it to each instance in the deployment. The unique configuration values can then be stored on the persistent disk and accessed by the instance at startup. However, this approach requires additional management overhead and can be more complex to set up and maintain.

B. Place the unique configuration values in a Cloud Bigtable table. This option involves storing the unique configuration values in a Cloud Bigtable table and accessing them from the instance at startup. However, this approach may not be ideal for small deployments as it requires additional setup and can be more complex to manage.

C. Place the unique configuration values in the instance template startup script. This option involves specifying the unique configuration values in the instance template startup script. The startup script is executed when the instance is started and can be used to provide any necessary configuration or setup. However, this approach may not be ideal for larger deployments with many instances, as updating the startup script requires updating each instance individually.

D. Place the unique configuration values in the instance template instance metadata. This option involves specifying the unique configuration values in the instance template instance metadata. Instance metadata is a set of key-value pairs that can be accessed by the instance at startup. This approach is easy to set up and maintain and is ideal for deployments with many instances, as updating the instance metadata applies to all instances that use the template.

Option D is the best answer in this scenario as it allows you to provide unique configuration values to each deployment while using the same custom machine image in all deployments. By placing the unique configuration values in the instance template instance metadata, you can easily manage and update the configuration values for all instances that use the template.