Building an Image Hierarchy
In the previous chapter, we covered the bulk of Packer’s cloud plugins and builders and how they function in general behind the scenes. We also added some additional build sources to our single flat template. By now, it should be apparent how managing all resources through a single file can be difficult to manage, particularly when you’re building application images on top of your base images in sequential order. As Packer has no state management, how can you manage which images must be rebuilt and which may be skipped? How can we minimize wasted Packer runs and maximize code reuse? These are questions we will answer in this chapter.
In this chapter, we will cover some strategies for managing the workflow and hierarchy for your images. We will start fresh with a new series of templates and focus on some sample applications instead of the builders and platforms. We will do everything manually but design a process that is well prepared for...