5
Logging and Troubleshooting
In previous chapters, we showed the basics of templates with multiple builders and provisioners providing code examples that should be free of errors. Obviously, creating these samples isn’t as smooth as just writing and building. There is a lot of troubleshooting involved in most Packer journeys. As the complexity goes up, it becomes difficult to manage logs, and sometimes it’s not obvious what’s going wrong. Here, we’ll describe some standard debugging tricks and how to manage complex logs in a parallel build. We’ll also cover some tips and tricks that prepare us for future chapters, including automation and CI pipelines.
In this chapter, we’ll cover the following topics:
- Managing stderr and stdout
- Using environment ...
Get HashiCorp Packer in Production now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.