feat(fwdctl/launch): add scenario-driven deploy, list/kill instance management, and dry-run planning (3/4)#1664
feat(fwdctl/launch): add scenario-driven deploy, list/kill instance management, and dry-run planning (3/4)#1664
Conversation
rkuris
left a comment
There was a problem hiding this comment.
This is a really big PR that will require another pass.
| libevm_repo: "https://github.com/ava-labs/libevm.git" | ||
| s3_bucket: "avalanchego-bootstrap-testing" | ||
|
|
||
| stages: |
There was a problem hiding this comment.
This is difficult or impossible to review since I can't compare the original script to what you've got here without doing a lot of work. Suggestions welcome.
There was a problem hiding this comment.
I'd suggest doing a dry-run with cloud-init dump so you could inspect the resulting cloud init manually. It'll be a little bit hard still because of progress tracking commands, but you could remove them and then do the comparison.
To do this:
AWS_PROFILE=<your-profile> cargo run --bin fwdctl --features launch -- launch deploy --dry-run=plan-with-cloud-initYou can check this diff to that I generated:
https://www.diffchecker.com/GglAZd0v/
Note: The branch args are not present because I ran the default configuration.
There was a problem hiding this comment.
It's pretty easy to verify with the diff that the original commands are mostly untouched. The rust install changed because one of the original commands had non-successful exit code, couldn't write to the specified directory.
Why this should be merged
This PR upgrades
fwdctl launchfrom deploy/monitor-only into a full lifecycle management tool. It adds planning (--dry-run), managed instance operations (list,kill), and scenario-based launches.How this works
The launch CLI now supports:
fwdctl launch listto showManagedBy=fwdctlinstances (with--running/--mine)fwdctl launch killto terminate a specific instance, your instances, or all managed instancesfwdctl launch deploy --scenario <name>to pick a scenario frombenchmark/launch/launch-stages.yamlfwdctl launch deploy --dry-run [plan|plan-with-cloud-init]to preview actions without creating resourcesfwdctl launch deploy --follow [follow|follow-with-progress]for log/progress streaming modesHow this was tested
Some UT. mostly manually launching and ensuring all the cases work fine.
Design Notes
list/killare intentionally scoped toManagedBy=fwdctlresources to avoid accidental operations on unrelated instances.plan-with-cloud-initwas added so generated cloud-init can be inspected/reviewed before launch.