Files
harmony/examples/penpot/src/main.rs
Jean-Gabriel Gill-Couture caf6f0c67b Add KVM module for managing virtual machines
- KVM module with connection configuration (local/SSH)
- VM lifecycle management (create/start/stop/destroy/delete)
- Network management (create/delete isolated virtual networks)
- Volume management (create/delete storage volumes)
- Example: OKD HA cluster deployment with OPNsense firewall
- All VMs configured for PXE boot with isolated network

The KVM module uses virsh command-line tools for management and is fully integrated with Harmony's architecture. It provides a clean Rust API for defining VMs, networks, and volumes. The example demonstrates deploying a complete OKD high-availability cluster (3 control planes, 3 workers) plus OPNsense firewall on an isolated network.
2026-03-08 08:06:10 -04:00

42 lines
1.2 KiB
Rust

use std::{collections::HashMap, str::FromStr};
use harmony::{
inventory::Inventory,
modules::helm::chart::{HelmChartScore, HelmRepository, NonBlankString},
topology::K8sAnywhereTopology,
};
use harmony_macros::hurl;
#[tokio::main]
async fn main() {
// let mut chart_values = HashMap::new();
// chart_values.insert(
// NonBlankString::from_str("persistence.assets.enabled").unwrap(),
// "true".into(),
// );
// let penpot_chart = HelmChartScore {
// namespace: Some(NonBlankString::from_str("penpot").unwrap()),
// release_name: NonBlankString::from_str("penpot").unwrap(),
// chart_name: NonBlankString::from_str("penpot/penpot").unwrap(),
// chart_version: None,
// values_overrides: Some(chart_values),
// values_yaml: None,
// create_namespace: true,
// install_only: true,
// repository: Some(HelmRepository::new(
// "penpot".to_string(),
// hurl!("http://helm.penpot.app"),
// true,
// )),
// };
//
// harmony_cli::run(
// Inventory::autoload(),
// K8sAnywhereTopology::from_env(),
// vec![Box::new(penpot_chart)],
// None,
// )
// .await
// .unwrap();
}