anton-rs / op-up

Composable OP Stack Orchestration
https://stack.anton.systems
MIT License
41 stars 2 forks source link

fix(bin): Refactor List Subcommand #62

Open refcell opened 11 months ago

refcell commented 11 months ago

Description

The current opup list subcommand fetches a simple list of docker container information using the op-composer.

This subcommand should be migrated to a more generic opup inspect subcommand that inspects op stack info. It should build a config from the stack.toml present in the executing directory or the global directory and use this config (along with its various component configs) to check if those components are running (docker or otherwise). This could probably be done by checking ports or alternatively, wrapping components with an op-up specific endpoint for querying the status of the component.

Other information like persistent volumes/data dirs could be queried using flags to inspect (e.g. opup inspect --volumes)

inspect could also provide a method of interacting directly with a component or changing its configuration on the fly. For example, opup inspect --mod <component_name>, which would open up a subshell with specific commands into that component. It might be easier to do this as a separate subcommand to the op-up binary though in another ticket like opup edge <component_name>.