Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
Clone or download
SwampDragons Merge pull request #6872 from aspectcapital/disable-ena-support
Add support to explicitly disable ENA support
Latest commit 9573013 Oct 19, 2018
Permalink
Failed to load latest commit information.
.github Grammar: anyway Oct 10, 2018
builder Merge pull request #6872 from aspectcapital/disable-ena-support Oct 19, 2018
command Merge pull request #6871 from LKaemmerling/master Oct 18, 2018
common make common/iso_config_test.go invisible to windows Oct 16, 2018
communicator make trailing slash still work Jul 12, 2018
contrib Try to make help more consistent Oct 11, 2018
examples Add ansible connection plugin examples Jul 10, 2018
fix bug fix and add test Sep 6, 2018
helper new option allowing user to clean up the ephemeral ssh key from the a… Sep 14, 2018
packer fix more race conditions Oct 15, 2018
plugin/example delete unneeded plugin file Sep 28, 2017
post-processor fix recurring bug #3878, make destination ESXi host selectable in con… Sep 10, 2018
provisioner make provisioner/ansible/provisioner_test.go invisible to windows Oct 16, 2018
scripts use xargs to check for formatting May 2, 2018
template make template/parse_test.go invisible to windows Oct 16, 2018
test Add options to LXC builder for influencing for how containers are bui… Oct 31, 2017
vendor Merge pull request #6871 from LKaemmerling/master Oct 18, 2018
version now dev for 1.3.2 Sep 14, 2018
website Merge pull request #6872 from aspectcapital/disable-ena-support Oct 19, 2018
.gitattributes too many files for shell during Make, convert .go and .sh to EOL=lf Apr 7, 2018
.gitignore switch to netlify deployment Sep 19, 2018
.travis.yml travis-ci: allow failures on windows Oct 17, 2018
CHANGELOG.md update changelog Oct 18, 2018
CODEOWNERS add scaleway codeowners Feb 12, 2018
LICENSE LICENSE: MPL2 Jun 24, 2013
Makefile Makefile: make find work on windows using `-executable` instead of `-… Oct 16, 2018
README.md Remove `go get` from Quick Start as this isn't required to use Packer Jun 17, 2018
Vagrantfile First cut at vagrant post-processor for docker Jul 6, 2018
appveyor.yml revert appveyor skips as windows builds are pretty unstable Oct 17, 2018
checkpoint.go move packer to hashicorp Apr 4, 2017
commands.go Complete Atlas deprecation. Aug 3, 2018
config.go move packer to hashicorp Apr 4, 2017
log.go Use Sprint() instead of Sprintf() in log dedupe Oct 10, 2018
main.go document wrapConfig a little Sep 24, 2018
main_test.go move packer to hashicorp Apr 4, 2017
panic.go Add telemetry reporting through checkpoint Jun 15, 2017
stdin.go Gracefully clean up on SIGTERM Sep 8, 2017

README.md

Packer

Build Status Windows Build Status GoDoc GoReportCard

Packer is a tool for building 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. Packer comes out of the box with support for many platforms, the full list of which can be found at https://www.packer.io/docs/builders/index.html.

Support for other platforms can be added via plugins.

The images that Packer creates can easily be turned into Vagrant boxes.

Quick Start

Note: There is a great introduction and getting started guide for those with a bit more patience. Otherwise, the quick start below will get you up and running quickly, at the sacrifice of not explaining some key points.

First, download a pre-built Packer binary for your operating system or compile Packer yourself.

After Packer is installed, create your first template, which tells Packer what platforms to build images for and how you want to build them. In our case, we'll create a simple AMI that has Redis pre-installed. Save this file as quick-start.json. Export your AWS credentials as the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.

{
  "variables": {
    "access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
  },
  "builders": [{
    "type": "amazon-ebs",
    "access_key": "{{user `access_key`}}",
    "secret_key": "{{user `secret_key`}}",
    "region": "us-east-1",
    "source_ami": "ami-af22d9b9",
    "instance_type": "t2.micro",
    "ssh_username": "ubuntu",
    "ami_name": "packer-example {{timestamp}}"
  }]
}

Next, tell Packer to build the image:

$ packer build quick-start.json
...

Packer will build an AMI according to the "quick-start" template. The AMI will be available in your AWS account. To delete the AMI, you must manually delete it using the AWS console. Packer builds your images, it does not manage their lifecycle. Where they go, how they're run, etc. is up to you.

Documentation

Comprehensive documentation is viewable on the Packer website:

https://www.packer.io/docs

Developing Packer

See CONTRIBUTING.md for best practices and instructions on setting up your development environment to work on Packer.