Scaling Large Builds
In the previous section, we demonstrated strategies for a structured image hierarchy, involving building shared base images and aggregate sub-images that extend the purpose of the common base image. We used a serial build script to build several image trees one at a time. The strategy is to separate these logically so that they can be built in parallel in the quickest possible time. If a minor patch is applied to our gold image, rebuilding it across AWS, Azure, and GCP one at a time will be painfully slow, and it will take a long time to learn of errors at a later stage. When building across multiple environments and complex image trees, development time becomes very important. This will set us up for automation when, in the next chapter, we streamline Packer builds via automation pipelines. In this chapter, we will take the example code from the previous chapter and logically organize it in a way that simplifies parallel builds and storage optimization for a multi...