- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Is there a way to delay registration until the build/deployment has completed? Alternately, is there a way to avoid starting Tomcat until the build/deployment has completed?
Hello,
You'll want to delay the instances in ASG-A from being registered to the NLB until the application is done being installed. You can do this by adding a Lifecycle Hook (LCH) to the ASG. The last step if your CHEF cookbook should be to complete the lifecycle action with the CONTINUE action so AutoScaling registers the instance to the NLB's target group and moves the instance to InService.
Also, since you mentioned it takes ~10 minutes, you may want to look into using a Warm Pool on the ASG if their isn't frequent changes to the application/data to be loaded on the instance. A warm pool lets you pre-launch instances into an ASG, configure them (via a LCH), and then they're stopped. When the desired capacity goes up, the pre-configured instances in the warm pool will be started, saving you lots of time. Keep in mind that the launching LCH will run again when the instance is being moved to InService, so you'll either need to run the UserData again to apply any new updates + complete the hook, or trigger another process (like a lambda function) to complete the LCH, otherwise the instance will sit there in Pending:Wait and you'll lose all the time savings
Thanks. It helps. I'll be trying warm pool as well. The chef client runs automatically every 2 hrs to pull the latest changes from user-data, will what approach I need to take for completing the LCH.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 9 Monaten
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
Yes, I'll give it a try but the issue is we use some cookbooks which are managed centrally by the chef engg. team however, as I said let me try this approach if that works. Thanks.