Support for dedicated hosts
thheinen opened this issue ยท 2 comments
๐ Problem Statement
Some organizations, licenses, or AMIs require the use of dedicated hosts, e.g. MSDN licenses.
Currently, the kitchen-ec2 driver does not include any functionality to allocate/deallocate hosts. You can use the tenancy: host
setting, but that relies on pre-deployed dedicated hosts.
โ Possible Solution
Add this functionality to the kitchen driver, allocating a host for the specified instance_type
and deallocating it after it is empty. As dedicated hosts are billed by the second, this is no different than billing for on-demand instances.
In some situations, a dedicated host might be pre-allocated (organization-provided) or need a specific time until being de-allocated (24 hours) - so both features should be made optional. That could be an additional config option or a corresponding environment variable.
โคด๏ธ Describe alternatives you've considered
- manually managing DHs, which is error-prone and often leads to forgetting de-allocation and paying unnecessary money
- using License Manager Managed Host Groups, but these fail for host types which have a 24 hour minimum. Those do not have a "terminate after 24 hours idle" setting or any other delay
โ Additional context
This feature is a prerequisite for adding support for Mac instances as well.
Full disclosure: I have an implementation for this basically done (need some cleanup).
Released in v3.14.0