From the course: Learning HashiCorp Packer

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Baking a Jenkins image

Baking a Jenkins image - Packer Tutorial

From the course: Learning HashiCorp Packer

Start my 1-month free trial

Baking a Jenkins image

- We can take the hardened based image we created in the previous video and build upon it. In this video we'll use it as a base for a Jenkins server image. Using Packer to build a Jenkins server allows you to treat your Jenkins instances as cattle, rather than a pet. Which is a key DevOps concept for building immutable servers so they can be easily replaced with identical servers in the event of a failure. If we lose our Jenkins server we can launch a replacement from this image, and will be up and running again in minutes. So first, let's go back to our template, and amend the filter, so that instead of finding the image that was provided by Canonical, we actually find the image that we made in the previous video. Instead of the owner being Canonical's ID, we can use the keyword, self, which Packer will translate into our own owner ID for us. And rather than searching for an Ubuntu image, we'll search based on the name that we called the previous one, which was hardening-base. And if…

Contents