github.com/yoctocloud/packer@v0.6.2-0.20160520224004-e11a0a18423f/README.md (about) 1 # Packer 2 3 [![Build Status](https://travis-ci.org/mitchellh/packer.svg?branch=master)](https://travis-ci.org/mitchellh/packer) 4 [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/mitchellh/packer?branch=master&svg=true)](https://ci.appveyor.com/project/hashicorp/packer) 5 6 * Website: http://www.packer.io 7 * IRC: `#packer-tool` on Freenode 8 * Mailing list: [Google Groups](http://groups.google.com/group/packer-tool) 9 10 Packer is a tool for building identical machine images for multiple platforms 11 from a single source configuration. 12 13 Packer is lightweight, runs on every major operating system, and is highly 14 performant, creating machine images for multiple platforms in parallel. Packer 15 comes out of the box with support for the following platforms: 16 17 * Amazon EC2 (AMI). Both EBS-backed and instance-store AMIs 18 * DigitalOcean 19 * Docker 20 * Google Compute Engine 21 * OpenStack 22 * Parallels 23 * QEMU. Both KVM and Xen images. 24 * VirtualBox 25 * VMware 26 27 Support for other platforms can be added via plugins. 28 29 The images that Packer creates can easily be turned into 30 [Vagrant](http://www.vagrantup.com) boxes. 31 32 ## Quick Start 33 34 **Note:** There is a great 35 [introduction and getting started guide](http://www.packer.io/intro) 36 for those with a bit more patience. Otherwise, the quick start below 37 will get you up and running quickly, at the sacrifice of not explaining some 38 key points. 39 40 First, [download a pre-built Packer binary](http://www.packer.io/downloads.html) 41 for your operating system or [compile Packer yourself](#developing-packer). 42 43 After Packer is installed, create your first template, which tells Packer 44 what platforms to build images for and how you want to build them. In our 45 case, we'll create a simple AMI that has Redis pre-installed. Save this 46 file as `quick-start.json`. Export your AWS credentials as the 47 `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. 48 49 ```json 50 { 51 "variables": { 52 "access_key": "{{env `AWS_ACCESS_KEY_ID`}}", 53 "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" 54 }, 55 "builders": [{ 56 "type": "amazon-ebs", 57 "access_key": "{{user `access_key`}}", 58 "secret_key": "{{user `secret_key`}}", 59 "region": "us-east-1", 60 "source_ami": "ami-de0d9eb7", 61 "instance_type": "t1.micro", 62 "ssh_username": "ubuntu", 63 "ami_name": "packer-example {{timestamp}}" 64 }] 65 } 66 ``` 67 68 Next, tell Packer to build the image: 69 70 ``` 71 $ packer build quick-start.json 72 ... 73 ``` 74 75 Packer will build an AMI according to the "quick-start" template. The AMI 76 will be available in your AWS account. To delete the AMI, you must manually 77 delete it using the [AWS console](https://console.aws.amazon.com/). Packer 78 builds your images, it does not manage their lifecycle. Where they go, how 79 they're run, etc. is up to you. 80 81 ## Documentation 82 83 Comprehensive documentation is viewable on the Packer website: 84 85 http://www.packer.io/docs 86 87 ## Developing Packer 88 89 See [CONTRIBUTING.md](https://github.com/mitchellh/packer/blob/master/CONTRIBUTING.md) for best practices and instructions on setting up your development environment to work on Packer.