diff --git a/website/source/community/index.html.markdown b/website/source/community/index.html.markdown index 1b21e818a..f4069fbdf 100644 --- a/website/source/community/index.html.markdown +++ b/website/source/community/index.html.markdown @@ -1,22 +1,25 @@ --- -layout: "community" -page_title: "Community" -description: |- - Packer is a new project with a growing community. Despite this, there are dedicated users willing to help through various mediums. ---- +description: | + Packer is a new project with a growing community. Despite this, there are + dedicated users willing to help through various mediums. +layout: community +page_title: Community +... # Community Packer is a new project with a growing community. Despite this, there are dedicated users willing to help through various mediums. -**IRC:** `#packer-tool` on Freenode. +**IRC:** `#packer-tool` on Freenode. -**Mailing List:** [Packer Google Group](http://groups.google.com/group/packer-tool) +**Mailing List:** [Packer Google +Group](http://groups.google.com/group/packer-tool) -**Bug Tracker:** [Issue tracker on GitHub](https://github.com/mitchellh/packer/issues). -Please only use this for reporting bugs. Do not ask for general help here. Use IRC -or the mailing list for that. +**Bug Tracker:** [Issue tracker on +GitHub](https://github.com/mitchellh/packer/issues). Please only use this for +reporting bugs. Do not ask for general help here. Use IRC or the mailing list +for that. ## People @@ -25,62 +28,70 @@ to Packer in some core way. Over time, faces may appear and disappear from this list as contributors come and go.
- Mitchell Hashimoto is the creator of Packer. He developed the - core of Packer as well as the Amazon, VirtualBox, and VMware - builders. In addition to Packer, Mitchell is the creator of - Vagrant. He is self - described as "automation obsessed." -
-- Jack Pearkes created and maintains the DigitalOcean builder - for Packer. Outside of Packer, Jack is an avid open source - contributor and software consultant.
-+ Mitchell Hashimoto is the creator of Packer. He developed the + core of Packer as well as the Amazon, VirtualBox, and VMware + builders. In addition to Packer, Mitchell is the creator of + Vagrant. He is self + described as "automation obsessed." +
+- In addition to Packer, Mark Peek helps maintain - various open source projects such as - cloudtools and - IronPort Python libraries. - Mark is also a FreeBSD committer.
-+ Jack Pearkes created and maintains the DigitalOcean builder + for Packer. Outside of Packer, Jack is an avid open source + contributor and software consultant.
+-Ross Smith maintains our VMware builder on Windows, and provides other valuable assistance. -Ross is an open source enthusiast, published author, and freelance consultant.
-+ In addition to Packer, Mark Peek helps maintain + various open source projects such as + cloudtools and + IronPort Python libraries. + Mark is also a FreeBSD committer.
+-Rickard von Essen maintains our Parallels Desktop builder. Rickard is an polyglot programmer and consults on Continuous Delivery.
-+ +Ross Smith maintains our +VMware builder on Windows, and provides other valuable assistance. Ross is an +open source enthusiast, published author, and freelance consultant. +
++ +Rickard von Essen maintains our Parallels Desktop builder. Rickard is an +polyglot programmer and consults on Continuous Delivery. +
+- qemu-system-x86 -m 1024m --no-acpi -netdev user,id=mynet0,hostfwd=hostip:hostport-guestip:guestport -device virtio-net,netdev=mynet0" + qemu-system-x86 -m 1024m --no-acpi -netdev user,id=mynet0,hostfwd=hostip:hostport-guestip:guestport -device virtio-net,netdev=mynet0"+- `shutdown_command` (string) - The command to use to gracefully shut down the + machine once all the provisioning is done. By default this is an empty string, + which tells Packer to just forcefully shut down the machine. -* `shutdown_command` (string) - The command to use to gracefully shut down - the machine once all the provisioning is done. By default this is an empty - string, which tells Packer to just forcefully shut down the machine. +- `shutdown_timeout` (string) - The amount of time to wait after executing the + `shutdown_command` for the virtual machine to actually shut down. If it + doesn't shut down in this time, it is an error. By default, the timeout is + "5m", or five minutes. -* `shutdown_timeout` (string) - The amount of time to wait after executing - the `shutdown_command` for the virtual machine to actually shut down. - If it doesn't shut down in this time, it is an error. By default, the timeout - is "5m", or five minutes. - -* `ssh_host_port_min` and `ssh_host_port_max` (integer) - The minimum and - maximum port to use for the SSH port on the host machine which is forwarded - to the SSH port on the guest machine. Because Packer often runs in parallel, +- `ssh_host_port_min` and `ssh_host_port_max` (integer) - The minimum and + maximum port to use for the SSH port on the host machine which is forwarded to + the SSH port on the guest machine. Because Packer often runs in parallel, Packer will choose a randomly available port in this range to use as the host port. -* `vm_name` (string) - This is the name of the image (QCOW2 or IMG) file for - the new virtual machine, without the file extension. By default this is +- `vm_name` (string) - This is the name of the image (QCOW2 or IMG) file for the + new virtual machine, without the file extension. By default this is "packer-BUILDNAME", where "BUILDNAME" is the name of the build. -* `vnc_port_min` and `vnc_port_max` (integer) - The minimum and - maximum port to use for the VNC port on the host machine which is forwarded - to the VNC port on the guest machine. Because Packer often runs in parallel, - Packer will choose a randomly available port in this range to use as the - host port. +- `vnc_port_min` and `vnc_port_max` (integer) - The minimum and maximum port to + use for the VNC port on the host machine which is forwarded to the VNC port on + the guest machine. Because Packer often runs in parallel, Packer will choose a + randomly available port in this range to use as the host port. ## Boot Command -The `boot_command` configuration is very important: it specifies the keys -to type when the virtual machine is first booted in order to start the -OS installer. This command is typed after `boot_wait`, which gives the -virtual machine some time to actually load the ISO. +The `boot_command` configuration is very important: it specifies the keys to +type when the virtual machine is first booted in order to start the OS +installer. This command is typed after `boot_wait`, which gives the virtual +machine some time to actually load the ISO. -As documented above, the `boot_command` is an array of strings. The -strings are all typed in sequence. It is an array only to improve readability -within the template. +As documented above, the `boot_command` is an array of strings. The strings are +all typed in sequence. It is an array only to improve readability within the +template. -The boot command is "typed" character for character over a VNC connection -to the machine, simulating a human actually typing the keyboard. There are -a set of special keys available. If these are in your boot command, they -will be replaced by the proper key: +The boot command is "typed" character for character over a VNC connection to the +machine, simulating a human actually typing the keyboard. There are a set of +special keys available. If these are in your boot command, they will be replaced +by the proper key: -* `
- Information about an artifact of the targeted item. This is a - fairly complex (but uniform!) machine-readable type that contains - subtypes. The subtypes are documented within this page in the - syntax of "artifact subtype: SUBTYPE". The number of arguments within - that subtype is in addition to the artifact args. -
++ Information about an artifact of the targeted item. This is a + fairly complex (but uniform!) machine-readable type that contains + subtypes. The subtypes are documented within this page in the + syntax of "artifact subtype: SUBTYPE". The number of arguments within + that subtype is in addition to the artifact args. +
-- Data 1: index - The zero-based index of the - artifact being described. This goes up to "artifact-count" (see - below). -
-- Data 2: subtype - The subtype that describes - the remaining arguments. See the documentation for the - subtype docs throughout this page. -
-- Data 3..n: subtype data - Zero or more additional - data points related to the subtype. The exact count and meaning - of this subtypes comes from the subtype documentation. -
-+ Data 1: index - The zero-based index of the + artifact being described. This goes up to "artifact-count" (see + below). +
++ Data 2: subtype - The subtype that describes + the remaining arguments. See the documentation for the + subtype docs throughout this page. +
++ Data 3..n: subtype data - Zero or more additional + data points related to the subtype. The exact count and meaning + of this subtypes comes from the subtype documentation. +
+ -- The number of artifacts associated with the given target. This - will always be outputted _before_ any other artifact information, - so you're able to know how many upcoming artifacts to look for. -
++ The number of artifacts associated with the given target. This + will always be outputted _before_ any other artifact information, + so you're able to know how many upcoming artifacts to look for. +
-- Data 1: count - The number of artifacts as - a base 10 integer. -
-+ Data 1: count - The number of artifacts as + a base 10 integer. +
+ -- The unique ID of the builder that created this artifact. -
++ The unique ID of the builder that created this artifact. +
-- Data 1: id - The unique ID of the builder. -
-+ Data 1: id - The unique ID of the builder. +
+ -- The last machine-readable output line outputted for an artifact. - This is a sentinel value so you know that no more data related to - the targetted artifact will be outputted. -
-+ The last machine-readable output line outputted for an artifact. + This is a sentinel value so you know that no more data related to + the targetted artifact will be outputted. +
+- A single file associated with the artifact. There are 0 to - "files-count" of these entries to describe every file that is - part of the artifact. -
++ A single file associated with the artifact. There are 0 to + "files-count" of these entries to describe every file that is + part of the artifact. +
-- Data 1: index - Zero-based index of the file. - This goes from 0 to "files-count" minus one. -
++ Data 1: index - Zero-based index of the file. + This goes from 0 to "files-count" minus one. +
-- Data 2: filename - The filename. -
-+ Data 2: filename - The filename. +
+ -- The number of files associated with this artifact. Not all - artifacts have files associated with it. -
++ The number of files associated with this artifact. Not all + artifacts have files associated with it. +
-- Data 1: count - The number of files. -
-+ Data 1: count - The number of files. +
+ -- The ID (if any) of the artifact that was built. Not all artifacts - have associated IDs. For example, AMIs built have IDs associated - with them, but VirtualBox images do not. The exact format of the ID - is specific to the builder. -
++ The ID (if any) of the artifact that was built. Not all artifacts + have associated IDs. For example, AMIs built have IDs associated + with them, but VirtualBox images do not. The exact format of the ID + is specific to the builder. +
-- Data 1: id - The ID of the artifact. -
-+ Data 1: id - The ID of the artifact. +
+ -- If present, this means that the artifact was nil, or that the targeted - build completed successfully but no artifact was created. -
-+ If present, this means that the artifact was nil, or that the targeted + build completed successfully but no artifact was created. +
+- The human-readable string description of the artifact provided by - the artifact itself. -
++ The human-readable string description of the artifact provided by + the artifact itself. +
-- Data 1: string - The string output for the artifact. -
-+ Data 1: string - The string output for the artifact. +
+ -- The number of errors that occurred during the build. This will - always be outputted before any errors so you know how many are coming. -
++ The number of errors that occurred during the build. This will + always be outputted before any errors so you know how many are coming. +
-- Data 1: count - The number of build errors as - a base 10 integer. -
-+ Data 1: count - The number of build errors as + a base 10 integer. +
+ -- A build error that occurred. The target of this output will be - the build that had the error. -
++ A build error that occurred. The target of this output will be + the build that had the error. +
+ ++ Data 1: error - The error message as a string. +
+- Data 1: error - The error message as a string. -
-- A user variable - defined within the template. -
++ A user variable + defined within the template. +
-- Data 1: name - Name of the variable. -
++ Data 1: name - Name of the variable. +
-- Data 2: default - The default value of the - variable. -
++ Data 2: default - The default value of the + variable. +
-- Data 3: required - If non-zero, then this variable - is required. -
-+ Data 3: required - If non-zero, then this variable + is required. +
+ -- A builder defined within the template -
++ A builder defined within the template +
-- Data 1: name - The name of the builder. -
-- Data 2: type - The type of the builder. This will - generally be the same as the name unless you explicitly override - the name. -
-+ Data 1: name - The name of the builder. +
++ Data 2: type - The type of the builder. This will + generally be the same as the name unless you explicitly override + the name. +
+ -- A provisioner defined within the template. Multiple of these may - exist. If so, they are outputted in the order they would run. -
++ A provisioner defined within the template. Multiple of these may + exist. If so, they are outputted in the order they would run. +
+ ++ Data 1: name - The name/type of the provisioner. +
+- Data 1: name - The name/type of the provisioner. -
-The version number of Packer running.
+The version number of Packer running.
-- Data 1: version - The version of Packer running, - only including the major, minor, and patch versions. Example: - "0.2.4". -
-+ Data 1: version - The version of Packer running, + only including the major, minor, and patch versions. Example: + "0.2.4". +
+ -The SHA1 of the Git commit that built this version of Packer.
+The SHA1 of the Git commit that built this version of Packer.
-- Data 1: commit SHA1 - The SHA1 of the commit. -
-+ Data 1: commit SHA1 - The SHA1 of the commit. +
+ -- The prerelease tag (if any) for the running version of Packer. This - can be "beta", "dev", "alpha", etc. If this is empty, you can assume - it is a release version running. -
++ The prerelease tag (if any) for the running version of Packer. This + can be "beta", "dev", "alpha", etc. If this is empty, you can assume + it is a release version running. +
+ ++ Data 1: prerelease name - The name of the + prerelease tag. +
+- Data 1: prerelease name - The name of the - prerelease tag. -
-- Specifies the output and type of output that would've normally - gone to the console if Packer were running in human-readable - mode. -
++ Specifies the output and type of output that would've normally + gone to the console if Packer were running in human-readable + mode. +
+ ++ Data 1: type - The type of UI message that would've + been outputted. Can be "say", "message", or "error". +
++ Data 2: output - The UI message that would have + been outputted. +
+- Data 1: type - The type of UI message that would've - been outputted. Can be "say", "message", or "error". -
-- Data 2: output - The UI message that would have - been outputted. -
-Description of the type.
-- Data 1: name - Description. -
-Description of the type.
++ Data 1: name - Description. +
+| - | Day of Week | -Month | -Date | -Hour | -Minute | -Second | -Year | -Timezone | ++ | ++Day of Week + | ++Month + | ++Date + | ++Hour + | ++Minute + | ++Second + | ++Year + | ++Timezone + |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Numeric | -- | -01 | -02 | -03 (15) | -04 | -05 | -06 | --0700 | ++Numeric + | ++- + | ++01 + | ++02 + | ++03 (15) + | ++04 + | ++05 + | ++06 + | ++-0700 + |
| Textual | -Monday (Mon) | -January (Jan) | -- | -- | -- | -- | -- | -MST | ++Textual + | ++Monday (Mon) + | ++January (Jan) + | ++- + | ++- + | ++- + | ++- + | ++- + | ++MST + |
{{user `variable`}}.
-This function can be used in _any value_ within the template, in
-builders, provisioners, _anything_. The user variable is available globally
-within the template.
+Using the variables is extremely easy. Variables are used by calling the user
+function in the form of {{user \`variable\`}}. This function can be
+used in *any value* within the template, in builders, provisioners, *anything*.
+The user variable is available globally within the template.
## Environmental Variables
-Environmental variables can be used within your template using user
-variables. The `env` function is available _only_ within the default value
-of a user variable, allowing you to default a user variable to an
-environmental variable. An example is shown below:
+Environmental variables can be used within your template using user variables.
+The `env` function is available *only* within the default value of a user
+variable, allowing you to default a user variable to an environmental variable.
+An example is shown below:
-```javascript
+``` {.javascript}
{
"variables": {
"my_secret": "{{env `MY_SECRET`}}",
@@ -77,73 +79,69 @@ environmental variable. An example is shown below:
}
```
-This will default "my\_secret" to be the value of the "MY\_SECRET"
-environmental variable (or the empty string if it does not exist).
+This will default "my\_secret" to be the value of the "MY\_SECRET" environmental
+variable (or the empty string if it does not exist).
--> **Why can't I use environmental variables elsewhere?**
-User variables are the single source of configurable input to a template.
-We felt that having environmental variables used _anywhere_ in a
-template would confuse the user about the possible inputs to a template.
-By allowing environmental variables only within default values for user
-variables, user variables remain as the single source of input to a template
-that a user can easily discover using `packer inspect`.
+-> **Why can't I use environmental variables elsewhere?** User variables are
+the single source of configurable input to a template. We felt that having
+environmental variables used *anywhere* in a template would confuse the user
+about the possible inputs to a template. By allowing environmental variables
+only within default values for user variables, user variables remain as the
+single source of input to a template that a user can easily discover using
+`packer inspect`.
## Setting Variables
-Now that we covered how to define and use variables within a template,
-the next important point is how to actually set these variables. Packer
-exposes two methods for setting variables: from the command line or
-from a file.
+Now that we covered how to define and use variables within a template, the next
+important point is how to actually set these variables. Packer exposes two
+methods for setting variables: from the command line or from a file.
### From the Command Line
-To set variables from the command line, the `-var` flag is used as
-a parameter to `packer build` (and some other commands). Continuing our example
-above, we could build our template using the command below. The command
-is split across multiple lines for readability, but can of course be a single
-line.
+To set variables from the command line, the `-var` flag is used as a parameter
+to `packer build` (and some other commands). Continuing our example above, we
+could build our template using the command below. The command is split across
+multiple lines for readability, but can of course be a single line.
-```text
+``` {.text}
$ packer build \
-var 'aws_access_key=foo' \
-var 'aws_secret_key=bar' \
template.json
```
-As you can see, the `-var` flag can be specified multiple times in order
-to set multiple variables. Also, variables set later on the command-line
-override earlier set variables if it has already been set.
+As you can see, the `-var` flag can be specified multiple times in order to set
+multiple variables. Also, variables set later on the command-line override
+earlier set variables if it has already been set.
-Finally, variables set from the command-line override all other methods
-of setting variables. So if you specify a variable in a file (the next
-method shown), you can override it using the command-line.
+Finally, variables set from the command-line override all other methods of
+setting variables. So if you specify a variable in a file (the next method
+shown), you can override it using the command-line.
### From a File
-Variables can also be set from an external JSON file. The `-var-file`
-flag reads a file containing a basic key/value mapping of variables to
-values and sets those variables. The JSON file is simple:
+Variables can also be set from an external JSON file. The `-var-file` flag reads
+a file containing a basic key/value mapping of variables to values and sets
+those variables. The JSON file is simple:
-```javascript
+``` {.javascript}
{
"aws_access_key": "foo",
"aws_secret_key": "bar"
}
```
-It is a single JSON object where the keys are variables and the values are
-the variable values. Assuming this file is in `variables.json`, we can
-build our template using the following command:
+It is a single JSON object where the keys are variables and the values are the
+variable values. Assuming this file is in `variables.json`, we can build our
+template using the following command:
-```text
+``` {.text}
$ packer build -var-file=variables.json template.json
```
-The `-var-file` flag can be specified multiple times and variables from
-multiple files will be read and applied. As you'd expect, variables read
-from files specified later override a variable set earlier if it has
-already been set.
+The `-var-file` flag can be specified multiple times and variables from multiple
+files will be read and applied. As you'd expect, variables read from files
+specified later override a variable set earlier if it has already been set.
-And as mentioned above, no matter where a `-var-file` is specified, a
-`-var` flag on the command line will always override any variables from
-a file.
+And as mentioned above, no matter where a `-var-file` is specified, a `-var`
+flag on the command line will always override any variables from a file.
diff --git a/website/source/docs/templates/veewee-to-packer.html.markdown b/website/source/docs/templates/veewee-to-packer.html.markdown
index 81a06de71..ecc257f14 100644
--- a/website/source/docs/templates/veewee-to-packer.html.markdown
+++ b/website/source/docs/templates/veewee-to-packer.html.markdown
@@ -1,35 +1,39 @@
---
-layout: "docs"
-page_title: "Convert Veewee Definitions to Packer Templates"
-description: |-
- If you are or were a user of Veewee, then there is an official tool called veewee-to-packer that will convert your Veewee definition into an equivalent Packer template. Even if you're not a Veewee user, Veewee has a large library of templates that can be readily used with Packer by simply converting them.
----
+description: |
+ If you are or were a user of Veewee, then there is an official tool called
+ veewee-to-packer that will convert your Veewee definition into an equivalent
+ Packer template. Even if you're not a Veewee user, Veewee has a large library of
+ templates that can be readily used with Packer by simply converting them.
+layout: docs
+page_title: Convert Veewee Definitions to Packer Templates
+...
# Veewee-to-Packer
-If you are or were a user of [Veewee](https://github.com/jedi4ever/veewee),
-then there is an official tool called [veewee-to-packer](https://github.com/mitchellh/veewee-to-packer)
-that will convert your Veewee definition into an equivalent Packer template.
-Even if you're not a Veewee user, Veewee has a
-[large library](https://github.com/jedi4ever/veewee/tree/master/templates)
-of templates that can be readily used with Packer by simply converting them.
+If you are or were a user of [Veewee](https://github.com/jedi4ever/veewee), then
+there is an official tool called
+[veewee-to-packer](https://github.com/mitchellh/veewee-to-packer) that will
+convert your Veewee definition into an equivalent Packer template. Even if
+you're not a Veewee user, Veewee has a [large
+library](https://github.com/jedi4ever/veewee/tree/master/templates) of templates
+that can be readily used with Packer by simply converting them.
## Installation and Usage
Since Veewee itself is a Ruby project, so too is the veewee-to-packer
-application so that it can read the Veewee configurations. Install it using RubyGems:
+application so that it can read the Veewee configurations. Install it using
+RubyGems:
-```text
+``` {.text}
$ gem install veewee-to-packer
...
```
-Once installed, usage is easy! Just point `veewee-to-packer`
-at the `definition.rb` file of any template. The converter will output
-any warnings or messages about the conversion. The example below converts
-a CentOS template:
+Once installed, usage is easy! Just point `veewee-to-packer` at the
+`definition.rb` file of any template. The converter will output any warnings or
+messages about the conversion. The example below converts a CentOS template:
-```text
+``` {.text}
$ veewee-to-packer templates/CentOS-6.4/definition.rb
Success! Your Veewee definition was converted to a Packer
template! The template can be found in the `template.json` file
@@ -41,22 +45,21 @@ first, since the template has relative paths that expect you to
use it from the same working directory.
```
-***Voila!*** By default, `veewee-to-packer` will output a template that
-contains a builder for both VirtualBox and VMware. You can use the
-`-only` flag on `packer build` to only build one of them. Otherwise
-you can use the `--builder` flag on `veewee-to-packer` to only output
-specific builder configurations.
+***Voila!*** By default, `veewee-to-packer` will output a template that contains
+a builder for both VirtualBox and VMware. You can use the `-only` flag on
+`packer build` to only build one of them. Otherwise you can use the `--builder`
+flag on `veewee-to-packer` to only output specific builder configurations.
## Limitations
-None, really. The tool will tell you if it can't convert a part of a
-template, and whether that is a critical error or just a warning.
-Most of Veewee's functions translate perfectly over to Packer. There are
-still a couple missing features in Packer, but they're minimal.
+None, really. The tool will tell you if it can't convert a part of a template,
+and whether that is a critical error or just a warning. Most of Veewee's
+functions translate perfectly over to Packer. There are still a couple missing
+features in Packer, but they're minimal.
## Bugs
-If you find any bugs, please report them to the
-[veewee-to-packer issue tracker](https://github.com/mitchellh/veewee-to-packer).
-I haven't been able to exhaustively test every Veewee template, so there
-are certainly some edge cases out there.
+If you find any bugs, please report them to the [veewee-to-packer issue
+tracker](https://github.com/mitchellh/veewee-to-packer). I haven't been able to
+exhaustively test every Veewee template, so there are certainly some edge cases
+out there.
diff --git a/website/source/intro/getting-started/build-image.html.markdown b/website/source/intro/getting-started/build-image.html.markdown
index 4bf8eda57..ec1d851a9 100644
--- a/website/source/intro/getting-started/build-image.html.markdown
+++ b/website/source/intro/getting-started/build-image.html.markdown
@@ -1,29 +1,32 @@
---
-layout: "intro"
-page_title: "Build an Image"
-prev_url: "/intro/getting-started/setup.html"
-next_url: "/intro/getting-started/provision.html"
-next_title: "Provision"
-description: |-
- With Packer installed, let's just dive right into it and build our first image. Our first image will be an Amazon EC2 AMI with Redis pre-installed. This is just an example. Packer can create images for many platforms with anything pre-installed.
----
+description: |
+ With Packer installed, let's just dive right into it and build our first image.
+ Our first image will be an Amazon EC2 AMI with Redis pre-installed. This is just
+ an example. Packer can create images for many platforms with anything
+ pre-installed.
+layout: intro
+next_title: Provision
+next_url: '/intro/getting-started/provision.html'
+page_title: Build an Image
+prev_url: '/intro/getting-started/setup.html'
+...
# Build an Image
-With Packer installed, let's just dive right into it and build our first
-image. Our first image will be an [Amazon EC2 AMI](http://aws.amazon.com/ec2/)
-with Redis pre-installed. This is just an example. Packer can create images
-for [many platforms](/intro/platforms.html) with anything pre-installed.
+With Packer installed, let's just dive right into it and build our first image.
+Our first image will be an [Amazon EC2 AMI](http://aws.amazon.com/ec2/) with
+Redis pre-installed. This is just an example. Packer can create images for [many
+platforms](/intro/platforms.html) with anything pre-installed.
If you don't have an AWS account, [create one now](http://aws.amazon.com/free/).
For the example, we'll use a "t2.micro" instance to build our image, which
-qualifies under the AWS [free-tier](http://aws.amazon.com/free/), meaning
-it will be free. If you already have an AWS account, you may be charged some
-amount of money, but it shouldn't be more than a few cents.
+qualifies under the AWS [free-tier](http://aws.amazon.com/free/), meaning it
+will be free. If you already have an AWS account, you may be charged some amount
+of money, but it shouldn't be more than a few cents.
--> **Note:** If you're not using an account that qualifies under the AWS
-free-tier, you may be charged to run these examples. The charge should only be
-a few cents, but we're not responsible if it ends up being more.
+-> **Note:** If you're not using an account that qualifies under the AWS
+free-tier, you may be charged to run these examples. The charge should only be a
+few cents, but we're not responsible if it ends up being more.
Packer can build images for [many platforms](/intro/platforms.html) other than
AWS, but AWS requires no additional software installed on your computer and
@@ -34,16 +37,16 @@ apply to the other platforms as well.
## The Template
-The configuration file used to define what image we want built and how
-is called a _template_ in Packer terminology. The format of a template
-is simple [JSON](http://www.json.org/). JSON struck the best balance between
+The configuration file used to define what image we want built and how is called
+a *template* in Packer terminology. The format of a template is simple
+[JSON](http://www.json.org/). JSON struck the best balance between
human-editable and machine-editable, allowing both hand-made templates as well
as machine generated templates to easily be made.
We'll start by creating the entire template, then we'll go over each section
briefly. Create a file `example.json` and fill it with the following contents:
-```javascript
+``` {.javascript}
{
"variables": {
"aws_access_key": "",
@@ -62,55 +65,55 @@ briefly. Create a file `example.json` and fill it with the following contents:
}
```
-When building, you'll pass in the `aws_access_key` and `aws_secret_key` as
-a [user variable](/docs/templates/user-variables.html), keeping your secret
-keys out of the template. You can create security credentials
-on [this page](https://console.aws.amazon.com/iam/home?#security_credential).
-An example IAM policy document can be found in the [Amazon EC2 builder docs](/docs/builders/amazon.html).
+When building, you'll pass in the `aws_access_key` and `aws_secret_key` as a
+[user variable](/docs/templates/user-variables.html), keeping your secret keys
+out of the template. You can create security credentials on [this
+page](https://console.aws.amazon.com/iam/home?#security_credential). An example
+IAM policy document can be found in the [Amazon EC2 builder
+docs](/docs/builders/amazon.html).
-This is a basic template that is ready-to-go. It should be immediately recognizable
-as a normal, basic JSON object. Within the object, the `builders` section
-contains an array of JSON objects configuring a specific _builder_. A
-builder is a component of Packer that is responsible for creating a machine
-and turning that machine into an image.
+This is a basic template that is ready-to-go. It should be immediately
+recognizable as a normal, basic JSON object. Within the object, the `builders`
+section contains an array of JSON objects configuring a specific *builder*. A
+builder is a component of Packer that is responsible for creating a machine and
+turning that machine into an image.
-In this case, we're only configuring a single builder of type `amazon-ebs`.
-This is the Amazon EC2 AMI builder that ships with Packer. This builder
-builds an EBS-backed AMI by launching a source AMI, provisioning on top of
-that, and re-packaging it into a new AMI.
+In this case, we're only configuring a single builder of type `amazon-ebs`. This
+is the Amazon EC2 AMI builder that ships with Packer. This builder builds an
+EBS-backed AMI by launching a source AMI, provisioning on top of that, and
+re-packaging it into a new AMI.
-The additional keys within the object are configuration for this builder, specifying things
-such as access keys, the source AMI to build from, and more.
-The exact set of configuration variables available for a builder are
-specific to each builder and can be found within the [documentation](/docs).
+The additional keys within the object are configuration for this builder,
+specifying things such as access keys, the source AMI to build from, and more.
+The exact set of configuration variables available for a builder are specific to
+each builder and can be found within the [documentation](/docs).
-Before we take this template and build an image from it, let's validate the template
-by running `packer validate example.json`. This command checks the syntax
-as well as the configuration values to verify they look valid. The output should
-look similar to below, because the template should be valid. If there are
+Before we take this template and build an image from it, let's validate the
+template by running `packer validate example.json`. This command checks the
+syntax as well as the configuration values to verify they look valid. The output
+should look similar to below, because the template should be valid. If there are
any errors, this command will tell you.
-```text
+``` {.text}
$ packer validate example.json
Template validated successfully.
```
Next, let's build the image from this template.
-An astute reader may notice that we said earlier we'd be building an
-image with Redis pre-installed, and yet the template we made doesn't reference
-Redis anywhere. In fact, this part of the documentation will only cover making
-a first basic, non-provisioned image. The next section on provisioning will
-cover installing Redis.
+An astute reader may notice that we said earlier we'd be building an image with
+Redis pre-installed, and yet the template we made doesn't reference Redis
+anywhere. In fact, this part of the documentation will only cover making a first
+basic, non-provisioned image. The next section on provisioning will cover
+installing Redis.
## Your First Image
-With a properly validated template. It is time to build your first image.
-This is done by calling `packer build` with the template file. The output
-should look similar to below. Note that this process typically takes a
-few minutes.
+With a properly validated template. It is time to build your first image. This
+is done by calling `packer build` with the template file. The output should look
+similar to below. Note that this process typically takes a few minutes.
-```text
+``` {.text}
$ packer build \
-var 'aws_access_key=YOUR ACCESS KEY' \
-var 'aws_secret_key=YOUR SECRET KEY' \
@@ -139,38 +142,36 @@ $ packer build \
us-east-1: ami-19601070
```
-At the end of running `packer build`, Packer outputs the _artifacts_
-that were created as part of the build. Artifacts are the results of a
-build, and typically represent an ID (such as in the case of an AMI) or
-a set of files (such as for a VMware virtual machine). In this example,
-we only have a single artifact: the AMI in us-east-1 that was created.
+At the end of running `packer build`, Packer outputs the *artifacts* that were
+created as part of the build. Artifacts are the results of a build, and
+typically represent an ID (such as in the case of an AMI) or a set of files
+(such as for a VMware virtual machine). In this example, we only have a single
+artifact: the AMI in us-east-1 that was created.
-This AMI is ready to use. If you wanted you can go and launch this AMI
-right now and it would work great.
+This AMI is ready to use. If you wanted you can go and launch this AMI right now
+and it would work great.
--> **Note:** Your AMI ID will surely be different than the
-one above. If you try to launch the one in the example output above, you
-will get an error. If you want to try to launch your AMI, get the ID from
-the Packer output.
+-> **Note:** Your AMI ID will surely be different than the one above. If you
+try to launch the one in the example output above, you will get an error. If you
+want to try to launch your AMI, get the ID from the Packer output.
## Managing the Image
-Packer only builds images. It does not attempt to manage them in any way.
-After they're built, it is up to you to launch or destroy them as you see
-fit. If you want to store and namespace images for easy reference, you
-can use [Atlas by HashiCorp](https://atlas.hashicorp.com). We'll cover
-remotely building and storing images at the end of this getting started guide.
+Packer only builds images. It does not attempt to manage them in any way. After
+they're built, it is up to you to launch or destroy them as you see fit. If you
+want to store and namespace images for easy reference, you can use [Atlas by
+HashiCorp](https://atlas.hashicorp.com). We'll cover remotely building and
+storing images at the end of this getting started guide.
-After running the above example, your AWS account
-now has an AMI associated with it. AMIs are stored in S3 by Amazon,
-so unless you want to be charged about $0.01
-per month, you'll probably want to remove it. Remove the AMI by
-first deregistering it on the [AWS AMI management page](https://console.aws.amazon.com/ec2/home?region=us-east-1#s=Images).
-Next, delete the associated snapshot on the
-[AWS snapshot management page](https://console.aws.amazon.com/ec2/home?region=us-east-1#s=Snapshots).
+After running the above example, your AWS account now has an AMI associated with
+it. AMIs are stored in S3 by Amazon, so unless you want to be charged about
+\$0.01 per month, you'll probably want to remove it. Remove the AMI by first
+deregistering it on the [AWS AMI management
+page](https://console.aws.amazon.com/ec2/home?region=us-east-1#s=Images). Next,
+delete the associated snapshot on the [AWS snapshot management
+page](https://console.aws.amazon.com/ec2/home?region=us-east-1#s=Snapshots).
-Congratulations! You've just built your first image with Packer. Although
-the image was pretty useless in this case (nothing was changed about it),
-this page should've given you a general idea of how Packer works, what
-templates are, and how to validate and build templates into machine
-images.
+Congratulations! You've just built your first image with Packer. Although the
+image was pretty useless in this case (nothing was changed about it), this page
+should've given you a general idea of how Packer works, what templates are, and
+how to validate and build templates into machine images.
diff --git a/website/source/intro/getting-started/next.html.markdown b/website/source/intro/getting-started/next.html.markdown
index 262b84bb9..e1e7cc2ae 100644
--- a/website/source/intro/getting-started/next.html.markdown
+++ b/website/source/intro/getting-started/next.html.markdown
@@ -1,25 +1,29 @@
---
-layout: "intro"
-page_title: "Next Steps"
-description: |-
- That concludes the getting started guide for Packer. You should now be comfortable with basic Packer usage, should understand templates, defining builds, provisioners, etc. At this point you're ready to begin playing with and using Packer in real scenarios.
----
+description: |
+ That concludes the getting started guide for Packer. You should now be
+ comfortable with basic Packer usage, should understand templates, defining
+ builds, provisioners, etc. At this point you're ready to begin playing with and
+ using Packer in real scenarios.
+layout: intro
+page_title: Next Steps
+...
# Next Steps
-That concludes the getting started guide for Packer. You should now be comfortable
-with basic Packer usage, should understand templates, defining builds, provisioners,
-etc. At this point you're ready to begin playing with and using Packer
-in real scenarios.
+That concludes the getting started guide for Packer. You should now be
+comfortable with basic Packer usage, should understand templates, defining
+builds, provisioners, etc. At this point you're ready to begin playing with and
+using Packer in real scenarios.
-From this point forward, the most important reference for you will be
-the [documentation](/docs). The documentation is less of a guide and
-more of a reference of all the overall features and options of Packer.
+From this point forward, the most important reference for you will be the
+[documentation](/docs). The documentation is less of a guide and more of a
+reference of all the overall features and options of Packer.
-If you're interested in learning more about how Packer fits into the
-HashiCorp ecosystem of tools, read our [Atlas getting started overview](https://atlas.hashicorp.com/help/intro/getting-started).
+If you're interested in learning more about how Packer fits into the HashiCorp
+ecosystem of tools, read our [Atlas getting started
+overview](https://atlas.hashicorp.com/help/intro/getting-started).
-As you use Packer more, please voice your comments and concerns on
-the [mailing list or IRC](/community). Additionally, Packer is
-[open source](https://github.com/mitchellh/packer) so please contribute
-if you'd like to. Contributions are very welcome.
+As you use Packer more, please voice your comments and concerns on the [mailing
+list or IRC](/community). Additionally, Packer is [open
+source](https://github.com/mitchellh/packer) so please contribute if you'd like
+to. Contributions are very welcome.
diff --git a/website/source/intro/getting-started/parallel-builds.html.markdown b/website/source/intro/getting-started/parallel-builds.html.markdown
index 90554dacc..626033ef2 100644
--- a/website/source/intro/getting-started/parallel-builds.html.markdown
+++ b/website/source/intro/getting-started/parallel-builds.html.markdown
@@ -1,57 +1,59 @@
---
-layout: "intro"
-page_title: "Parallel Builds"
-prev_url: "/intro/getting-started/provision.html"
-next_url: "/intro/getting-started/vagrant.html"
-next_title: "Vagrant Boxes"
-description: |-
- So far we've shown how Packer can automatically build an image and provision it. This on its own is already quite powerful. But Packer can do better than that. Packer can create multiple images for multiple platforms in parallel, all configured from a single template.
----
+description: |
+ So far we've shown how Packer can automatically build an image and provision it.
+ This on its own is already quite powerful. But Packer can do better than that.
+ Packer can create multiple images for multiple platforms in parallel, all
+ configured from a single template.
+layout: intro
+next_title: Vagrant Boxes
+next_url: '/intro/getting-started/vagrant.html'
+page_title: Parallel Builds
+prev_url: '/intro/getting-started/provision.html'
+...
# Parallel Builds
So far we've shown how Packer can automatically build an image and provision it.
This on its own is already quite powerful. But Packer can do better than that.
-Packer can create multiple images for multiple platforms _in parallel_, all
+Packer can create multiple images for multiple platforms *in parallel*, all
configured from a single template.
-This is a very useful and important feature of Packer. As an example,
-Packer is able to make an AMI and a VMware virtual machine
-in parallel provisioned with the _same scripts_, resulting in near-identical
-images. The AMI can be used for production, the VMware machine can be used
-for development. Or, another example, if you're using Packer to build
-[software appliances](http://en.wikipedia.org/wiki/Software_appliance),
-then you can build the appliance for every supported platform all in
-parallel, all configured from a single template.
+This is a very useful and important feature of Packer. As an example, Packer is
+able to make an AMI and a VMware virtual machine in parallel provisioned with
+the *same scripts*, resulting in near-identical images. The AMI can be used for
+production, the VMware machine can be used for development. Or, another example,
+if you're using Packer to build [software
+appliances](http://en.wikipedia.org/wiki/Software_appliance), then you can build
+the appliance for every supported platform all in parallel, all configured from
+a single template.
-Once you start taking advantage of this feature, the possibilities begin
-to unfold in front of you.
+Once you start taking advantage of this feature, the possibilities begin to
+unfold in front of you.
-Continuing on the example in this getting started guide, we'll build
-a [DigitalOcean](http://www.digitalocean.com) image as well as an AMI. Both
-will be near-identical: bare bones Ubuntu OS with Redis pre-installed.
-However, since we're building for both platforms, you have the option of
-whether you want to use the AMI, or the DigitalOcean snapshot. Or use both.
+Continuing on the example in this getting started guide, we'll build a
+[DigitalOcean](http://www.digitalocean.com) image as well as an AMI. Both will
+be near-identical: bare bones Ubuntu OS with Redis pre-installed. However, since
+we're building for both platforms, you have the option of whether you want to
+use the AMI, or the DigitalOcean snapshot. Or use both.
## Setting Up DigitalOcean
-[DigitalOcean](https://www.digitalocean.com/) is a relatively new, but
-very popular VPS provider that has popped up. They have a quality offering
-of high performance, low cost VPS servers. We'll be building a DigitalOcean
-snapshot for this example.
+[DigitalOcean](https://www.digitalocean.com/) is a relatively new, but very
+popular VPS provider that has popped up. They have a quality offering of high
+performance, low cost VPS servers. We'll be building a DigitalOcean snapshot for
+this example.
-In order to do this, you'll need an account with DigitalOcean.
-[Sign up for an account now](https://www.digitalocean.com/). It is free
-to sign up. Because the "droplets" (servers) are charged hourly, you
-_will_ be charged $0.01 for every image you create with Packer. If
-you're not okay with this, just follow along.
+In order to do this, you'll need an account with DigitalOcean. [Sign up for an
+account now](https://www.digitalocean.com/). It is free to sign up. Because the
+"droplets" (servers) are charged hourly, you *will* be charged \$0.01 for every
+image you create with Packer. If you're not okay with this, just follow along.
-!> **Warning!** You _will_ be charged $0.01 by DigitalOcean per image
+!> **Warning!** You *will* be charged \$0.01 by DigitalOcean per image
created with Packer because of the time the "droplet" is running.
-Once you sign up for an account, grab your API token from
-the [DigitalOcean API access page](https://cloud.digitalocean.com/settings/applications).
-Save these values somewhere; you'll need them in a second.
+Once you sign up for an account, grab your API token from the [DigitalOcean API
+access page](https://cloud.digitalocean.com/settings/applications). Save these
+values somewhere; you'll need them in a second.
## Modifying the Template
@@ -59,20 +61,20 @@ We now have to modify the template to add DigitalOcean to it. Modify the
template we've been using and add the following JSON object to the `builders`
array.
-```javascript
+``` {.javascript}
{
"type": "digitalocean",
"api_token": "{{user `do_api_token`}}",
- "image": "ubuntu-14-04-x64",
- "region": "nyc3",
- "size": "512mb",
+ "image": "ubuntu-14-04-x64",
+ "region": "nyc3",
+ "size": "512mb",
}
```
-You'll also need to modify the `variables` section of the template
-to include the access keys for DigitalOcean.
+You'll also need to modify the `variables` section of the template to include
+the access keys for DigitalOcean.
-```javascript
+``` {.javascript}
"variables": {
"do_api_token": "",
// ...
@@ -81,61 +83,61 @@ to include the access keys for DigitalOcean.
The entire template should now look like this:
-```javascript
+``` {.javascript}
{
- "variables": {
- "aws_access_key": "",
- "aws_secret_key": "",
- "do_api_token": ""
- },
- "builders": [{
- "type": "amazon-ebs",
- "access_key": "{{user `aws_access_key`}}",
- "secret_key": "{{user `aws_secret_key`}}",
- "region": "us-east-1",
- "source_ami": "ami-de0d9eb7",
- "instance_type": "t1.micro",
- "ssh_username": "ubuntu",
- "ami_name": "packer-example {{timestamp}}"
- },{
- "type": "digitalocean",
- "api_token": "{{user `do_api_token`}}",
- "image": "ubuntu-14-04-x64",
- "region": "nyc3",
- "size": "512mb"
- }],
- "provisioners": [{
- "type": "shell",
- "inline": [
- "sleep 30",
- "sudo apt-get update",
- "sudo apt-get install -y redis-server"
- ]
- }]
+ "variables": {
+ "aws_access_key": "",
+ "aws_secret_key": "",
+ "do_api_token": ""
+ },
+ "builders": [{
+ "type": "amazon-ebs",
+ "access_key": "{{user `aws_access_key`}}",
+ "secret_key": "{{user `aws_secret_key`}}",
+ "region": "us-east-1",
+ "source_ami": "ami-de0d9eb7",
+ "instance_type": "t1.micro",
+ "ssh_username": "ubuntu",
+ "ami_name": "packer-example {{timestamp}}"
+ },{
+ "type": "digitalocean",
+ "api_token": "{{user `do_api_token`}}",
+ "image": "ubuntu-14-04-x64",
+ "region": "nyc3",
+ "size": "512mb"
+ }],
+ "provisioners": [{
+ "type": "shell",
+ "inline": [
+ "sleep 30",
+ "sudo apt-get update",
+ "sudo apt-get install -y redis-server"
+ ]
+ }]
}
```
Additional builders are simply added to the `builders` array in the template.
-This tells Packer to build multiple images. The builder `type` values don't
-even need to be different! In fact, if you wanted to build multiple AMIs,
-you can do that as long as you specify a unique `name` for each build.
+This tells Packer to build multiple images. The builder `type` values don't even
+need to be different! In fact, if you wanted to build multiple AMIs, you can do
+that as long as you specify a unique `name` for each build.
Validate the template with `packer validate`. This is always a good practice.
--> **Note:** If you're looking for more **DigitalOcean configuration options**,
-you can find them on the
-[DigitalOcean Builder page](/docs/builders/digitalocean.html) in the
-documentation. The documentation is more of a reference manual that contains a
-listing of all the available configuration options.
+-> **Note:** If you're looking for more **DigitalOcean configuration
+options**, you can find them on the [DigitalOcean Builder
+page](/docs/builders/digitalocean.html) in the documentation. The documentation
+is more of a reference manual that contains a listing of all the available
+configuration options.
## Build
-Now run `packer build` with your user variables. The output is too verbose to include
-all of it, but a portion of it is reproduced below. Note that the ordering
-and wording of the lines may be slightly different, but the effect is the
-same.
+Now run `packer build` with your user variables. The output is too verbose to
+include all of it, but a portion of it is reproduced below. Note that the
+ordering and wording of the lines may be slightly different, but the effect is
+the same.
-```text
+``` {.text}
$ packer build \
-var 'aws_access_key=YOUR ACCESS KEY' \
-var 'aws_secret_key=YOUR SECRET KEY' \
@@ -162,10 +164,10 @@ us-east-1: ami-376d1d5e
--> digitalocean: A snapshot was created: packer-1371870364
```
-As you can see, Packer builds both the Amazon and DigitalOcean images
-in parallel. It outputs information about each in different colors
-(although you can't see that in the block above) so that it is easy to identify.
+As you can see, Packer builds both the Amazon and DigitalOcean images in
+parallel. It outputs information about each in different colors (although you
+can't see that in the block above) so that it is easy to identify.
-At the end of the build, Packer outputs both of the artifacts created
-(an AMI and a DigitalOcean snapshot). Both images created are bare bones
-Ubuntu installations with Redis pre-installed.
+At the end of the build, Packer outputs both of the artifacts created (an AMI
+and a DigitalOcean snapshot). Both images created are bare bones Ubuntu
+installations with Redis pre-installed.
diff --git a/website/source/intro/getting-started/provision.html.markdown b/website/source/intro/getting-started/provision.html.markdown
index bedb63b69..eda1f0346 100644
--- a/website/source/intro/getting-started/provision.html.markdown
+++ b/website/source/intro/getting-started/provision.html.markdown
@@ -1,43 +1,45 @@
---
-layout: "intro"
-page_title: "Provision"
-prev_url: "/intro/getting-started/build-image.html"
-next_url: "/intro/getting-started/parallel-builds.html"
-next_title: "Parallel Builds"
-description: |-
- In the previous page of this guide, you created your first image with Packer. The image you just built, however, was basically just a repackaging of a previously existing base AMI. The real utility of Packer comes from being able to install and configure software into the images as well. This stage is also known as the _provision_ step. Packer fully supports automated provisioning in order to install software onto the machines prior to turning them into images.
----
+description: |
+ In the previous page of this guide, you created your first image with Packer.
+ The image you just built, however, was basically just a repackaging of a
+ previously existing base AMI. The real utility of Packer comes from being able
+ to install and configure software into the images as well. This stage is also
+ known as the *provision* step. Packer fully supports automated provisioning in
+ order to install software onto the machines prior to turning them into images.
+layout: intro
+next_title: Parallel Builds
+next_url: '/intro/getting-started/parallel-builds.html'
+page_title: Provision
+prev_url: '/intro/getting-started/build-image.html'
+...
# Provision
-In the previous page of this guide, you created your first image with
-Packer. The image you just built, however, was basically just a repackaging
-of a previously existing base AMI. The real utility of Packer comes from
-being able to install and configure software into the images as well.
-This stage is also known as the _provision_ step. Packer fully supports
-automated provisioning in order to install software onto the machines prior
-to turning them into images.
+In the previous page of this guide, you created your first image with Packer.
+The image you just built, however, was basically just a repackaging of a
+previously existing base AMI. The real utility of Packer comes from being able
+to install and configure software into the images as well. This stage is also
+known as the *provision* step. Packer fully supports automated provisioning in
+order to install software onto the machines prior to turning them into images.
-In this section, we're going to complete our image by installing
-Redis on it. This way, the image we end up building actually contains
-Redis pre-installed. Although Redis is a small, simple example, this should
-give you an idea of what it may be like to install many more packages into
-the image.
+In this section, we're going to complete our image by installing Redis on it.
+This way, the image we end up building actually contains Redis pre-installed.
+Although Redis is a small, simple example, this should give you an idea of what
+it may be like to install many more packages into the image.
-Historically, pre-baked images have been frowned upon because changing
-them has been so tedious and slow. Because Packer is completely automated,
-including provisioning, images can be changed quickly and integrated with
-modern configuration management tools such as Chef or Puppet.
+Historically, pre-baked images have been frowned upon because changing them has
+been so tedious and slow. Because Packer is completely automated, including
+provisioning, images can be changed quickly and integrated with modern
+configuration management tools such as Chef or Puppet.
## Configuring Provisioners
Provisioners are configured as part of the template. We'll use the built-in
shell provisioner that comes with Packer to install Redis. Modify the
-`example.json` template we made previously and add the following. We'll
-explain the various parts of the new configuration following the code
-block below.
+`example.json` template we made previously and add the following. We'll explain
+the various parts of the new configuration following the code block below.
-```javascript
+``` {.javascript}
{
"variables": ["..."],
"builders": ["..."],
@@ -53,51 +55,51 @@ block below.
}
```
--> **Note:** The `sleep 30` in the example above is
-very important. Because Packer is able to detect and SSH into the instance
-as soon as SSH is available, Ubuntu actually doesn't get proper amounts
-of time to initialize. The sleep makes sure that the OS properly initializes.
+-> **Note:** The `sleep 30` in the example above is very important. Because
+Packer is able to detect and SSH into the instance as soon as SSH is available,
+Ubuntu actually doesn't get proper amounts of time to initialize. The sleep
+makes sure that the OS properly initializes.
-Hopefully it is obvious, but the `builders` section shouldn't actually
-contain "...", it should be the contents setup in the previous page
-of the getting started guide. Also note the comma after the `"builders": [...]`
-section, which was not present in the previous lesson.
+Hopefully it is obvious, but the `builders` section shouldn't actually contain
+"...", it should be the contents setup in the previous page of the getting
+started guide. Also note the comma after the `"builders": [...]` section, which
+was not present in the previous lesson.
To configure the provisioners, we add a new section `provisioners` to the
-template, alongside the `builders` configuration. The provisioners section
-is an array of provisioners to run. If multiple provisioners are specified, they
-are run in the order given.
+template, alongside the `builders` configuration. The provisioners section is an
+array of provisioners to run. If multiple provisioners are specified, they are
+run in the order given.
-By default, each provisioner is run for every builder defined. So if we had
-two builders defined in our template, such as both Amazon and DigitalOcean, then
-the shell script would run as part of both builds. There are ways to restrict
+By default, each provisioner is run for every builder defined. So if we had two
+builders defined in our template, such as both Amazon and DigitalOcean, then the
+shell script would run as part of both builds. There are ways to restrict
provisioners to certain builds, but it is outside the scope of this getting
started guide. It is covered in more detail in the complete
[documentation](/docs).
-The one provisioner we defined has a type of `shell`. This provisioner
-ships with Packer and runs shell scripts on the running machine. In our
-case, we specify two inline commands to run in order to install Redis.
+The one provisioner we defined has a type of `shell`. This provisioner ships
+with Packer and runs shell scripts on the running machine. In our case, we
+specify two inline commands to run in order to install Redis.
## Build
With the provisioner configured, give it a pass once again through
`packer validate` to verify everything is okay, then build it using
-`packer build example.json`. The output should look similar to when you
-built your first image, except this time there will be a new step where
-the provisioning is run.
+`packer build example.json`. The output should look similar to when you built
+your first image, except this time there will be a new step where the
+provisioning is run.
-The output from the provisioner is too verbose to include in this
-guide, since it contains all the output from the shell scripts. But you
-should see Redis successfully install. After that, Packer once again
-turns the machine into an AMI.
+The output from the provisioner is too verbose to include in this guide, since
+it contains all the output from the shell scripts. But you should see Redis
+successfully install. After that, Packer once again turns the machine into an
+AMI.
If you were to launch this AMI, Redis would be pre-installed. Cool!
This is just a basic example. In a real world use case, you may be provisioning
-an image with the entire stack necessary to run your application. Or maybe
-just the web stack so that you can have an image for web servers pre-built.
-This saves tons of time later as you launch these images since everything
-is pre-installed. Additionally, since everything is pre-installed, you
-can test the images as they're built and know that when they go into
-production, they'll be functional.
+an image with the entire stack necessary to run your application. Or maybe just
+the web stack so that you can have an image for web servers pre-built. This
+saves tons of time later as you launch these images since everything is
+pre-installed. Additionally, since everything is pre-installed, you can test the
+images as they're built and know that when they go into production, they'll be
+functional.
diff --git a/website/source/intro/getting-started/remote-builds.html.markdown b/website/source/intro/getting-started/remote-builds.html.markdown
index e5d1b48ff..f37a5a5ad 100644
--- a/website/source/intro/getting-started/remote-builds.html.markdown
+++ b/website/source/intro/getting-started/remote-builds.html.markdown
@@ -1,23 +1,41 @@
---
-layout: "intro"
-page_title: "Remote Builds and Storage"
-prev_url: "/intro/getting-started/vagrant.html"
-next_url: "/intro/getting-started/next.html"
-next_title: "Next Steps"
-description: |-
- Up to this point in the guide, you have been running Packer on your local machine to build and provision images on AWS and DigitalOcean. However, you can use Atlas by HashiCorp to both run Packer builds remotely and store the output of builds.
----
+description: |
+ Up to this point in the guide, you have been running Packer on your local
+ machine to build and provision images on AWS and DigitalOcean. However, you can
+ use Atlas by HashiCorp to both run Packer builds remotely and store the output
+ of builds.
+layout: intro
+next_title: Next Steps
+next_url: '/intro/getting-started/next.html'
+page_title: Remote Builds and Storage
+prev_url: '/intro/getting-started/vagrant.html'
+...
# Remote Builds and Storage
-Up to this point in the guide, you have been running Packer on your local machine to build and provision images on AWS and DigitalOcean. However, you can use [Atlas by HashiCorp](https://atlas.hashicorp.com) to run Packer builds remotely and store the output of builds.
+
+Up to this point in the guide, you have been running Packer on your local
+machine to build and provision images on AWS and DigitalOcean. However, you can
+use [Atlas by HashiCorp](https://atlas.hashicorp.com) to run Packer builds
+remotely and store the output of builds.
## Why Build Remotely?
-By building remotely, you can move access credentials off of developer machines, release local machines from long-running Packer processes, and automatically start Packer builds from trigger sources such as `vagrant push`, a version control system, or CI tool.
+
+By building remotely, you can move access credentials off of developer machines,
+release local machines from long-running Packer processes, and automatically
+start Packer builds from trigger sources such as `vagrant push`, a version
+control system, or CI tool.
## Run Packer Builds Remotely
-To run Packer remotely, there are two changes that must be made to the Packer template. The first is the addition of the `push` [configuration](https://www.packer.io/docs/templates/push.html), which sends the Packer template to Atlas so it can run Packer remotely. The second modification is updating the variables section to read variables from the Atlas environment rather than the local environment. Remove the `post-processors` section for now if it is still in your template.
-```javascript
+To run Packer remotely, there are two changes that must be made to the Packer
+template. The first is the addition of the `push`
+[configuration](https://www.packer.io/docs/templates/push.html), which sends the
+Packer template to Atlas so it can run Packer remotely. The second modification
+is updating the variables section to read variables from the Atlas environment
+rather than the local environment. Remove the `post-processors` section for now
+if it is still in your template.
+
+``` {.javascript}
{
"variables": {
"aws_access_key": "{{env `aws_access_key`}}",
@@ -45,31 +63,35 @@ To run Packer remotely, there are two changes that must be made to the Packer te
"name": "ATLAS_USERNAME/packer-tutorial"
}
}
-```
-
-To get an Atlas username, [create an account here](https://atlas.hashicorp.com/account/new?utm_source=oss&utm_medium=getting-started&utm_campaign=packer). Replace "ATLAS_USERNAME" with your username, then run `packer push -create example.json` to send the configuration to Atlas, which automatically starts the build.
-
-This build will fail since neither `aws_access_key` or `aws_secret_key` are set in the Atlas environment. To set environment variables in Atlas, navigate to the [operations tab](https://atlas.hashicorp.com/operations), click the "packer-tutorial" build configuration that was just created, and then click 'variables' in the left navigation. Set `aws_access_key` and `aws_secret_key` with their respective values. Now restart the Packer build by either clicking 'rebuild' in the Atlas UI or by running `packer push example.json` again. Now when you click on the active build, you can view the logs in real-time.
-
--> **Note:** Whenever a change is made to the Packer template, you must `packer push` to update the configuration in Atlas.
-
-## Store Packer Outputs
-Now we have Atlas building an AMI with Redis pre-configured. This is great, but it's even better to store and version the AMI output so it can be easily deployed by a tool like [Terraform](https://terraform.io). The `atlas` [post-processor](/docs/post-processors/atlas.html) makes this process simple:
-
- ```javascript
-{
- "variables": ["..."],
- "builders": ["..."],
- "provisioners": ["..."],
- "push": ["..."],
- "post-processors": [
- {
- "type": "atlas",
- "artifact": "ATLAS_USERNAME/packer-tutorial",
- "artifact_type": "amazon.ami"
- }
- ]
-}
```
-Update the `post-processors` block with your Atlas username, then `packer push example.json` and watch the build kick off in Atlas! When the build completes, the resulting artifact will be saved and stored in Atlas.
\ No newline at end of file
+To get an Atlas username, [create an account
+here](https://atlas.hashicorp.com/account/new?utm_source=oss&utm_medium=getting-started&utm_campaign=packer).
+Replace "ATLAS\_USERNAME" with your username, then run
+`packer push -create example.json` to send the configuration to Atlas, which
+automatically starts the build.
+
+This build will fail since neither `aws_access_key` or `aws_secret_key` are set
+in the Atlas environment. To set environment variables in Atlas, navigate to the
+[operations tab](https://atlas.hashicorp.com/operations), click the
+"packer-tutorial" build configuration that was just created, and then click
+'variables' in the left navigation. Set `aws_access_key` and `aws_secret_key`
+with their respective values. Now restart the Packer build by either clicking
+'rebuild' in the Atlas UI or by running `packer push example.json` again. Now
+when you click on the active build, you can view the logs in real-time.
+
+-> **Note:** Whenever a change is made to the Packer template, you must
+`packer push` to update the configuration in Atlas.
+
+## Store Packer Outputs
+
+Now we have Atlas building an AMI with Redis pre-configured. This is great, but
+it's even better to store and version the AMI output so it can be easily
+deployed by a tool like [Terraform](https://terraform.io). The `atlas`
+[post-processor](/docs/post-processors/atlas.html) makes this process simple:
+
+`javascript { "variables": ["..."], "builders": ["..."], "provisioners": ["..."], "push": ["..."], "post-processors": [ { "type": "atlas", "artifact": "ATLAS_USERNAME/packer-tutorial", "artifact_type": "amazon.ami" } ] }`
+
+Update the `post-processors` block with your Atlas username, then
+`packer push example.json` and watch the build kick off in Atlas! When the build
+completes, the resulting artifact will be saved and stored in Atlas.
diff --git a/website/source/intro/getting-started/setup.html.markdown b/website/source/intro/getting-started/setup.html.markdown
index ae14c2748..a24d023e2 100644
--- a/website/source/intro/getting-started/setup.html.markdown
+++ b/website/source/intro/getting-started/setup.html.markdown
@@ -1,47 +1,51 @@
---
-layout: "intro"
-page_title: "Install Packer"
-prev_url: "/intro/platforms.html"
-next_url: "/intro/getting-started/build-image.html"
-next_title: "Build an Image"
-description: |-
- Packer must first be installed on the machine you want to run it on. To make installation easy, Packer is distributed as a binary package for all supported platforms and architectures. This page will not cover how to compile Packer from source, as that is covered in the README and is only recommended for advanced users.
----
+description: |
+ Packer must first be installed on the machine you want to run it on. To make
+ installation easy, Packer is distributed as a binary package for all supported
+ platforms and architectures. This page will not cover how to compile Packer from
+ source, as that is covered in the README and is only recommended for advanced
+ users.
+layout: intro
+next_title: Build an Image
+next_url: '/intro/getting-started/build-image.html'
+page_title: Install Packer
+prev_url: '/intro/platforms.html'
+...
# Install Packer
-Packer must first be installed on the machine you want to run it on.
-To make installation easy, Packer is distributed as a [binary package](/downloads.html)
-for all supported platforms and architectures. This page will not cover how
-to compile Packer from source, as that is covered in the
+Packer must first be installed on the machine you want to run it on. To make
+installation easy, Packer is distributed as a [binary package](/downloads.html)
+for all supported platforms and architectures. This page will not cover how to
+compile Packer from source, as that is covered in the
[README](https://github.com/mitchellh/packer/blob/master/README.md) and is only
recommended for advanced users.
## Installing Packer
-To install packer, first find the [appropriate package](/downloads.html)
-for your system and download it. Packer is packaged as a "zip" file.
+To install packer, first find the [appropriate package](/downloads.html) for
+your system and download it. Packer is packaged as a "zip" file.
Next, unzip the downloaded package into a directory where Packer will be
installed. On Unix systems, `~/packer` or `/usr/local/packer` is generally good,
-depending on whether you want to restrict the install to just your user
-or install it system-wide. On Windows systems, you can put it wherever you'd
-like.
+depending on whether you want to restrict the install to just your user or
+install it system-wide. On Windows systems, you can put it wherever you'd like.
After unzipping the package, the directory should contain a set of binary
-programs, such as `packer`, `packer-build-amazon-ebs`, etc. The final step
-to installation is to make sure the directory you installed Packer to
-is on the PATH. See [this page](http://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
-for instructions on setting the PATH on Linux and Mac.
-[This page](http://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
+programs, such as `packer`, `packer-build-amazon-ebs`, etc. The final step to
+installation is to make sure the directory you installed Packer to is on the
+PATH. See [this
+page](http://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
+for instructions on setting the PATH on Linux and Mac. [This
+page](http://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
contains instructions for setting the PATH on Windows.
## Verifying the Installation
-After installing Packer, verify the installation worked by opening
-a new command prompt or console, and checking that `packer` is available:
+After installing Packer, verify the installation worked by opening a new command
+prompt or console, and checking that `packer` is available:
-```text
+``` {.text}
$ packer
usage: packer [--version] [--help]