Commit b948755a authored by Mark Peek's avatar Mark Peek

website: document the amazon block device mappings

parent 91670cea
...@@ -58,6 +58,12 @@ Required: ...@@ -58,6 +58,12 @@ Required:
Optional: Optional:
* `ami_block_device_mappings` (array of block device mappings) - Add the block
device mappings to the AMI. The block device mappings allow for keys:
"device_name" (string), "virtual_name" (string), "snapshot_id" (string),
"volume_type" (string), "volume_size" (int), "delete_on_termination" (bool),
and "iops" (int).
* `ami_description` (string) - The description to set for the resulting * `ami_description` (string) - The description to set for the resulting
AMI(s). By default this description is empty. AMI(s). By default this description is empty.
...@@ -77,6 +83,10 @@ Optional: ...@@ -77,6 +83,10 @@ Optional:
[IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) [IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
to launch the EC2 instance with. to launch the EC2 instance with.
* `launch_block_device_mappings` (array of block device mappings) - Add the
block device mappings to the launch instance. The block device mappings are
the same as `ami_block_device_mappings` above.
* `security_group_id` (string) - The ID (_not_ the name) of the security * `security_group_id` (string) - The ID (_not_ the name) of the security
group to assign to the instance. By default this is not set and Packer group to assign to the instance. By default this is not set and Packer
will automatically create a new temporary security group to allow SSH will automatically create a new temporary security group to allow SSH
...@@ -130,6 +140,34 @@ the section above for more information on what environmental variables Packer ...@@ -130,6 +140,34 @@ the section above for more information on what environmental variables Packer
will look for. will look for.
</div> </div>
## AMI Block Device Mappings Example
Here is an example using the optional AMI block device mappings. This will add
the /dev/sdb and /dev/sdc block device mappings to the finished AMI.
<pre class="prettyprint">
{
"type": "amazon-ebs",
"access_key": "YOUR KEY HERE",
"secret_key": "YOUR SECRET KEY HERE",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-quick-start {{timestamp}}",
"ami_block_device_mappings": [
{
"device_name": "/dev/sdb",
"virtual_name": "ephemeral0"
},
{
"device_name": "/dev/sdc",
"virtual_name": "ephemeral1"
}
]
}
</pre>
## Tag Example ## Tag Example
Here is an example using the optional AMI tags. This will add the tags Here is an example using the optional AMI tags. This will add the tags
......
...@@ -73,6 +73,13 @@ Required: ...@@ -73,6 +73,13 @@ Required:
Optional: Optional:
* `ami_block_device_mappings` (array of block device mappings) - Add the block
device mappings to the AMI. The block device mappings allow for keys:
"device_name" (string), "virtual_name" (string), "snapshot_id" (string),
"volume_type" (string), "volume_size" (int), "delete_on_termination" (bool),
and "iops" (int). See [amazon-ebs](/docs/builders/amazon-ebs.html) for an
example template.
* `ami_description` (string) - The description to set for the resulting * `ami_description` (string) - The description to set for the resulting
AMI(s). By default this description is empty. AMI(s). By default this description is empty.
...@@ -108,6 +115,10 @@ Optional: ...@@ -108,6 +115,10 @@ Optional:
[IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) [IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
to launch the EC2 instance with. to launch the EC2 instance with.
* `launch_block_device_mappings` (array of block device mappings) - Add the
block device mappings to the launch instance. The block device mappings are
the same as `ami_block_device_mappings` above.
* `security_group_id` (string) - The ID (_not_ the name) of the security * `security_group_id` (string) - The ID (_not_ the name) of the security
group to assign to the instance. By default this is not set and Packer group to assign to the instance. By default this is not set and Packer
will automatically create a new temporary security group to allow SSH will automatically create a new temporary security group to allow SSH
......
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