github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/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/mitchellh/packer.svg?branch=master
     9  [travis]: https://travis-ci.org/mitchellh/packer
    10  [appveyor-badge]: https://ci.appveyor.com/api/projects/status/github/mitchellh/packer?branch=master&svg=true
    11  [appveyor]: https://ci.appveyor.com/project/hashicorp/packer
    12  [godoc-badge]: https://godoc.org/github.com/mitchellh/packer?status.svg
    13  [godoc]: https://godoc.org/github.com/mitchellh/packer
    14  [report-badge]: https://goreportcard.com/badge/github.com/mitchellh/packer
    15  [report]: https://goreportcard.com/report/github.com/mitchellh/packer
    16  
    17  * Website: http://www.packer.io
    18  * IRC: `#packer-tool` on Freenode
    19  * Mailing list: [Google Groups](http://groups.google.com/group/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 the following platforms:
    27  
    28  * Amazon EC2 (AMI). Both EBS-backed and instance-store AMIs
    29  * Azure
    30  * DigitalOcean
    31  * Docker
    32  * Google Compute Engine
    33  * OpenStack
    34  * Parallels
    35  * QEMU. Both KVM and Xen images.
    36  * VirtualBox
    37  * VMware
    38  
    39  Support for other platforms can be added via plugins.
    40  
    41  The images that Packer creates can easily be turned into
    42  [Vagrant](http://www.vagrantup.com) boxes.
    43  
    44  ## Quick Start
    45  Download and install packages and dependencies
    46  ```
    47  go get github.com/mitchellh/packer
    48  ```
    49  
    50  **Note:** There is a great
    51  [introduction and getting started guide](http://www.packer.io/intro)
    52  for those with a bit more patience. Otherwise, the quick start below
    53  will get you up and running quickly, at the sacrifice of not explaining some
    54  key points.
    55  
    56  First, [download a pre-built Packer binary](http://www.packer.io/downloads.html)
    57  for your operating system or [compile Packer yourself](CONTRIBUTING.md#setting-up-go-to-work-on-packer).
    58  
    59  After Packer is installed, create your first template, which tells Packer
    60  what platforms to build images for and how you want to build them. In our
    61  case, we'll create a simple AMI that has Redis pre-installed. Save this
    62  file as `quick-start.json`. Export your AWS credentials as the
    63  `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
    64  
    65  ```json
    66  {
    67    "variables": {
    68      "access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    69      "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
    70    },
    71    "builders": [{
    72      "type": "amazon-ebs",
    73      "access_key": "{{user `access_key`}}",
    74      "secret_key": "{{user `secret_key`}}",
    75      "region": "us-east-1",
    76      "source_ami": "ami-de0d9eb7",
    77      "instance_type": "t1.micro",
    78      "ssh_username": "ubuntu",
    79      "ami_name": "packer-example {{timestamp}}"
    80    }]
    81  }
    82  ```
    83  
    84  Next, tell Packer to build the image:
    85  
    86  ```
    87  $ packer build quick-start.json
    88  ...
    89  ```
    90  
    91  Packer will build an AMI according to the "quick-start" template. The AMI
    92  will be available in your AWS account. To delete the AMI, you must manually
    93  delete it using the [AWS console](https://console.aws.amazon.com/). Packer
    94  builds your images, it does not manage their lifecycle. Where they go, how
    95  they're run, etc. is up to you.
    96  
    97  ## Documentation
    98  
    99  Comprehensive documentation is viewable on the Packer website:
   100  
   101  http://www.packer.io/docs
   102  
   103  ## Developing Packer
   104  
   105  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.