github.com/jerryclinesmith/packer@v0.3.7/README.md (about)

     1  # Packer
     2  
     3  * Website: http://www.packer.io
     4  * IRC: `#packer-tool` on Freenode
     5  * Mailing list: [Google Groups](http://groups.google.com/group/packer-tool)
     6  
     7  Packer is a tool for building identical machine images for multiple platforms
     8  from a single source configuration.
     9  
    10  Packer is lightweight, runs on every major operating system, and is highly
    11  performant, creating machine images for multiple platforms in parallel.
    12  Packer comes out of the box with support for creating AMIs (EC2), VMware
    13  images, and VirtualBox images. Support for more platforms can be added via
    14  plugins.
    15  
    16  The images that Packer creates can easily be turned into
    17  [Vagrant](http://www.vagrantup.com) boxes.
    18  
    19  ## Quick Start
    20  
    21  **Note:** There is a great
    22  [introduction and getting started guide](http://www.packer.io/intro)
    23  for those with a bit more patience. Otherwise, the quick start below
    24  will get you up and running quickly, at the sacrifice of not explaining some
    25  key points.
    26  
    27  First, [download a pre-built Packer binary](http://www.packer.io/downloads.html)
    28  for your operating system or [compile Packer yourself](#developing-packer).
    29  
    30  After Packer is installed, create your first template, which tells Packer
    31  what platforms to build images for and how you want to build them. In our
    32  case, we'll create a simple AMI that has Redis pre-installed. Save this
    33  file as `quick-start.json`. Be sure to replace any credentials with your
    34  own.
    35  
    36  ```json
    37  {
    38    "builders": [{
    39      "type": "amazon-ebs",
    40      "access_key": "YOUR KEY HERE",
    41      "secret_key": "YOUR SECRET KEY HERE",
    42      "region": "us-east-1",
    43      "source_ami": "ami-de0d9eb7",
    44      "instance_type": "t1.micro",
    45      "ssh_username": "ubuntu",
    46      "ami_name": "packer-example {{timestamp}}"
    47    }]
    48  }
    49  ```
    50  
    51  Next, tell Packer to build the image:
    52  
    53  ```
    54  $ packer build quick-start.json
    55  ...
    56  ```
    57  
    58  Packer will build an AMI according to the "quick-start" template. The AMI
    59  will be available in your AWS account. To delete the AMI, you must manually
    60  delete it using the [AWS console](https://console.aws.amazon.com/). Packer
    61  builds your images, it does not manage their lifecycle. Where they go, how
    62  they're run, etc. is up to you.
    63  
    64  ## Documentation
    65  
    66  Full, comprehensive documentation is viewable on the Packer website:
    67  
    68  http://www.packer.io/docs
    69  
    70  ## Developing Packer
    71  
    72  If you wish to work on Packer itself, you'll first need [Go](http://golang.org)
    73  installed (version 1.1+ is _required_). Make sure you have Go properly installed,
    74  including setting up your [GOPATH](http://golang.org/doc/code.html#GOPATH).
    75  
    76  For some additional dependencies, Go needs [Mercurial](http://mercurial.selenic.com/)
    77  to be installed. Packer itself doesn't require this but a dependency of a
    78  dependency does.
    79  
    80  Next, clone this repository into `$GOPATH/src/github.com/mitchellh/packer` and
    81  then just type `make`. In a few moments, you'll have a working `packer` executable:
    82  
    83  ```
    84  $ make
    85  ...
    86  $ bin/packer
    87  ...
    88  ```
    89  
    90  You can run tests by typing `make test`.
    91  
    92  This will run tests for Packer core along with all the core builders and commands and such that come with Packer.
    93  
    94  If you make any changes to the code, run `make format` in order to automatically
    95  format the code according to Go standards.