fix(cli): simplify running the CLI by hiding the maestro init inside the implemtation
All checks were successful
Run Check Script / check (pull_request) Successful in -31s

This commit is contained in:
Ian Letourneau
2025-07-31 15:37:06 -04:00
parent 06aab1f57f
commit 4ac74bc862
9 changed files with 67 additions and 62 deletions

View File

@@ -1,7 +1,6 @@
use harmony::{
data::Version,
inventory::Inventory,
maestro::Maestro,
modules::lamp::{LAMPConfig, LAMPScore},
topology::{K8sAnywhereTopology, Url},
};
@@ -43,15 +42,13 @@ async fn main() {
// K8sAnywhereTopology as it is the most automatic one that enables you to easily deploy
// locally, to development environment from a CI, to staging, and to production with settings
// that automatically adapt to each environment grade.
let mut maestro = Maestro::<K8sAnywhereTopology>::initialize(
Inventory::autoload(),
harmony_cli::run(
K8sAnywhereTopology::from_env(),
Inventory::autoload(),
vec![Box::new(lamp_stack)],
None,
)
.await
.unwrap();
maestro.register_all(vec![Box::new(lamp_stack)]);
// Here we bootstrap the CLI, this gives some nice features if you need them
harmony_cli::init(maestro, None).await.unwrap();
}
// That's it, end of the infra as code.