Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Adding Packer Plugins

HashiCorp Packer allows users to create identical, cross-platform machine images by writing templates that leverage our existing infrastructure tools; however, Packer doesn't always offers native support for everything we require. In this hands-on lab, we'll prepare our desired Packer setup by installing some Packer plugins.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 15m
Published
Clock icon Oct 02, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Add the Windows Update Plugin

    1. Locate the appropriate binary from the plugin repository and download it:

      wget https://github.com/rgl/packer-provisioner-windows-update/releases/download/v0.9.0/packer-provisioner-windows-update-linux.tgz
      
    2. Expand the file:

      tar zxvf packer-provisioner-windows-update-linux.tgz
      
    3. Make binary executable:

      chmod +x packer-provisioner-windows-update
      
    4. Create the necessary plugins directory:

      mkdir -p ~/.packer.d/plugins
      
    5. Move the binary:

      mv packer-provisioner-windows-update ~/.packer.d/plugins/
      
  2. Challenge

    Add ARM Builder Dependencies

    1. The ARM Builder plugin is a Go module; install a version of Go newer than 1.11.0:

      wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz
      
      sudo tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
      
      export PATH=$PATH:/usr/local/go/bin
      
    2. Install the other module dependencies:

      sudo apt install kpartx qemu-user-static
      
  3. Challenge

    Add the ARM Builder Plugin

    1. Pull down the repository:

      git clone https://github.com/solo-io/packer-builder-arm-image.git
      
      cd packer-builder-arm-image
      
    2. Build the module:

      go mod download
      
      go build
      
    3. Move the resulting binary:

      mv packer-plugin-arm-image ~/.packer.d/plugins/
      
    4. Clean up your home directory when finished:

      cd
      
      rm -rf packer*
      
      sudo rm -rf go*
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans