Automating Packer Builds
In the previous section, we covered the lifecycle management of images and how to make sure you retain historical data about images for archiving, forensics, or auditing. Now, we’re going to put together everything we’ve learned and apply automation using a full GitOps workflow. Automation really should be applied early on in your Packer journey, but it’s important that we’ve covered all of the basics of manual builds first to understand how to properly automate them. Some of the tools we created earlier, such as scripts to build all images in a directory, are perfectly set up for basic Continuous Integration (CI) pipelines via tools such as Jenkins, GitLab CI, and GitHub Actions. There are many tools to cover, but we will first cover some fundamentals of automation that must be considered in any automation solution. Then, we will cover some helpful examples using widely available open source tools that are commonly used in enterprise...