Infrahub Documentation

website·Indexed 32 days ago

https://docs.infrahub.app

Documentation for Infrahub, featuring the opsmill.infrahub Ansible collection for dynamic inventory, data retrieval, and artifact management. Includes developer guides for AVD pipelines, generator architecture, schema definitions, and integration with Arista AVD and ContainerLab.

Tokens
517.6K
Snippets
2.2K
Records
3.8K
Agent score
63%

What's inside Infrahub

  1. Overview of the AI/DC reference implementation

    The AI/DC solution is a reference implementation for automating the full lifecycle of a large-scale AI data center using Infrahub. It uses a design-driven approach where a small set of inputs (fabric topology, pod configuration, rack assignments) triggers a cascade of Generators to produce a complete data center, including devices, IP allocations, cabling plans, and vendor-specific configurations (Cisco, Arista, Dell, Juniper). The solution is available in the infrahub-solution-ai-dc GitHub repository.
  2. Overview of Infrahub demo-sp capabilities

    The Infrahub demo-sp is a service-provider bundle designed to demonstrate multi-vendor MPLS backbone management and end-to-end service provisioning. Key capabilities include:

    • Schema-driven modeling: Data modeling for backbone and customer services.
    • Generator-driven provisioning: Automatic materialization of VRFs, Route Targets (RT), PE-CE interfaces, IP allocations, and BGP sessions.
    • Multi-vendor support: Generation of configuration artifacts for Arista EOS, Cisco IOS-XR, Juniper Junos, Nokia SR OS, Cisco Viptela, and Versa VOS from a shared schema.
    • Self-service provisioning: A Streamlit Service Catalog for L3VPN and SD-WAN provisioning.
    • Lifecycle management: Version-controlled changes using proposed-change diff reviews and branch-based workflows (Catalog form → feature branch → generator → artifact regeneration → proposed change → review → merge).
  3. Overview of the automated service delivery workflow

    The service delivery process simulates an enterprise workflow where network services are requested via a portal and provisioned through a source of truth (Infrahub). The workflow consists of the following stages:

    1. Service Request: A user requests a service via the self-service portal.
    2. Automatic Processing: Infrahub generates proposed changes and allocates resources.
    3. Review & Approval: A network architect reviews the proposed implementation.
    4. Resource Allocation: The system provisions VLANs, IPs, and configurations.
    5. Service Delivery: The customer receives access details.
    6. Automated Deployment: Semaphore executes Ansible playbooks to deploy configurations from Infrahub to network devices.
  4. Overview of Infrahub Collect

    Infrahub Collect is a read-only diagnostic tool used to gather service logs, diagnostic status, configuration, and metrics into a single tar.gz archive for OpsMill support. It is safe to run against production instances at any time, even if the instance is degraded, as it does not stop, restart, or scale any containers or pods. By default, it works offline using existing Docker or kubectl access.
  5. Overview of the .infrahub.yml configuration file

    The .infrahub.yml file is a central declarative manifest that defines how Infrahub integrates with external Git repositories. It is used to explicitly declare which resources (code, templates, schemas, etc.) should be imported, providing the necessary metadata and context for Infrahub to interpret the repository contents. This explicit approach prevents unintended file imports and ensures the integration surface is auditable.
  6. Overview of the Infrahub VSCode extension

    The Infrahub VSCode extension integrates the Infrahub infrastructure automation platform into Visual Studio Code. It allows developers to design infrastructure schemas, execute GraphQL queries, run Jinja2 and Python transforms, and manage branch-based workflows directly within the IDE. Key features include multi-server management, visual tree views for servers and branches, real-time YAML validation and auto-completion, and built-in snippets for automation objects.
  7. Overview of the GenericRestAPI adapter

    The GenericRestAPI adapter is a configurable tool used to connect Infrahub to any REST API following common patterns. It can be used as a standalone adapter for systems with a REST API or as a base for building specialized adapters (e.g., LibreNMS, Observium, PeeringDB). It currently supports only one-way synchronization from the REST API source to Infrahub.
  8. Overview of Infrahub Generators

    A Generator is a generic plugin used to query data and create new nodes and relationships based on the results. Generators are defined in the .infrahub.yml file and consist of three main components: a Group of targets (objects the generator acts upon), a Generator class (Python code defining the logic), and a GraphQL Query (the data collection specification). Generators can automatically remove obsolete objects using the SDK tracking feature.
  9. Overview of Infrahub Sync

    Infrahub Sync is an open-source tool (Apache 2.0) used to synchronize infrastructure data between Infrahub and external systems with REST/JSON APIs. It allows for migrating from legacy systems of record, running systems side-by-side, populating inventory from network discovery tools, or publishing Infrahub data to monitoring and CMDB systems. It uses a declarative YAML configuration to map source fields to destination fields and applies only the calculated deltas (diffs) to the destination system.
  10. Overview of the Infrahub Tasks system

    The Tasks system manages backend operations with robust error reporting and supervision. It uses Prefect as the task manager to orchestrate workflows executed by Python-based Task workers.

    Key operations managed by this system include:

    • Jinja template rendering.
    • Execution of checks and Transform functions.
    • Git operations (pull, merge, and diff).

    Users can monitor active and finished tasks via the tasks indicator in the top right of the Infrahub UI.

  11. Overview of Emma's infrastructure management capabilities

    Emma is an experimental AI-powered assistant for Infrahub that provides the following tools:

    • Schema Management: AI Schema Builder (natural language descriptions), Schema Library (community-validated schemas), Schema Loader, and Schema Visualizer.
    • Data Operations: Intelligent CSV data import and export for Infrahub.
    • Experimental Features: Interactive GraphQL Query Builder and Template Builder (both require feature flags).