feat: enhances deploy/validation scripts, adds manual removal script [#73]#74
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
This PR turns the manual-removal work into a real cutover toolkit for moving the AWS deployment from the old hand-built environment to the new CDK-owned stack.
The final scope ended up being broader than just adding a teardown script. During the live cutover we found and fixed several real issues in the rebuild path: hidden console-created CloudFormation stacks that still owned ECS resource names, CDK bootstrap missing in the target account, reuse of the existing GitHub OIDC provider, slow/recursive Docker asset packaging, and ECS service creation racing ahead of ALB listener attachment.
What changed
infra/manual-removal/toolkit:remove_manual_stack.shvalidate_stack_is_up.shvalidate_manual_stack_teardown_completed.shvalidate_cdk_predeploy.shcommon_manual_stack_vars.shcommon_manual_stack_helpers.shmanual-stack-teardown.mdinfra/.envcdk synthCDK_GITHUB_OIDC_PROVIDER_ARN.infra/.venv,node_modules, and report output into the asset build.Live cutover work completed
The rebuilt stack was actually brought up during this work:
CourseEnrollmentAppStacksuccessfullyValidation performed
bash infra/manual-removal/remove_manual_stack.sh --yesbash infra/manual-removal/validate_manual_stack_teardown_completed.shbash infra/manual-removal/validate_cdk_predeploy.shcd infra && cdk bootstrap aws://334348504030/us-east-1 --require-approval nevercd infra && cdk deploy CourseEnrollmentAppStack --output /tmp/course-enrollment-app-cdk-out-deploy --require-approval neverbash infra/manual-removal/validate_stack_is_up.shcurl -I http://course-enrollment-app-alb-1547360316.us-east-1.elb.amazonaws.com/indexcurl -k -I https://course-enrollment-app-alb-1547360316.us-east-1.elb.amazonaws.com/indexFollow-up
course-enrollment-app.robertlech.comat the new ALB DNS namecourse-enrollment-app-alb-1547360316.us-east-1.elb.amazonaws.com.