Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lifecycled without SNS/SQS #135

Merged
merged 8 commits into from Sep 6, 2016
Merged

Conversation

sj26
Copy link
Member

@sj26 sj26 commented Sep 1, 2016

We've had some trouble with SQS lifecycle handling, so we can try something a little less sophisticated and POLL FOR GREAT JUSTICE. Maybe. Haha.

It definitely works:

screenshot 2016-09-01 18 09 23

@@ -442,22 +466,28 @@ Resources:
06-run-bootstrap-script:
test: test -n "$(BootstrapScriptUrl)"
command: |
#!/bin/bash -euo pipefail
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This option caused an error for me)

@toolmantim
Copy link
Contributor

Fixes #130

@toolmantim
Copy link
Contributor

Stack JSON URL: https://s3.amazonaws.com/buildkite-aws-stack/lifecycled-the-second/aws-stack.json

@lox
Copy link
Contributor

lox commented Sep 1, 2016

:(

@toolmantim
Copy link
Contributor

Sorry @lox! Turns out you can do a CONTINUE without a lifecycle action token, and just the instance id. The docs/guide/examples don't make that obvious at all.

Which means you can just poll your own state to see the state change.

@@ -428,7 +428,7 @@ Resources:
--query AutoScalingInstances[].LifecycleState --output text)"
logger -t lifecycled "Lifecycle state for \$INSTANCE_ID: \$LIFECYCLE_STATE"
if [[ "\$LIFECYCLE_STATE" == "Terminating:Wait" ]]; then
logger -t lifecycled "Time to shut it all down!"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, this would have broken. Woops!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, it did work in the example. Perhaps it's too enthusiastic, though.

@toolmantim
Copy link
Contributor

Rolling updates work AOK, scaling up and down works AOK. I think this is good to 🚀

@toolmantim
Copy link
Contributor

This seems to be working well 👍

@toolmantim toolmantim merged commit 0b8847d into master Sep 6, 2016
@toolmantim toolmantim deleted the lifecycled-the-second branch September 6, 2016 06:30
chloeruka added a commit that referenced this pull request Apr 27, 2021
These appear to be vestigial since we no longer use SNS/SQS queue for agent lifecycle operations when we removed that for LifecycleD in #135.
@chloeruka chloeruka mentioned this pull request May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants