Skip to content

Packer

Warning

Missing video.


Once you're able to configure a remote EC2 Instance (or any operating system) with the configuration you want (via Ansible), you'll want to learn to build machine images to speed up the provisioning of your software stacks. This is where Packer comes into play.

Packer is another HashiCorp tool, and when combined with Terraform and Ansible, it's pretty damn powerful. It can provision a lot of image types, from AWS AMIs, Azure VM Images, Docker images, and more. We're going to use to build an AMI.

Curated Materials

Let's go over the official documentation and then look at an awesome video from Sam Meech-Ward.

Official Documentation

First, you're going to need to install Packer locally. Let's make sure you've got that covered first:

Look familiar?

The download/install page is identical to Terraform's, so the instructions should be quite clear and easy to follow.

Next, go over the entire tutorial series for using Packer in an AWS environment, but ignore the final step on building a "Vagrant box with packer post-processing". Instead of that Vagrant step, look at the Ansible "provisioner" from the Packer documentation - linked below - and use the example to experiment with running Ansible Playbooks agaist your Packer builds to provision the instance.

Sam Meech-Ward

This video from Sam is pretty good. Very clear, well produced video with excellent step-by-step guidance. It's an excellent next step from the above HashiCorp documentation (which can be pretty dry) and involved provisioning an actual application. Just keep in mind that Sam isn't using Ansible, but a shell script, to provisoon the instance.

Project(s)

Warning

Missing content.

  1. Sam's video, above, could use an Ansible Playbook in place of a shell script - we want you to write that Playbook.

Challenges

Warning

Missing content.