Using HCP ancestry
We have discussed the concept of image hierarchy and ancestry for parent/child image relationships, but we haven’t discussed how to use it. If one image serves as a base image for a hierarchy of application images, then you can retire or deprecate them all at the same time by deprecating the ancestor’s channel. The way to do this is to create another template, using the hcp-packer-image
data source, to look up another AMI ID to extend with further images. We will create an example where we extend the latest Amazon Linux image used in the sample template: https://github.com/PacktPublishing/HashiCorp-Packer-in-Production/tree/main/Chapter10.
We will select the development channel of al-latest
but add GPU support using NVIDIA’s latest drivers, tuning the environment for 3D render farm operations. The end result is to look up the current AMI ID for our region. Specifying the minimal fields for bucket_name
, channel
, and region
would be enough,...