From 8c9f2f5e1c60c2476dcb87e4650409d89af504e7 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 19 Apr 2019 16:35:15 -0700 Subject: [PATCH 1/2] add a table explaining what to expect with different ssh options for the amazon builders. Also convert builder docs to .erb to support partials --- ...mazon-chroot.html.md => amazon-chroot.html.md.erb} | 0 .../{amazon-ebs.html.md => amazon-ebs.html.md.erb} | 8 +++++--- ...rogate.html.md => amazon-ebssurrogate.html.md.erb} | 7 +++++-- ...ebsvolume.html.md => amazon-ebsvolume.html.md.erb} | 3 +++ ...n-instance.html.md => amazon-instance.html.md.erb} | 3 +++ .../builders/_aws-ssh-differentiation-table.html.md | 11 +++++++++++ 6 files changed, 27 insertions(+), 5 deletions(-) rename website/source/docs/builders/{amazon-chroot.html.md => amazon-chroot.html.md.erb} (100%) rename website/source/docs/builders/{amazon-ebs.html.md => amazon-ebs.html.md.erb} (99%) rename website/source/docs/builders/{amazon-ebssurrogate.html.md => amazon-ebssurrogate.html.md.erb} (99%) rename website/source/docs/builders/{amazon-ebsvolume.html.md => amazon-ebsvolume.html.md.erb} (99%) rename website/source/docs/builders/{amazon-instance.html.md => amazon-instance.html.md.erb} (99%) create mode 100644 website/source/partials/builders/_aws-ssh-differentiation-table.html.md diff --git a/website/source/docs/builders/amazon-chroot.html.md b/website/source/docs/builders/amazon-chroot.html.md.erb similarity index 100% rename from website/source/docs/builders/amazon-chroot.html.md rename to website/source/docs/builders/amazon-chroot.html.md.erb diff --git a/website/source/docs/builders/amazon-ebs.html.md b/website/source/docs/builders/amazon-ebs.html.md.erb similarity index 99% rename from website/source/docs/builders/amazon-ebs.html.md rename to website/source/docs/builders/amazon-ebs.html.md.erb index 7736b797f..2c1494f06 100644 --- a/website/source/docs/builders/amazon-ebs.html.md +++ b/website/source/docs/builders/amazon-ebs.html.md.erb @@ -226,11 +226,11 @@ builder. Unlimited - even for instances that would usually qualify for the [AWS Free Tier](https://aws.amazon.com/free/). -- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when - copying a provisioned instance to an AMI. By default, Packer will keep the +- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when + copying a provisioned instance to an AMI. By default, Packer will keep the encryption setting to what it was in the source image. Setting `false` will result in an unencrypted image, and `true` will result in an encrypted one. - + - `force_delete_snapshot` (boolean) - Force Packer to delete snapshots associated with AMIs, which have been deregistered by `force_deregister`. Default `false`. @@ -726,3 +726,5 @@ be easily added to the provisioner section. } ``` + +<%= partial "partials/builders/aws-ssh-differentiation-table" %> diff --git a/website/source/docs/builders/amazon-ebssurrogate.html.md b/website/source/docs/builders/amazon-ebssurrogate.html.md.erb similarity index 99% rename from website/source/docs/builders/amazon-ebssurrogate.html.md rename to website/source/docs/builders/amazon-ebssurrogate.html.md.erb index 093a29523..40d28645a 100644 --- a/website/source/docs/builders/amazon-ebssurrogate.html.md +++ b/website/source/docs/builders/amazon-ebssurrogate.html.md.erb @@ -215,8 +215,8 @@ builder. Unlimited - even for instances that would usually qualify for the [AWS Free Tier](https://aws.amazon.com/free/). -- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when - copying a provisioned instance to an AMI. By default, Packer will keep the +- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when + copying a provisioned instance to an AMI. By default, Packer will keep the encryption setting to what it was in the source image. Setting `false` will result in an unencrypted image, and `true` will result in an encrypted one. @@ -626,3 +626,6 @@ These source AMIs may include volumes that are not flagged to be destroyed on termination of the instance building the new image. In addition to those volumes created by this builder, any volumes inn the source AMI which are not marked for deletion on termination will remain in your account. + + +<%= partial "partials/builders/aws-ssh-differentiation-table" %> \ No newline at end of file diff --git a/website/source/docs/builders/amazon-ebsvolume.html.md b/website/source/docs/builders/amazon-ebsvolume.html.md.erb similarity index 99% rename from website/source/docs/builders/amazon-ebsvolume.html.md rename to website/source/docs/builders/amazon-ebsvolume.html.md.erb index 82138690c..2c643c9ba 100644 --- a/website/source/docs/builders/amazon-ebsvolume.html.md +++ b/website/source/docs/builders/amazon-ebsvolume.html.md.erb @@ -564,3 +564,6 @@ These source AMIs may include volumes that are not flagged to be destroyed on termination of the instance building the new image. In addition to those volumes created by this builder, any volumes inn the source AMI which are not marked for deletion on termination will remain in your account. + + +<%= partial "partials/builders/aws-ssh-differentiation-table" %> \ No newline at end of file diff --git a/website/source/docs/builders/amazon-instance.html.md b/website/source/docs/builders/amazon-instance.html.md.erb similarity index 99% rename from website/source/docs/builders/amazon-instance.html.md rename to website/source/docs/builders/amazon-instance.html.md.erb index 8ace80559..c03390b99 100644 --- a/website/source/docs/builders/amazon-instance.html.md +++ b/website/source/docs/builders/amazon-instance.html.md.erb @@ -705,3 +705,6 @@ this: ``` You may wish to constrain the resource to a specific bucket. + + +<%= partial "partials/builders/aws-ssh-differentiation-table" %> \ No newline at end of file diff --git a/website/source/partials/builders/_aws-ssh-differentiation-table.html.md b/website/source/partials/builders/_aws-ssh-differentiation-table.html.md new file mode 100644 index 000000000..b1ec6fd07 --- /dev/null +++ b/website/source/partials/builders/_aws-ssh-differentiation-table.html.md @@ -0,0 +1,11 @@ +## Which SSH Options to use: + +This chart breaks down Packer does if you set any of the below SSH options: + +| ssh_password | ssh_private_key_file | ssh_keypair_name | temporary_key_pair_name | Packer will... | +| --- | --- | --- | --- | --- | +| X | - | - | - | ssh authenticating with username and given password | +| - | X | - | - | ssh authenticating with private key file | +| - | X | X | - | ssh authenticating with given private key file and "attaching" the keypair to the instance | +| - | - | - | X | Create a temporary ssh keypair with a particular name, clean it up | +| - | - | - | - | Create a temporary ssh keypair with a default name, clean it up | \ No newline at end of file From ee743f0b7c7e596adb61ec6e38f068939c423326 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 23 Apr 2019 15:42:59 +0200 Subject: [PATCH 2/2] Update website/source/partials/builders/_aws-ssh-differentiation-table.html.md --- .../partials/builders/_aws-ssh-differentiation-table.html.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/partials/builders/_aws-ssh-differentiation-table.html.md b/website/source/partials/builders/_aws-ssh-differentiation-table.html.md index b1ec6fd07..e56f7d47f 100644 --- a/website/source/partials/builders/_aws-ssh-differentiation-table.html.md +++ b/website/source/partials/builders/_aws-ssh-differentiation-table.html.md @@ -1,6 +1,6 @@ ## Which SSH Options to use: -This chart breaks down Packer does if you set any of the below SSH options: +This chart breaks down what Packer does if you set any of the below SSH options: | ssh_password | ssh_private_key_file | ssh_keypair_name | temporary_key_pair_name | Packer will... | | --- | --- | --- | --- | --- | @@ -8,4 +8,4 @@ This chart breaks down Packer does if you set any of the below SSH options: | - | X | - | - | ssh authenticating with private key file | | - | X | X | - | ssh authenticating with given private key file and "attaching" the keypair to the instance | | - | - | - | X | Create a temporary ssh keypair with a particular name, clean it up | -| - | - | - | - | Create a temporary ssh keypair with a default name, clean it up | \ No newline at end of file +| - | - | - | - | Create a temporary ssh keypair with a default name, clean it up |