aws unwrap spot cfg

This commit is contained in:
Adrien Delorme 2019-05-29 16:39:40 +02:00
parent 6660d40f56
commit ffa0431d56
3 changed files with 105 additions and 3 deletions

View File

@ -353,7 +353,32 @@ builder.
criteria provided in `source_ami_filter`; this pins the AMI returned by the criteria provided in `source_ami_filter`; this pins the AMI returned by the
filter, but will cause Packer to fail if the `source_ami` does not exist. filter, but will cause Packer to fail if the `source_ami` does not exist.
<%= partial "partials/builders/aws-spot-docs" %> - `spot_instance_types` (array of strings) - a list of acceptable instance
types to run your build on. We will request a spot instance using the max
price of `spot_price` and the allocation strategy of "lowest price".
Your instance will be launched on an instance type of the lowest available
price that you have in your list. This is used in place of instance_type.
You may only set either spot_instance_types or instance_type, not both.
This feature exists to help prevent situations where a Packer build fails
because a particular availability zone does not have capacity for the
specific instance_type requested in instance_type.
- `spot_price` (string) - The maximum hourly price to pay for a spot instance
to create the AMI. Spot instances are a type of instance that EC2 starts
when the current spot price is less than the maximum price you specify.
Spot price will be updated based on available spot instance capacity and
current spot instance requests. It may save you some costs. You can set
this to `auto` for Packer to automatically discover the best spot price or
to "0" to use an on demand instance (default).
- `spot_price_auto_product` (string) - Required if `spot_price` is set to
`auto`. This tells Packer what sort of AMI you're launching to find the
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`,
`Windows`, `Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`,
`Windows (Amazon VPC)`
- `spot_tags` (object of key/value strings) - Requires `spot_price` to be
set. This tells Packer to apply tags to the spot request that is issued.
- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but - `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but
not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute`

View File

@ -59,6 +59,33 @@ builder.
### Optional: ### Optional:
- `spot_instance_types` (array of strings) - a list of acceptable instance
types to run your build on. We will request a spot instance using the max
price of `spot_price` and the allocation strategy of "lowest price".
Your instance will be launched on an instance type of the lowest available
price that you have in your list. This is used in place of instance_type.
You may only set either spot_instance_types or instance_type, not both.
This feature exists to help prevent situations where a Packer build fails
because a particular availability zone does not have capacity for the
specific instance_type requested in instance_type.
- `spot_price` (string) - The maximum hourly price to pay for a spot instance
to create the AMI. Spot instances are a type of instance that EC2 starts
when the current spot price is less than the maximum price you specify.
Spot price will be updated based on available spot instance capacity and
current spot instance requests. It may save you some costs. You can set
this to `auto` for Packer to automatically discover the best spot price or
to "0" to use an on demand instance (default).
- `spot_price_auto_product` (string) - Required if `spot_price` is set to
`auto`. This tells Packer what sort of AMI you're launching to find the
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`,
`Windows`, `Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`,
`Windows (Amazon VPC)`
- `spot_tags` (object of key/value strings) - Requires `spot_price` to be
set. This tells Packer to apply tags to the spot request that is issued.
- `ebs_volumes` (array of block device mappings) - Add the block device - `ebs_volumes` (array of block device mappings) - Add the block device
mappings to the AMI. The block device mappings allow for keys: mappings to the AMI. The block device mappings allow for keys:
@ -302,7 +329,32 @@ builder.
criteria provided in `source_ami_filter`; this pins the AMI returned by the criteria provided in `source_ami_filter`; this pins the AMI returned by the
filter, but will cause Packer to fail if the `source_ami` does not exist. filter, but will cause Packer to fail if the `source_ami` does not exist.
<%= partial "partials/builders/aws-spot-docs" %> - `spot_instance_types` (array of strings) - a list of acceptable instance
types to run your build on. We will request a spot instance using the max
price of `spot_price` and the allocation strategy of "lowest price".
Your instance will be launched on an instance type of the lowest available
price that you have in your list. This is used in place of instance_type.
You may only set either spot_instance_types or instance_type, not both.
This feature exists to help prevent situations where a Packer build fails
because a particular availability zone does not have capacity for the
specific instance_type requested in instance_type.
- `spot_price` (string) - The maximum hourly price to pay for a spot instance
to create the AMI. Spot instances are a type of instance that EC2 starts
when the current spot price is less than the maximum price you specify.
Spot price will be updated based on available spot instance capacity and
current spot instance requests. It may save you some costs. You can set
this to `auto` for Packer to automatically discover the best spot price or
to "0" to use an on demand instance (default).
- `spot_price_auto_product` (string) - Required if `spot_price` is set to
`auto`. This tells Packer what sort of AMI you're launching to find the
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`,
`Windows`, `Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`,
`Windows (Amazon VPC)`
- `spot_tags` (object of key/value strings) - Requires `spot_price` to be
set. This tells Packer to apply tags to the spot request that is issued.
- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but - `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but
not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute`

View File

@ -343,7 +343,32 @@ builder.
- `snapshot_tags` (object of key/value strings) - Tags to apply to snapshot. - `snapshot_tags` (object of key/value strings) - Tags to apply to snapshot.
They will override AMI tags if already applied to snapshot. They will override AMI tags if already applied to snapshot.
<%= partial "partials/builders/aws-spot-docs" %> - `spot_instance_types` (array of strings) - a list of acceptable instance
types to run your build on. We will request a spot instance using the max
price of `spot_price` and the allocation strategy of "lowest price".
Your instance will be launched on an instance type of the lowest available
price that you have in your list. This is used in place of instance_type.
You may only set either spot_instance_types or instance_type, not both.
This feature exists to help prevent situations where a Packer build fails
because a particular availability zone does not have capacity for the
specific instance_type requested in instance_type.
- `spot_price` (string) - The maximum hourly price to pay for a spot instance
to create the AMI. Spot instances are a type of instance that EC2 starts
when the current spot price is less than the maximum price you specify.
Spot price will be updated based on available spot instance capacity and
current spot instance requests. It may save you some costs. You can set
this to `auto` for Packer to automatically discover the best spot price or
to "0" to use an on demand instance (default).
- `spot_price_auto_product` (string) - Required if `spot_price` is set to
`auto`. This tells Packer what sort of AMI you're launching to find the
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`,
`Windows`, `Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`,
`Windows (Amazon VPC)`
- `spot_tags` (object of key/value strings) - Requires `spot_price` to be
set. This tells Packer to apply tags to the spot request that is issued.
- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but - `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but
not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` not ENA) on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute`