4 Provisioning with Packer

In the last chapter, we created an Amazon AMI from a stock Ubuntu 17.04 base image. It was a pretty boring image though—essentially a clone of that stock image, renamed. To customize our image a bit we’re going to take advantage of a Packer component called a provisioner.

Provisioners execute actions on the image being built. These actions, depending on the provisioner, can run scripts or system commands, and execute third-party tools like configuration management. Provisioners come in a variety of types. You can use one or more types of provisioners during a build—for example, you could use one provisioner to configure and install the requirements for another provisioner.

In this chapter we’ll explore several provisioners, ...

Get The Packer Book 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.