We may earn an affiliate commission when you visit our partners.
Course image
Bryan Krausen • 100,000+ Enrollments Worldwide and Gabe Maentz

Master HashiCorp Packer to automate your machine images across multiple platforms - a critical skill to enabling automation in your environments.

Read more

Master HashiCorp Packer to automate your machine images across multiple platforms - a critical skill to enabling automation in your environments.

This is the most extensive and thorough course on Udemy for learning how to use HashiCorp Packer in your organization. It is the only course that teaches you all about using HCL2 to create your Packer templates, the new standard moving forward. It doesn't matter if you have never used Packer before or have been writing Packer templates in the older JSON style. You'll step away from this course ready to tackle any Packer build.

This course includes in-depth lectures on all of the core HashiCorp Packer components and tons of included labs. You also get access to hands-on labs that you can perform in your own environment, as we believe taking a hands-on approach is the best way to learn. Each lesson includes a mindmap of the topics, a PDF of the slides, and multiple labs to demonstrate the topics at hand.

Beyond getting comfortable with HashiCorp Packer, we're taking it one step further and showing you how to integrate HashiCorp Packer with other automation tools, such as HashiCorp Terraform, HashiCorp Vault, and GitLab CI/CD. We'll demonstrate building images on multiple public cloud platforms, and we'll even show you how to build VMware images using Packer.

We cover a wide variety of topics, including:

  • HashiCorp Packer intro and the problems it solves

  • Use Cases and Examples

  • Writing Packer Templates using HCL2 (the new standard for Packer 1.7+)

  • Different Builders

  • Using Variables

  • Provisioners

  • Post-Processors

  • Code Organization

  • Integrations such as automation pipelines, secrets management, Terraform, and more.

You will get lifetime access to a wealth of content plus all of the labs for your own use. Don't forget that this course also comes with Udemy's 30-day guarantee.

About HashiCorp Packer

Packer is an open-source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel.

Enroll now

What's inside

Learning objectives

  • The most up-to-date course on hashicorp packer
  • Learn to automate the creation of machine images
  • Understand the core components and functionality of packer
  • Perform real-world solutions with packer hcl2
  • Get hands-on experience with packer using our included labs
  • Access to all the course content - slides, hands-on labs, mind maps, and lab guides

Syllabus

Course Introduction

Welcome to the best HashiCorp Packer course on the market - Building Automated Machine Images using HashiCorp Packer. We're looking forward to telling you all about the course, introduce your instructors, and get you excited about all the content that follows.

Read more
GitHub Repo for Supporting Files
IMPORTANT - Course Updates and Packer 1.10+
Course Review
Course Feedback
This section will introduce students to HashiCorp Packer. We'll learn about the problems Packer helps us solve, how to install Packer, the various components, and even start jumping into some labs.

This lecture will briefly introduce the Introduction to HashiCorp Packer section.

Why is Packer so popular and continues to gain momentum in the market right now? We'll discuss this and much more in this lecture as we define the problem that Packer solves for us.

What is Packer and what can it do for me? Learn where Packer fits in the HashiCorp ecosystem, what functionality Packer provides us, and the primary use cases and benefits of using Packer.

While Packer is pretty simple, there are multiple components that we need to be aware of to properly create the artifacts we're looking for in our cloud or on-premises environment. Learn more about all the different components here.

Ok, you're sold on Packer and want to start using it, but how do you get it installed? Well, you're in luck because that's what this lecture is all about.

Did somebody say demo? Yep, our first demo where we'll install Packer to a brand new machine. But stay tuned, because we'll just continue to build out the lab as we continue through the course.

Learn how to interact with Packer using its only available interface, the Command Line. We'll break it all down for you so you're ready to jump right in and put Packer to use in your own environment.

More Labs....this time we'll show you all that cool CLI goodness we just learned about on our machine that we just installed Packer on.

By now you're getting to know Packer pretty well, and you can even interact with it using the CLI, but how does all this magic work? We'll break it down for you to showcase the workflow with a great example.

Oh snap, another lab? And we're still in the Intro section? Sweet! So...remember that awesome workflow that we just showcased a minute ago? Yea....the AWS one? Well, let's jump into the lab and actually do it and show you the workflow IRL <--- that means in real life...that's how the kool kids write it I'm told. In our case, maybe it means In a Real Lab :)

Nice, you made it to the end of this section. Think about all the awesome stuff you just learned in this section and it's just the Intro section. If you're not excited to continue on, go build all this manually and come back to us when you're tired of clicking around int he console :)

Writing Packer Templates

Welcome to this section, where we'll talk about how to write Packer templates. We'll focus on HCL in this course but we'll mention JSON as well.

In this section, we'll focus on the HCL syntax for your Packer templates.

In this lab, we will utilize the packer hcl2_upgrade command to convert JSON to HCL2 templates.

This lecture will ensure students understand how to work with the individual Packer components when writing templates in the HCL format.

This lab will walk you through updating a Packer HCL Template. It uses the amazon-ebs source to create a custom image in the us-west-2 region of AWS.

Builders

Welcome to the Builders section, where you'll learn about what Builders are and how to use them.

This demo will walk students through the creation of an AWS AMI using the amazon-ebs builder.

This demo will walk you through building a new image on the Azure cloud platform.

This demo will walk you through building a new image on the Google Cloud Platform.

This demo will walk you through building a new image on the VMware platform.

This lab will walk you through updating your Packer Template to build images across multiple regions within AWS.

This lab will walk you through updating your Packer Template to build different images for each operating system.

This lab will walk you through updating your Packer Template to build images across AWS and Azure.

This quick demo will show you how to target specific builds when using a Packer template with multiple images.

Variables

Welcome to the Packer Variables section, where students will learn what variables are and how to use them throughout Packer templates.

Cool, we know what variables are and why we want to use them, but how do we get started? Well, variables must be declared somewhere, so let's start with that....

Alright, let's start using variables throughout our Packer templates so they can be reusable and more flexible for our needs.

Did you know you can use your local system's environment variables to set values or query for more information. That's what we'll walk through in this lecture.

Packer user variables allow your templates to be further configured with variables from the command-line, environment variables, Vault, or files. This lets you parameterize your templates so that you can keep secret tokens, environment-specific data, and other types of information out of your templates. This maximizes the portability of the template.

Provisioners

Welcome to the Packer provisioners section, where students will learn all about provisioners and how to use them in Packer templates.

This lecture will walk students through some basic examples of the different types of provisioners that are available to use in Packer.

Beyond just the provisioner itself, there are many different useful features that can help you write more efficient and capable Packer templates. Let's check them out.

This lab will walk you through adding a provisioner to your Packer HCL Template. Provisioners use built-in and third-party software to install and configure the machine image after booting.

Post-Processors

The lecture will dive a bit deeper on using post-processors in your Packer templates.

Examples of Post-Processors

This lab will walk you through adding a post-processor to your Packer HCL Template. Post-processors run after the image is built by the builder and provisioned by the provisioner(s). Post-processors are optional, and they can be used to upload artifacts, re-package, or more.

Code Organization

When using Packer in your organization, it's important to think about how to organize your code. This will help make Packer simple to use and drive efficiency.

Packer HCL Templates can be specified in a single file.pkr.hcl or in multiple files within a single folder. To assist with code readability it may be beneficial to break out a large pkr.hcl file into separate files.

When performing image builds it might be favorable to only target a particular build by type or cloud target. Packer provides this ability via the -only and -exclude parameters.

Are your builds not working as expected? Well, we've got you covered. This section is dedicated to many different troubleshooting techniques to help you build your templates successfully.

Let's be honest, getting it all right the first time can be pretty tough. But have no fear, Gabe is here to show you how to effectively debug your Packer templates in this hands-on lab.

The breakpoint provisioner will pause until the user presses "enter" to resume the build. This is intended for debugging purposes, and allows you to halt at a particular part of the provisioning process.

Packer Integrations

The Ansible Packer provisioner runs Ansible playbooks. It dynamically creates an Ansible inventory file configured to use SSH, runs an SSH server, executes ansible-playbook , and marshals Ansible plays through the SSH server to the machine being provisioned by Packer.

While Packer excels at building automated machine images, Terraform excels at deploying those images which is why Packer and Terraform are typically found to be complementary for infrastructure as code lifecycles.

In this demo, we'll showcase how you can easily integrate Packer with HashiCorp Vault to retrieve static credentials from the KV V2 secrets engine.

In this demo, we'll take a look at how you can use HashiCorp Vault's AWS Secrets Engine to obtain dynamic AWS credentials for your Packer build.

This demo will showcase how to integrate Packer with GitLab CI/CD and have your Packer builds automatically triggered by simply committing your new Packer template to a repo.

Bonus

Bonus Section

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Taught by Bryan Krausen and Gabe Maentz, who are recognized for their work in infrastructure and automation
Builds professional skills or deep expertise in using HashiCorp Packer, a critical tool for building and managing machine images
Strong fit with learners with intermediate experience in infrastructure and automation who want to develop professional skills in building and managing machine images
Covers a wide range of topics, including HashiCorp Packer intro and the problems it solves, use cases, and examples, writing Packer Templates using HCL2, managing provisioners and post-processors, code organization, and integrations with other automation tools
Offers hands-on labs and interactive materials to help learners apply their knowledge and skills
Taught using the most up-to-date version of HashiCorp Packer

Save this course

Save Building Automated Machine Images with HashiCorp Packer to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Building Automated Machine Images with HashiCorp Packer with these activities:
Organize and consolidate course materials
Helps you stay organized and reinforces learning by providing a central repository for your course materials.
Show steps
  • Create a system for organizing your notes, assignments, and other course materials
  • Regularly review and update your organized materials
Attend a HashiCorp User Group meeting focused on Packer
Provides opportunities to connect with other Packer users, share knowledge, and learn about best practices.
Show steps
  • Find a HashiCorp User Group meeting focused on Packer
  • Attend the meeting and participate in discussions
Review HashiCorp packer basics
Refreshes your understanding of HashiCorp Packer's core concepts, ensuring a strong foundation for the course.
Browse courses on HashiCorp Packer
Show steps
  • Review the key concepts of Packer, such as builders, provisioners, and post-processors
  • Revisit how to create and configure Packer templates using HCL2
  • Recall the different types of builders available in Packer and their use cases
  • Practice using variables and user variables in Packer templates
Five other activities
Expand to see all activities and additional details
Show all eight activities
Follow a Packer tutorial on a specific topic
Complements the course content by providing focused guidance on specific aspects of Packer.
Show steps
  • Identify a specific topic related to Packer that you want to learn more about
  • Find a reputable tutorial on the topic and follow the instructions
Build a simple image using Packer
Provides hands-on experience in building a basic image using Packer, reinforcing the practical aspects of the course.
Show steps
  • Choose a builder and create a Packer template to build an image
  • Add provisioners to install and configure software on the image
  • Test the Packer template by building the image
Solve Packer exercises on HashiCorp Learn
Provides targeted practice to enhance your understanding of Packer's features and functionality.
Show steps
  • Access the Packer exercises on HashiCorp Learn
  • Solve the exercises to test your knowledge and identify areas for improvement
Write a blog post on a specific Packer use case
Encourages you to apply your knowledge by sharing it, deepening your understanding of Packer's capabilities.
Show steps
  • Identify a specific use case for Packer that you find interesting
  • Create a Packer template that implements the use case
  • Write a blog post explaining the use case and how you implemented it with Packer
Create a Packer template for a complex image build
Challenges you to apply your skills to a more advanced task, promoting deeper engagement with Packer's capabilities.
Show steps
  • Identify a complex image build scenario that requires multiple builders, provisioners, and post-processors
  • Design and create a Packer template that automates the image build process
  • Test the template by building the image and verifying its functionality

Career center

Learners who complete Building Automated Machine Images with HashiCorp Packer will develop knowledge and skills that may be useful to these careers:
Infrastructure Engineer
Infrastructure engineers design, implement, and maintain an organization's infrastructure. They may use HashiCorp Packer to create machine images that are used to deploy new servers or to update existing servers. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain an organization's infrastructure.
DevOps Engineer
DevOps engineers work to bridge the gap between software development and IT operations. They may use HashiCorp Packer to automate the creation of machine images for use in a variety of environments, such as development, testing, and production. This course introduces the fundamentals of HashiCorp Packer and helps students to get started using this powerful tool to automate the création of machine images.
Cloud Engineer
Cloud engineers design, implement, and maintain cloud-based solutions. They may use HashiCorp Packer to create machine images that are used to deploy new servers or to update existing servers in the cloud. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain cloud-based solutions.
Systems Administrator
Systems administrators manage and maintain computer systems. They may use HashiCorp Packer to create machine images that are used to deploy new servers or to update existing servers. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain computer systems.
Security Engineer
Security engineers design, implement, and maintain security systems. They may use HashiCorp Packer to create machine images that are used to deploy new security devices or to update existing security devices. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain security systems.
Network Engineer
Network engineers design, implement, and maintain computer networks. They may use HashiCorp Packer to create machine images that are used to deploy new network devices or to update existing network devices. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain computer networks.
Machine Learning Engineer
Machine learning engineers design, implement, and maintain machine learning systems. They may use HashiCorp Packer to create machine images that are used to deploy new machine learning models or to update existing machine learning models. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain machine learning systems.
IT Manager
IT managers plan, direct, and coordinate the activities of an organization's IT department. They may use HashiCorp Packer to automate the creation of machine images for use in a variety of environments, such as development, testing, and production. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain an organization's IT infrastructure.
Software Engineer
Software engineers design, develop, and maintain software applications. They may use HashiCorp Packer to create machine images that are used to deploy new applications or to update existing applications. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain software applications.
Data Engineer
Data engineers design, implement, and maintain data systems. They may use HashiCorp Packer to create machine images that are used to deploy new data servers or to update existing data servers. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain data systems.
Technical Writer
Technical writers create documentation that explains how to use products and technologies. They may use HashiCorp Packer to create machine images that are used to deploy new documentation or to update existing documentation. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain technical documentation.
Project Manager
Project managers plan, execute, and deliver projects. They may use HashiCorp Packer to create machine images that are used to deploy new projects or to update existing projects. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain projects.
Sales Engineer
Sales engineers help customers to understand and purchase products and technologies. They may use HashiCorp Packer to create machine images that are used to deploy new sales materials or to update existing sales materials. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain sales materials.
Product Manager
Product managers plan, develop, and launch new products. They may use HashiCorp Packer to create machine images that are used to deploy new products or to update existing products. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain new products.
Business Analyst
Business analysts identify and analyze business needs. They may use HashiCorp Packer to create machine images that are used to deploy new business solutions or to update existing business solutions. This course provides a comprehensive overview of HashiCorp Packer and teaches students how to use this tool to automate the création of machine images that can be used to build and maintain business solutions.

Reading list

We've selected six books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Building Automated Machine Images with HashiCorp Packer.
Provides a comprehensive overview of cloud native patterns, which is essential for understanding how to use Packer effectively.
Classic in the DevOps field. It provides a comprehensive overview of the DevOps approach, and it covers all the essential topics, including automation, testing, and continuous delivery.
Fictional story about a DevOps team that is trying to save their company from disaster. It great way to learn about the DevOps approach in a fun and engaging way.
Provides a hands-on guide to using Terraform, which is essential for understanding how to integrate Packer with it.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Building Automated Machine Images with HashiCorp Packer.
Getting Started with HashiCorp Packer
Most relevant
HashiCorp Packer
Most relevant
Generative AI: Foundation Models and Platforms
Models and Platforms for Generative AI
Installing and Configuring HashiCorp Vault
Getting Started with HashiCorp Nomad
Manage Your Social Media Using Google Sheets
Exam Prep: HashiCorp Certified Terraform Associate (003)
Intermediate Machine Learning: TensorFlow on Google Cloud
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser