diff --git a/.infrahub.yml b/.infrahub.yml new file mode 100644 index 0000000..38dd224 --- /dev/null +++ b/.infrahub.yml @@ -0,0 +1,3 @@ +--- +schemas: + - schemas \ No newline at end of file diff --git a/README.md b/README.md index ba59d4a..2015aa5 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,14 @@ Think `terraform plan` and `terraform apply`, but for your network fabric — po We chose [InfraHub](https://github.com/opsmill/infrahub) over NetBox as Source of Truth for several reasons: -| Feature | NetBox | InfraHub | -|---------|--------|----------| -| **Schema** | Fixed DCIM/IPAM model | Fully customizable YAML schema | -| **Git Integration** | External sync needed | Native - branches = data branches | -| **Versioning** | Changelog only | True Git-like versioning with merges | -| **Test/Redeploy** | Dump/restore | `git clone` = complete environment | -| **Transforms** | Limited | Built-in Jinja2 + Python transforms | -| **GraphQL** | Yes | Yes (auto-generated from schema) | +| Feature | NetBox | InfraHub | +| ------------------- | --------------------- | ------------------------------------ | +| **Schema** | Fixed DCIM/IPAM model | Fully customizable YAML schema | +| **Git Integration** | External sync needed | Native - branches = data branches | +| **Versioning** | Changelog only | True Git-like versioning with merges | +| **Test/Redeploy** | Dump/restore | `git clone` = complete environment | +| **Transforms** | Limited | Built-in Jinja2 + Python transforms | +| **GraphQL** | Yes | Yes (auto-generated from schema) | **Key benefits for this project:** @@ -98,16 +98,16 @@ git push ## 🎛 Why Prefect? -| Feature | Benefit | -|---------|---------| -| **Python-native workflows** | Use `@flow` and `@task` decorators — no YAML, just Python | -| **Free secrets management** | Native `Secret` blocks for credentials (free in OSS) | -| **Built-in UI** | Dashboard, logs, metrics, execution history via `prefect server start` | -| **No containerization required** | Run flows directly with `.serve()` — no Docker needed | -| **Event-driven triggers** | Schedule, webhooks (via FastAPI), flow triggers out of the box | -| **Task dependencies** | Automatic dependency ordering via task result passing or `wait_for` | -| **Retry & error handling** | Built-in retry policies with `@task(retries=3)` | -| **Human-in-the-loop** | Native `pause_flow_run()` for approval workflows | +| Feature | Benefit | +| -------------------------------- | ---------------------------------------------------------------------- | +| **Python-native workflows** | Use `@flow` and `@task` decorators — no YAML, just Python | +| **Free secrets management** | Native `Secret` blocks for credentials (free in OSS) | +| **Built-in UI** | Dashboard, logs, metrics, execution history via `prefect server start` | +| **No containerization required** | Run flows directly with `.serve()` — no Docker needed | +| **Event-driven triggers** | Schedule, webhooks (via FastAPI), flow triggers out of the box | +| **Task dependencies** | Automatic dependency ordering via task result passing or `wait_for` | +| **Retry & error handling** | Built-in retry policies with `@task(retries=3)` | +| **Human-in-the-loop** | Native `pause_flow_run()` for approval workflows | ## 🎯 Target Fabric @@ -124,12 +124,12 @@ Reference: [arista-evpn-vxlan-clab](https://gitea.arnodo.fr/Damien/arista-evpn-v Progress is tracked via issues. See [all issues](https://gitea.arnodo.fr/Damien/fabric-orchestrator/issues) or filter by phase: -| Phase | Description | Status | -|-------|-------------|--------| -| **Phase 1** | YANG Path Discovery - Map EOS 4.35.0F YANG models, validate gNMI | ✅ Complete | +| Phase | Description | Status | +| ----------- | -------------------------------------------------------------------- | ------------- | +| **Phase 1** | YANG Path Discovery - Map EOS 4.35.0F YANG models, validate gNMI | ✅ Complete | | **Phase 2** | InfraHub Setup & Core Reconciler - Schema, diff engine, YANG mappers | 🔄 In Progress | -| **Phase 3** | Full Fabric Coverage - BGP, MLAG, VRFs mappers | 📋 Planned | -| **Phase 4** | Prefect Integration - Flows, webhooks, drift detection | 📋 Planned | +| **Phase 3** | Full Fabric Coverage - BGP, MLAG, VRFs mappers | 📋 Planned | +| **Phase 4** | Prefect Integration - Flows, webhooks, drift detection | 📋 Planned | ## 📁 Project Structure @@ -197,17 +197,17 @@ fabric-orchestrator/ ## 🛠️ Technology Stack -| Component | Technology | Purpose | -|-----------|------------|---------| -| Source of Truth | **InfraHub** | Intent definition via custom schema | -| Data Storage | **This Git repo** | Schema + data versioned together | -| Orchestrator | **Prefect** | Python-native workflow orchestration | -| Transport | gNMI | Configuration and telemetry | -| Data Models | YANG (OpenConfig + Arista) | Structured configuration | -| Python Library | pygnmi + infrahub-sdk | gNMI/InfraHub interactions | -| CLI | Click + Rich | YANG discovery tools | -| Validation | Pydantic v2 | Intent data validation | -| Lab | ContainerLab + cEOS | Development environment | +| Component | Technology | Purpose | +| --------------- | -------------------------- | ------------------------------------ | +| Source of Truth | **InfraHub** | Intent definition via custom schema | +| Data Storage | **This Git repo** | Schema + data versioned together | +| Orchestrator | **Prefect** | Python-native workflow orchestration | +| Transport | gNMI | Configuration and telemetry | +| Data Models | YANG (OpenConfig + Arista) | Structured configuration | +| Python Library | pygnmi + infrahub-sdk | gNMI/InfraHub interactions | +| CLI | Click + Rich | YANG discovery tools | +| Validation | Pydantic v2 | Intent data validation | +| Lab | ContainerLab + cEOS | Development environment | ## 🔗 Related Projects