---
格式版本: 2
标题: "GitHub - opsmill/infrahub-solution-ai-dc · GitHub"
原文链接: "https://github.com/opsmill/infrahub-solution-ai-dc"
发布日期: "未标注"
发现时间: "2026-06-02T08:30:16+08:00"
入库时间: "2026-06-22T07:54:38.876Z"
来源平台: "博查 AI Search"
搜索渠道: "bocha_ai_search"
搜索词: "AI Rack"
匹配关键词:
  - "AI Rack"
相关厂家:
  []
相关专家:
  []
内容类型: "网页"
抓取工具: "XCrawl Scrape"
清洗工具: "XCrawl Markdown + LLM 正文裁剪"
原始附件:
  []
AI优质: "否"
AI打分: 18
AI分档: "非优质"
AI质检状态: "不通过"
AI打分理由: "资料为GitHub上的Infrahub网络自动化参考实现，主要讨论数据中心网络拓扑生成，未涉及超节点/AI Rack/GPU/互连/供电/液冷等核心主题，也无商业或部署信号，与项目关注范围无关。"
AI质检模型: "deepseek-v4-flash"
AI质检时间: "2026-07-30T01:33:16+08:00"
AI主题相关性: 5
AI来源权威性: 3
AI新颖性: 2
AI技术细节: 3
AI商业部署信号: 0
AI完整性: 5
采集批次: "2026年6月22日15点05分26秒"
采集批次ID: "20260622-150526-048"
去重键: "https://github.com/opsmill/infrahub-solution-ai-dc"
---

[![Infrahub Logo](https://camo.githubusercontent.com/759fd3171b9233a2e45fa7f05a1240795e2b0f34f7adaff7d37c564b8f5cceea/68747470733a2f2f6173736574732d676c6f62616c2e776562736974652d66696c65732e636f6d2f3635376166663461323664643861666261623234393434622f3635376230653036373866376664333563653133303737365f4c6f676f253230494e4652414855422e737667)](https://camo.githubusercontent.com/759fd3171b9233a2e45fa7f05a1240795e2b0f34f7adaff7d37c564b8f5cceea/68747470733a2f2f6173736574732d676c6f62616c2e776562736974652d66696c65732e636f6d2f3635376166663461323664643861666261623234393434622f3635376230653036373866376664333563653133303737365f4c6f676f253230494e4652414855422e737667)

[![LinkedIn badge](https://camo.githubusercontent.com/a16b10b7e5d437507041be9dd6a8528770ed262952213bb8fff931b25adc56e8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b6564696e2d626c75653f6c6f676f3d4c696e6b6564496e)](https://www.linkedin.com/company/opsmill)

## AI/DC Solution

The AI/DC Solution is a reference implementation showing how to use [Infrahub](https://github.com/opsmill/infrahub) to automate the build and ongoing operation of large-scale AI data center fabrics. It is fully functional and positioned as a demo and reference implementation — the patterns it demonstrates are already in production use by Infrahub customers.

---

## What you can do with it

- **Build a complete data center fabric from minimal inputs** — define a spine count, pod count, and rack layout; Infrahub generates all devices, IP allocations, and a cabling plan
- **Extend infrastructure without rebuilding it** — add a rack or pod and only the affected layer re-runs; the rest of the fabric is unchanged
- **Run parallel builds at scale** — trigger once at the fabric level; all pods and racks generate automatically and simultaneously
- **Track what was built and why** — design intent and implementation are stored together in Infrahub, linked explicitly, so day-two changes are surgical rather than full rebuilds
- **Study and adapt the Generator patterns** — modular Generators with checksum-triggered signaling, prerequisite validation, IP space delegation, and idempotent upserts, all documented and adaptable to other infrastructure domains

---

## Who this is for

**Evaluator / Learner:** You want to see design-driven automation in action. Clone the repo, run the demo, and watch Generators fire, devices appear, and IP pools allocate — all from minimal inputs. No prior Infrahub experience or code modifications required.

> Start with [Quick Start](#quick-start), then go to the [Demo Guide](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/demo-guide.mdx).

**Advanced Implementer:** You are already working with Infrahub and want a production-quality reference for modular Generator patterns: checksum-triggered signaling, self-protecting Generators with prerequisite validation, IP space delegation across layers, and idempotent upserts.

> Go straight to the [Generator Patterns](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/generator-patterns.mdx) and dig into the code.

---

## Prerequisites

- Python 3.11+ and [uv](https://docs.astral.sh/uv/)
- Docker and Docker Compose (v2)
- Git

---

## Quick start

```
git clone git@github.com:opsmill/infrahub-solution-ai-dc.git
cd infrahub-solution-ai-dc

# Install dependencies and start the environment
uv sync --all-packages
uv run inv start

# Load demo data
uv run inv load

# Wait for repository sync
uv run infrahubctl repository list

# Load trigger rules (after repository sync completes)
cp objects/20_triggers.yml.save triggers.yml
uv run infrahubctl object load triggers.yml
```

Then in the Infrahub UI: navigate to **Actions > Generator Definitions > generate-fabric**, click **Run**, and select a target fabric.

> For a detailed walkthrough of every step, see [Installation & Setup](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/installation-setup.mdx).

---

## What you will see

When you run the demo:

1. You trigger **FabricGenerator** for a fabric (e.g., Fabric-A: 6 super spines, 3 pods)
2. FabricGenerator allocates the fabric-level IP pool, creates super spine switches, then writes a checksum to each child Pod
3. That checksum triggers **PodGenerator** for every pod simultaneously — they run in parallel
4. Each PodGenerator allocates pod-level IP space, creates spine switches, connects them to the super spines, then writes a checksum to each child Rack
5. Those checksums trigger **RackGenerator** for every rack across every pod — all run in parallel
6. Each RackGenerator creates leaf switches and connects them to the pod's spines

You trigger once. Everything else runs automatically. Devices, IP allocations, and the cabling plan are all visible and queryable in Infrahub.

---

## What's included

The solution is a self-contained repository with everything needed to run the demo and study the implementation:

- **Schemas** — a complete data model covering logical design (Fabric, Pod), physical location (Hall, Rack), devices, IPAM, and the GeneratorTarget generic that enables trigger-based signaling
- **Generators** — FabricGenerator, PodGenerator, and RackGenerator, each scoped to a single layer, with `.infrahub.yml` wiring definitions, targets, queries, and trigger rules
- **Transforms and artifacts** — startup configuration (Jinja2), cabling plan (Python), and computed interface descriptions
- **Demo data** — two pre-configured fabrics (Fabric-A: 6 super spines, 3 pods; Fabric-B: 4 super spines, 3 pods with Dell equipment), plus device types, IPAM pools, interface profiles, and device templates
- **Trigger rules** — `CoreNodeTriggerRule` and `CoreGeneratorAction` definitions driving the modular execution
- **Infrastructure** — Dockerfile, Docker Compose, and invoke tasks (`inv start`, `inv load`) for local setup

---

## Documentation

| Topic | Resource |
| --- | --- |
| **Run the demo** | [Demo Guide](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/demo-guide.mdx) |
| **Set up the environment** | [Installation & Setup](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/installation-setup.mdx) |
| **Understand the concepts** | [Design-Driven Automation](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/design-driven-automation.mdx) |
| **Learn the architecture** | [Modular Generator Architecture](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/modular-generator-architecture.mdx) |
| **Study the code patterns** | [Generator Patterns](https://github.com/opsmill/infrahub-solution-ai-dc/blob/main/docs/docs/solution-ai-dc/generator-patterns.mdx) |
| **Infrahub core docs** | [Generators](https://docs.infrahub.app/topics/generator) · [Modular Generators](https://docs.infrahub.app/topics/modular-generators) |

---

## About Infrahub

[Infrahub](https://github.com/opsmill/infrahub) is an open source infrastructure data management and automation platform (AGPLv3), developed by [OpsMill](https://opsmill.com/). It gives infrastructure and network teams a unified, schema-driven source of truth for all infrastructure data — devices, topology, IP space, configuration — with built-in version control, a Generator framework for automation, and native integrations with Git, Ansible, Terraform, and CI/CD pipelines.
