feat: harmony now defaults to using local k3d cluster. Also created OCICompliant: Application trait to make building images cleaner
Some checks failed
Run Check Script / check (pull_request) Failing after -33s
Some checks failed
Run Check Script / check (pull_request) Failing after -33s
This commit is contained in:
@@ -1,20 +1,27 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use harmony::{
|
||||
inventory::Inventory,
|
||||
maestro::Maestro,
|
||||
modules::application::{RustWebappScore, features::ContinuousDelivery},
|
||||
modules::application::{RustWebapp, RustWebappScore, features::ContinuousDelivery},
|
||||
topology::{K8sAnywhereTopology, Url},
|
||||
};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
env_logger::init();
|
||||
let application = RustWebapp {
|
||||
name: "Example Harmony Rust Webapp".to_string(),
|
||||
};
|
||||
let app = RustWebappScore {
|
||||
name: "Example Rust Webapp".to_string(),
|
||||
domain: Url::Url(url::Url::parse("https://rustapp.harmony.example.com").unwrap()),
|
||||
features: vec![Box::new(ContinuousDelivery {})],
|
||||
features: vec![Box::new(ContinuousDelivery { application: Arc::new(application.clone()) })],
|
||||
application,
|
||||
};
|
||||
|
||||
let topology = K8sAnywhereTopology::from_env();
|
||||
let mut maestro = Maestro::new(Inventory::autoload(), topology);
|
||||
let mut maestro = Maestro::initialize(Inventory::autoload(), topology).await.unwrap();
|
||||
maestro.register_all(vec![Box::new(app)]);
|
||||
harmony_cli::init(maestro, None).await.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user