Add warm pool with new ASG lifecycle hooks#966
Closed
keithduncan wants to merge 22 commits intokeithduncan/add-asg-lifecyclefrom
Closed
Add warm pool with new ASG lifecycle hooks#966keithduncan wants to merge 22 commits intokeithduncan/add-asg-lifecyclefrom
keithduncan wants to merge 22 commits intokeithduncan/add-asg-lifecyclefrom
Conversation
…dd-asg-lifecycle-warm-pool
…stanceInAutoScalingGroup
…nce policy. Add a warm pool rule assertion that if enabled, a single instance is used and spot is not used
42c4ed6 to
d898596
Compare
1f26405 to
2d63aa1
Compare
…ompleteLifecycleAction
…end on the hooks and the automations)
Contributor
Author
… directly into the ASG
|
Is there any progress on this? This feature would be extremely valuable. We currently have a very long running startup script (~30mins) and currently do not have a good strategy for mitigating this boot-up time, except for setting a large ScaleOutFactor and a large ScaleInIdlePeriod, which is also relatively expensive. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Builds on the lifecycle hooks added in #964 and incorporates the warm pool configuration from #838.
Makes the boothook lifecycle hook conditional on the use of warm pool so that instances once again always start the agent on instance boot, unless warm pool is enabled. When warm pool is enabled, we delay agent start until the boothook triggered by the instance moving to InService.
This also changes how we parse the
InstanceTypeparameter and adds anInstanceTypescount parameter. Warm pool is incompatible withMixedInstanceTypesso we need to be able to switch the Auto Scaling group resource between a staticLaunchTemplatereference and aMixedInstanceTypesspecification. Warm pool only supports single instance type, and on-demand instance types, using either precludes the use of an ASG warm pool. Adding the count parameter is copied from the AWS VPC Quick Start which uses a similar pattern.TODO
Ruleadded to prevent incompatible options across spot, multiple instance types, and warm poolwaitcommand for Windows instances that theBootHookWarmedAutomationcan use to wait for ec2config, or decide that Windows instances don’t get Warm Pool support and block it using a CloudFormation templateRule😢InstanceStoragesetting interoperates with 'stopped' EC2 instances. Since the warm pool instances are stopped and re-started, they will come up on new hardware without initialised NVMe drives. If this is irreconcilable these might be incompatible options which should be disabled using a templateRulesentry.BootHookHeartbeatTimeoutproperty. This is statically 5 and 10 minutes for Linux and Windows respectively right now. Presently the same launch hook is used for both Warm Pool launch events, direct to ASG launch events, and Warm Pool to ASG launch events, meaning they all have the same timeout applied. We likely want to apply distinct timeouts to each type of lifecycle movement. Launched into the warm pool the timeout should be enough for the UserData script to run to completion, launched directly into the ASG the timeout should be enough for the UserData script and the agent to start, and transitioned from the Warm Pool into the ASG should just be enough to start the agent.