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