Creating a golden image using Packer
Packer is an open source tool that was created by HashiCorp for creating images. It works on most of the cloud platforms and is well integrated with the most popular configuration management tools. Packer understands the target environment and creates images to fit well on the target cloud platform. Creating images for standard use for development and also for applications is a common task at the enterprise level. While burning images for standard VMs, security and enterprise policies can be baked into the image. For application images, new images can be created for every release/version of the software. This helps in traceability and building robust systems.
Getting ready
The following are the initial setup verification steps before the recipe can be executed:
- Create or select a GCP project
- Enable billing and enable the default APIs (some APIs like BigQuery, storage, monitoring, and a few others are enabled automatically)
How to do it...
In this recipe, we...