Commit 26e374fb authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

website: document the new createtime stuff

parent 94efe2c5
...@@ -62,8 +62,8 @@ Required: ...@@ -62,8 +62,8 @@ Required:
* `ami_name` (string) - The name of the resulting AMI that will appear * `ami_name` (string) - The name of the resulting AMI that will appear
when managing AMIs in the AWS console or via APIs. This must be unique. when managing AMIs in the AWS console or via APIs. This must be unique.
To help make this unique, certain template parameters are available for To help make this unique, use a function like `timestamp` (see
this value, which are documented below. [configuration templates](/docs/templates/configuration-templates.html) for more info)
* `secret_key` (string) - The secret key used to communicate with AWS. * `secret_key` (string) - The secret key used to communicate with AWS.
If not specified, Packer will attempt to read this from environmental If not specified, Packer will attempt to read this from environmental
...@@ -115,22 +115,10 @@ Here is a basic example. It is completely valid except for the access keys: ...@@ -115,22 +115,10 @@ Here is a basic example. It is completely valid except for the access keys:
"access_key": "YOUR KEY HERE", "access_key": "YOUR KEY HERE",
"secret_key": "YOUR SECRET KEY HERE", "secret_key": "YOUR SECRET KEY HERE",
"source_ami": "ami-e81d5881", "source_ami": "ami-e81d5881",
"ami_name": "packer-amazon-chroot {{.CreateTime}}" "ami_name": "packer-amazon-chroot {{timestamp}}"
} }
</pre> </pre>
## AMI Name Variables
The AMI name specified by the `ami_name` configuration variable is actually
treated as a [configuration template](/docs/templates/configuration-templates.html).
Packer provides a set of variables that it will replace
within the AMI name. This helps ensure the AMI name is unique, as AWS requires.
The available variables are shown below:
* `CreateTime` - This will be replaced with the Unix timestamp of when
the AMI was built.
## Chroot Mounts ## Chroot Mounts
The `chroot_mounts` configuration can be used to mount additional devices The `chroot_mounts` configuration can be used to mount additional devices
......
...@@ -37,8 +37,8 @@ Required: ...@@ -37,8 +37,8 @@ Required:
* `ami_name` (string) - The name of the resulting AMI that will appear * `ami_name` (string) - The name of the resulting AMI that will appear
when managing AMIs in the AWS console or via APIs. This must be unique. when managing AMIs in the AWS console or via APIs. This must be unique.
To help make this unique, certain template parameters are available for To help make this unique, use a function like `timestamp` (see
this value, which are documented below. [configuration templates](/docs/templates/configuration-templates.html) for more info)
* `instance_type` (string) - The EC2 instance type to use while building * `instance_type` (string) - The EC2 instance type to use while building
the AMI, such as "m1.small". the AMI, such as "m1.small".
...@@ -96,7 +96,7 @@ Here is a basic example. It is completely valid except for the access keys: ...@@ -96,7 +96,7 @@ Here is a basic example. It is completely valid except for the access keys:
"source_ami": "ami-de0d9eb7", "source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro", "instance_type": "t1.micro",
"ssh_username": "ubuntu", "ssh_username": "ubuntu",
"ami_name": "packer-quick-start {{.CreateTime}}", "ami_name": "packer-quick-start {{timestamp}}",
} }
</pre> </pre>
...@@ -121,22 +121,10 @@ Here is an example using the optional AMI tags. This will add the tags ...@@ -121,22 +121,10 @@ Here is an example using the optional AMI tags. This will add the tags
"source_ami": "ami-de0d9eb7", "source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro", "instance_type": "t1.micro",
"ssh_username": "ubuntu", "ssh_username": "ubuntu",
"ami_name": "packer-quick-start {{.CreateTime}}", "ami_name": "packer-quick-start {{timestamp}}",
"tags": { "tags": {
"OS_Version": "Ubuntu", "OS_Version": "Ubuntu",
"Release": "Latest" "Release": "Latest"
} }
} }
</pre> </pre>
## AMI Name Variables
The AMI name specified by the `ami_name` configuration variable is actually
treated as a [configuration template](/docs/templates/configuration-templates.html).
Packer provides a set of variables that it will replace
within the AMI name. This helps ensure the AMI name is unique, as AWS requires.
The available variables are shown below:
* `CreateTime` - This will be replaced with the Unix timestamp of when
the AMI was built.
...@@ -41,8 +41,8 @@ Required: ...@@ -41,8 +41,8 @@ Required:
* `ami_name` (string) - The name of the resulting AMI that will appear * `ami_name` (string) - The name of the resulting AMI that will appear
when managing AMIs in the AWS console or via APIs. This must be unique. when managing AMIs in the AWS console or via APIs. This must be unique.
To help make this unique, certain template parameters are available for To help make this unique, use a function like `timestamp` (see
this value, which are documented below. [configuration templates](/docs/templates/configuration-templates.html) for more info)
* `instance_type` (string) - The EC2 instance type to use while building * `instance_type` (string) - The EC2 instance type to use while building
the AMI, such as "m1.small". the AMI, such as "m1.small".
...@@ -78,7 +78,7 @@ Optional: ...@@ -78,7 +78,7 @@ Optional:
"/tmp". This directory must exist and be writable. "/tmp". This directory must exist and be writable.
* `bundle_prefix` (string) - The prefix for files created from bundling * `bundle_prefix` (string) - The prefix for files created from bundling
the root volume. By default this is "image-{{.Createtime}}". The `CreateTime` the root volume. By default this is "image-{{timestamp}}". The `timestamp`
variable should be used to make sure this is unique, otherwise it can variable should be used to make sure this is unique, otherwise it can
collide with other created AMIs by Packer in your account. collide with other created AMIs by Packer in your account.
...@@ -140,7 +140,7 @@ Here is a basic example. It is completely valid except for the access keys: ...@@ -140,7 +140,7 @@ Here is a basic example. It is completely valid except for the access keys:
"x509_key_path": "x509.key", "x509_key_path": "x509.key",
"x509_upload_path": "/tmp", "x509_upload_path": "/tmp",
"ami_name": "packer-quick-start {{.CreateTime}}" "ami_name": "packer-quick-start {{timestamp}}"
} }
</pre> </pre>
...@@ -151,18 +151,6 @@ the section above for more information on what environmental variables Packer ...@@ -151,18 +151,6 @@ the section above for more information on what environmental variables Packer
will look for. will look for.
</div> </div>
## AMI Name Variables
The AMI name specified by the `ami_name` configuration variable is actually
treated as a [configuration template](/docs/templates/configuration-templates.html).
Packer provides a set of variables that it will replace
within the AMI name. This helps ensure the AMI name is unique, as AWS requires.
The available variables are shown below:
* `CreateTime` - This will be replaced with the Unix timestamp of when
the AMI was built.
## Custom Bundle Commands ## Custom Bundle Commands
A lot of the process required for creating an instance-store backed AMI A lot of the process required for creating an instance-store backed AMI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment