chef-boneyard / chef-provisioning-aws

AWS driver and resources for Chef that uses the AWS SDK
Apache License 2.0
142 stars 121 forks source link

Create multiple instances using one call when using machine_batch (#306) #510

Open bpoweski opened 8 years ago

bpoweski commented 8 years ago

Prior to this change each EC2 instance was created by making a separate #create_instances call. This approach is preferred when utilizing placement groups per Amazon's recommendations below:

First, you create a placement group and then you launch multiple instances into the placement group. We recommend that you launch the number of instances that you need in the placement group in a single launch request and that you use the same instance type for all instances in the placement group. If you try to add more instances to the placement group later, or if you try to launch more than one instance type in the placement group, you increase your chances of getting an insufficient capacity error.

I attempted to run the integration tests with a live EC2 accounts before making these changes, unfortunately many of them failed sporadically due to what appears to race conditions around the duration of provisioning.

Related #17

bpoweski commented 7 years ago

Any plans on merging?