Go to file
Jean-Gabriel Gill-Couture dd51dcd302
All checks were successful
Run Check Script / check (push) Successful in 1m48s
Run Check Script / check (pull_request) Successful in 1m46s
docs: Chose README version and move around documentation bits to their relevant places
2025-06-11 15:14:20 -04:00
.cargo upgrade stack size from default 1MB on windows (k3d stack overflow otherwise) 2025-05-11 22:39:23 -04:00
.gitea/workflows feat: Add basic CI configuration 2025-05-28 14:40:19 -04:00
adr chore: Move ADR helper files into folders with their corresponding ADR number 2025-06-09 13:54:23 -04:00
data/watchguard feat: ncd0 example complete. Missing files for authentication, ignition etc are accessible upon deman. This is yet another great step towards full UPI automated provisionning 2025-05-06 11:44:40 -04:00
docs docs: Chose README version and move around documentation bits to their relevant places 2025-06-11 15:14:20 -04:00
examples Merge pull request 'feat: Pass configuration when initializing K8sAnywhereTopology' (#57) from feat/configK8sAnywhere into master 2025-06-10 13:01:50 +00:00
harmony Merge pull request 'feat: Pass configuration when initializing K8sAnywhereTopology' (#57) from feat/configK8sAnywhere into master 2025-06-10 13:01:50 +00:00
harmony_cli docs: Chose README version and move around documentation bits to their relevant places 2025-06-11 15:14:20 -04:00
harmony_macros feat: add ingress score (#32) 2025-05-15 16:11:40 +00:00
harmony_tui feat: TUI does not require Topology to implement Debug anymore 2025-04-23 11:17:03 -04:00
harmony_types feat: add serde derive to Score types 2025-04-05 14:36:08 -04:00
k3d fix(k8s_anywhere): Ensure k3d cluster is started before use 2025-04-25 12:45:02 -04:00
opnsense-config docs: Chose README version and move around documentation bits to their relevant places 2025-06-11 15:14:20 -04:00
opnsense-config-xml fix: Fix opnsense test, Host.tll now optional and run cargo fmt 2025-05-06 12:00:56 -04:00
private_repos/example chore: Fix more warnings 2025-04-24 13:14:35 -04:00
.gitattributes Try out bifrost and see if we want to use it as bare metal provisionner 2024-08-28 16:16:36 -04:00
.gitignore feat: add .gitignore and update file paths 2025-02-12 16:27:56 -05:00
Cargo.lock feat: Add Default implementation for Harmony Id along with documentation. 2025-06-08 21:23:29 -04:00
Cargo.toml feat: push docker image to registry and deploy with full tag 2025-04-30 22:33:31 -04:00
check.sh Our own Helm Command/Resource/Executor (WIP) (#13) 2025-05-20 14:01:10 +00:00
CONTRIBUTING.md docs: Add CONTRIBUTING.md guide 2025-05-29 10:47:38 -04:00
LICENSE chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run 2025-02-12 15:32:59 -05:00
README.md docs: Chose README version and move around documentation bits to their relevant places 2025-06-11 15:14:20 -04:00

Harmony

Build License

Open-source infrastructure orchestration that treats your platform like first-class code.

Harmony unifies project scaffolding, infrastructure provisioning, application deployment, and day-2 operations in one strongly-typed Rust codebase. From a developer laptop to a global production cluster, a single source of truth drives the full software lifecycle.


1 · The Harmony Philosophy

Infrastructure is essential, but it shouldnt be your core business. Harmony is built on three guiding principles that make modern platforms reliable, repeatable, and easy to reason about.

Principle What it means for you
Infrastructure as Resilient Code Replace sprawling YAML and bash scripts with type-safe Rust. Test, refactor, and version your platform just like application code.
Prove It Works — Before You Deploy Harmony uses the compiler to verify that your applications needs match the target environments capabilities at compile-time, eliminating an entire class of runtime outages.
One Unified Model Software and infrastructure are a single system. Harmony models them together, enabling deep automation—from bare-metal servers to Kubernetes workloads—with zero context switching.

These principles surface as simple, ergonomic Rust APIs that let teams focus on their product while trusting the platform underneath.


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.

use harmony::{
    data::Version,
    inventory::Inventory,
    maestro::Maestro,
    modules::{
        lamp::{LAMPConfig, LAMPScore},
        monitoring::monitoring_alerting::MonitoringAlertingStackScore,
    },
    topology::{K8sAnywhereTopology, Url},
};

#[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()
        },
    };

    // 2. Pick where it should run
    let mut maestro = Maestro::<K8sAnywhereTopology>::initialize(
        Inventory::autoload(),                // auto-detect hardware / kube-config
        K8sAnywhereTopology::from_env(),      // local k3d, CI, staging, prod…
    )
    .await
    .unwrap();

    // 3. Enhance with extra scores (monitoring, CI/CD, …)
    let mut monitoring = MonitoringAlertingStackScore::new();
    monitoring.namespace = Some(lamp_stack.config.namespace.clone());

    maestro.register_all(vec![Box::new(lamp_stack), Box::new(monitoring)]);

    // 4. Launch an interactive CLI / TUI
    harmony_cli::init(maestro, None).await.unwrap();
}

Run it:

cargo run

Harmony analyses the code, shows an execution plan in a TUI, and applies it once you confirm. Same code, same binary—every environment.


3 · Core Concepts

Term One-liner
Score Declarative description of the desired state (e.g., LAMPScore).
Interpret Imperative logic that realises a Score on a specific environment.
Topology An environment (local k3d, AWS, bare-metal) exposing verified Capabilities (Kubernetes, DNS, …).
Maestro Orchestrator that compiles Scores + Topology, ensuring all capabilities line up at compile-time.
Inventory Optional catalogue of physical assets for bare-metal and edge deployments.

A visual overview is in the diagram below.

Harmony Core Architecture


4 · Install

Prerequisites:

  • Rust
  • Docker (if you deploy locally)
  • kubectl / helm for Kubernetes-based topologies
git clone https://git.nationtech.io/nationtech/harmony
cd harmony
cargo build --release          # builds the CLI, TUI and libraries

5 · Learning More


6 · License

Harmony is released under the GNU AGPL v3.

We choose a strong copyleft license to ensure the project—and every improvement to it—remains open and benefits the entire community. Fork it, enhance it, even out-innovate us; just keep it open.

See LICENSE for the full text.


Made with ❤️ & 🦀 by the NationTech and the Harmony community