Skip to content
Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
Branch: master
Clone or download
SwampDragons Merge pull request #7790 from hashicorp/fix_7748
clarify pathing requirements for hyperv-vmcx
Latest commit 3a55437 Jun 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci test that go generated code if what is should be May 27, 2019
.github improve contributing.md for windows user May 20, 2019
builder Merge pull request #7790 from hashicorp/fix_7748 Jun 24, 2019
command allow to have timestamped colorless ui messages Jun 19, 2019
common Merge pull request #7746 from hashicorp/fix_7671 Jun 14, 2019
communicator add a check and test so that the winrm communicator upload doesn't fa… May 31, 2019
contrib prevent a breaking change so that we can merge the `-parallel-builds`… May 2, 2019
examples Merge pull request #7787 from zqfan/tencent-fix-tmp-keypair Jun 24, 2019
fix Merge pull request #7456 from hashicorp/do_5770 Apr 5, 2019
helper allow to build on solaris Jun 7, 2019
packer Merge pull request #7745 from hashicorp/investigate_crash Jun 14, 2019
plugin/example delete unneeded plugin file Sep 28, 2017
post-processor Remove config interface. Make CreateImage function to accept config a… May 5, 2019
provisioner remove redundant error check Jun 13, 2019
scripts Fix failed to copy binary when using make bin Jun 14, 2019
template allow to set provisioner timeout from buildfile Apr 8, 2019
test Add Linode Images builder Apr 16, 2019
vendor Merge branch 'master' of https://github.com/amydutta/packer Jun 21, 2019
version time to work towards 1.4.2 May 16, 2019
website Merge pull request #7790 from hashicorp/fix_7748 Jun 24, 2019
.gitattributes refresh line endings May 17, 2019
.gitignore switch to netlify deployment Sep 19, 2018
.travis.yml add wait so osx builds dont time out May 10, 2019
CHANGELOG.md Update CHANGELOG.md Jun 20, 2019
CODEOWNERS Remove self from CODEOWNERS May 29, 2019
Dockerfile dockerfile: add minimal image with provisioners support Oct 31, 2018
LICENSE LICENSE: MPL2 Jun 24, 2013
Makefile make bin currently won't work outside of GOPATH Jun 14, 2019
README.md Miscellaneous doc improvements Oct 18, 2018
Vagrantfile vagrantfile: add support for docker provider Oct 31, 2018
appveyor.yml appveyor: remove verbose mode as output is truncated, and I can't see… May 3, 2019
checkpoint.go move packer to hashicorp Apr 4, 2017
commands.go implement a packer console analogous to the terraform console Jun 5, 2019
config.go use port as ints Mar 19, 2019
go.mod Merge pull request #7755 from aerialls/proxmox-api Jun 17, 2019
go.sum Merge pull request #7755 from aerialls/proxmox-api Jun 17, 2019
log.go Use Sprint() instead of Sprintf() in log dedupe Oct 10, 2018
main.go allow building packer on solaris by removing progress bar and tty imp… May 7, 2019
main_test.go move packer to hashicorp Apr 4, 2017
panic.go Add telemetry reporting through checkpoint Jun 15, 2017
tty.go allow building packer on solaris by removing progress bar and tty imp… May 7, 2019
tty_solaris.go allow building packer on solaris by removing progress bar and tty imp… May 7, 2019

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.

You can’t perform that action at this time.