Skip to content

Packer introduction. Installing Packer. Creating Images. Launching instances with images.

Notifications You must be signed in to change notification settings

marydodo/packer-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packer Intro. Installing Packer.

[/] Install packer binary

[/] Verify the Installation

[/] Build an Image

--- [/] Create Template

  • Used example template from Learn Docs
  • named it example.pkr.hcl

--- [/] Verify Template

--- [/] Build First Image with AWS EC2 AMI

  • Using the packer build command, my first image with AWS EC2 was born.

--- [/] Learn How to Manage Image

[/] Provision

--- [/] Configure Provisioners

--- [/] Launch AMI

Questions, comments, concerns, etc.

What is a machine image?

A machine image stores all the configuration you want to help create a virtual machine (VM) instance.

Why use machine images?

With machine images, you can take a snapshot of your web application and save it to a unique machine image. You can then use that machine image to launch multiple instances that are configured in the exact same way as your source instance.

What is Packer?

Packer is a Hashicrop IaC tool that makes automating machine image creation easy. Encourages automation of scripts to install and configure software within Packer-made images with unique machine image IDs.

Issues

  1. During the "Verify Template" stage, I ran into an issue with the example template from Learn Docs. The issue was with two specific lines. Since the credentials are already set via an .aws/credentials file, these lines have been commented out of the example.pkr.hcl template file. After removing these lines, packer was able to verify the template.
  access_key    = "${var.aws_access_key}"
  secret_key    = "${var.aws_secret_key}"

About

Packer introduction. Installing Packer. Creating Images. Launching instances with images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published