Skip to main content

Infrahub: fundamentals to expert

PrerequisitesNo prior experience with Infrahub required
Time to CompletionApproximately 5 hours across all 5 labs
Hands-on Learning

This sequence is supported by 5 chained Instruqt labs. Instruqt is an online lab platform providing a pre-configured environment so you can focus on learning with hands-on experience.

Each track builds on the concepts and capabilities introduced by the one before it, so we recommend doing them in order — but you can also complete one track and come back for the rest later.

Overview​

In this sequence of labs, you'll join the network automation team at a network operator called OtterNet and learn Infrahub by tackling a real-world use case. Together, the 5 labs give you a 360° tour of Infrahub's features, from schema design to automated configuration deployment.

What you'll learn​

Across the 5 tracks, you'll build a working mental model of Infrahub's core concepts:

  • Modeling infrastructure data with custom node types, generic hierarchies, and inheritance
  • Enforcing data quality through schema constraints, branch isolation, and Python checks
  • Keeping shared values consistent using resource pools and Profiles
  • Automating provisioning with design-driven Generators
  • Rendering deployable configurations by turning source-of-truth data into artifacts with Jinja2 Transformations
  • Accessing Infrahub programmatically via infrahubctl and the Python SDK

1. Orientation​

Load a base schema, seed a two-site OtterNet topology (London and Amsterdam), and explore the data using the built-in GraphQL explorer in the Infrahub UI. You'll also access Infrahub programmatically via infrahubctl and the InfrahubClientSync Python SDK. By the end, you'll have a fully populated Infrahub instance ready for the tracks that follow.

Start Lab 1: Orientation →

2. Schema modeling​

OtterNet standardizes its sites around reusable blueprints called Site Designs. Define an OtnSiteDesign generic hierarchy, extend the existing LocationSite node with new fields (ASN, design, management subnet), and build the resource pools and device templates a Generator will later draw from. You'll finish by bringing a new site — Munich — online and assigning it a design.

Start Lab 2: Schema Modeling →

3. Enforcement & Validation​

Learn how Infrahub enforces data quality at every layer: schema constraints that fire instantly, branch isolation that keeps every mutation off main until it's reviewed, Python checks that run on proposed changes, and Profiles that keep shared values consistent by construction.

Start Lab 3: Enforcement & Validation →

4. Design-driven Generator​

Write and run a Generator that reads OtterNet's campus site design and provisions every device at the new Munich site automatically — right device names, right resources, nothing typed by hand.

Start Lab 4: Design-Driven Generator →

5. Transformations & configuration rendering​

Close the loop: explore a Jinja2 Transformation and render a complete, deployable router configuration for a Munich device, pulling every value — hostname, FQDN, management IP, BGP ASN — straight from the source of truth.

Start Lab 5: Transformations & Configuration Rendering →