diff --git a/README.md b/README.md index e77718e..4ccdae7 100644 --- a/README.md +++ b/README.md @@ -36,48 +36,59 @@ These principles surface as simple, ergonomic Rust APIs that let teams focus on ## 2 · Quick Start -The snippet below spins up a complete **production-grade LAMP stack** with monitoring. Swap it for your own scores to deploy anything from microservices to machine-learning pipelines. +The snippet below spins up a complete **production-grade Rust + Leptos Webapp** with monitoring. Swap it for your own scores to deploy anything from microservices to machine-learning pipelines. ```rust use harmony::{ - data::Version, inventory::Inventory, - maestro::Maestro, modules::{ - lamp::{LAMPConfig, LAMPScore}, - monitoring::monitoring_alerting::MonitoringAlertingStackScore, + application::{ + ApplicationScore, RustWebFramework, RustWebapp, + features::{PackagingDeployment, rhob_monitoring::Monitoring}, + }, + monitoring::alert_channel::discord_alert_channel::DiscordWebhook, }, - topology::{K8sAnywhereTopology, Url}, + topology::K8sAnywhereTopology, }; +use harmony_macros::hurl; +use std::{path::PathBuf, sync::Arc}; #[tokio::main] async fn main() { - // 1. Describe what you want - let lamp_stack = LAMPScore { - name: "harmony-lamp-demo".into(), - domain: Url::Url(url::Url::parse("https://lampdemo.example.com").unwrap()), - php_version: Version::from("8.3.0").unwrap(), - config: LAMPConfig { - project_root: "./php".into(), - database_size: "4Gi".into(), - ..Default::default() - }, + let application = Arc::new(RustWebapp { + name: "harmony-example-leptos".to_string(), + project_root: PathBuf::from(".."), // <== Your project root, usually .. if you use the standard `/harmony` folder + framework: Some(RustWebFramework::Leptos), + service_port: 8080, + }); + + // Define your Application deployment and the features you want + let app = ApplicationScore { + features: vec![ + Box::new(PackagingDeployment { + application: application.clone(), + }), + Box::new(Monitoring { + application: application.clone(), + alert_receiver: vec![ + Box::new(DiscordWebhook { + name: "test-discord".to_string(), + url: hurl!("https://discord.doesnt.exist.com"), // <== Get your discord webhook url + }), + ], + }), + ], + application, }; - // 2. Enhance with extra scores (monitoring, CI/CD, …) - let mut monitoring = MonitoringAlertingStackScore::new(); - monitoring.namespace = Some(lamp_stack.config.namespace.clone()); - - // 3. Run your scores on the desired topology & inventory harmony_cli::run( - Inventory::autoload(), // auto-detect hardware / kube-config - K8sAnywhereTopology::from_env(), // local k3d, CI, staging, prod… - vec![ - Box::new(lamp_stack), - Box::new(monitoring) - ], - None - ).await.unwrap(); + Inventory::autoload(), + K8sAnywhereTopology::from_env(), // <== Deploy to local automatically provisioned local k3d by default or connect to any kubernetes cluster + vec![Box::new(app)], + None, + ) + .await + .unwrap(); } ``` diff --git a/demos/cncf-k8s-quebec-meetup-september-2025/qrcode_gitea_nationtech.png b/demos/cncf-k8s-quebec-meetup-september-2025/qrcode_gitea_nationtech.png new file mode 100644 index 0000000..4ad8de5 Binary files /dev/null and b/demos/cncf-k8s-quebec-meetup-september-2025/qrcode_gitea_nationtech.png differ diff --git a/demos/cncf-k8s-quebec-meetup-september-2025/slides.html b/demos/cncf-k8s-quebec-meetup-september-2025/slides.html index 5932e1d..1636148 100644 --- a/demos/cncf-k8s-quebec-meetup-september-2025/slides.html +++ b/demos/cncf-k8s-quebec-meetup-september-2025/slides.html @@ -1,4 +1,4 @@ -