As part of #17, this task is to introduce a convenience nuke subcommand that nukes all running op-up stack components (including cleaning/pruning any docker containers, images, and volumes). Since this is a destructive command, it should use inquire to prompt the user to confirm that they want to perform the given actions (described in detail before the confirmation prompt).
Nuking logic should be entirely handled by the StageManager system orchestrator.
The extent of how to nuke stacks should be managed through cli flags and passed into the StageManager when executing the nuke() call. Since nuking also involves the local stack, the opup cli binary should build the StageManager from the config, and then call nuke() -> eyre::Result<()>. How the nuke cli flags are configured in the StageManager when building from the config or passing them directly in the nuke() call as arguments is an implementation detail, that is up to the implementor.
For example
StageManager::from(config).nuke()?;
Since the cli binary logic is minimal, it should be placed inside the cli.rs file where subcommand dispatching is handled.
Description
As part of #17, this task is to introduce a convenience
nuke
subcommand that nukes all runningop-up
stack components (including cleaning/pruning any docker containers, images, and volumes). Since this is a destructive command, it should useinquire
to prompt the user to confirm that they want to perform the given actions (described in detail before the confirmation prompt).Nuking logic should be entirely handled by the
StageManager
system orchestrator.The extent of how to nuke stacks should be managed through cli flags and passed into the
StageManager
when executing thenuke()
call. Since nuking also involves the local stack, theopup
cli binary should build theStageManager
from the config, and then callnuke() -> eyre::Result<()>
. How the nuke cli flags are configured in theStageManager
when building from theconfig
or passing them directly in thenuke()
call as arguments is an implementation detail, that is up to the implementor.For example
Since the cli binary logic is minimal, it should be placed inside the
cli.rs
file where subcommand dispatching is handled.