Table of Contents
- Overview
- Core Components
- Comparative Analysis
- Use Cases and Applications
- Roadmap and Future Enhancements
- Schema Design Example
- Getting Started with InfraHub
- End-to-end Example
- Conclusion
InfraHub by OpsMill: Overview, Value, and Operation
What Is InfraHub?
Infrahub is the open-source flagship platform from OpsMill, designed to be the foundational "source of truth" for IT and network infrastructure automation. Tailored for modern enterprise demands, Infrahub simplifies, centralizes, and automates the management of critical infrastructure data, allowing organizations to operate with greater reliability, speed, and scale.
Why Infrahub Matters
- Rising Complexity: As company infrastructures grow, managing devices, networks, and services manually is increasingly inefficient and error-prone. Infrahub brings structure and consistency, even in sprawling, multi-cloud, and hybrid environments.
- Automation-Ready: Automation is fundamental for minimizing mistakes and ensuring speed in infrastructure changes. Infrahub natively integrates with automation frameworks, making deployments faster and more reliable.
- Unified Data Management: All network, device, and service data resides in a single, authoritative repository. This eliminates data silos and supports cross-team collaboration and auditing.
- Team Collaboration and Governance: Built-in version control, peer review processes, and CI/CD pipelines mean infrastructure changes are reviewed and tested before deployment, enhancing security and reducing risks.
- Enterprise-Grade Features: Support for role-based access control, single sign-on, and performance optimizations allow organizations to manage thousands of devices and users securely.
How InfraHub Works
1. Central Source of Truth
Infrahub is the central repository for infrastructure data. It stores the intended configuration and state of all networks, devices, and related services, supporting fully customizable, user-defined schemas.
2. Version Control and Peer Review
Every data change—be it a device addition, configuration update, or schema adjustment—is tracked with a Git-like version control system. Teams work through pull requests and code review workflows, ensuring traceability and accountability for every change.
3. Native CI/CD Integration
Infrahub integrates a continuous integration/continuous delivery (CI/CD) pipeline directly into its platform. Every change is automatically tested and validated before it can be made live, dramatically reducing the likelihood of errors in production.
4. Flexible Access Methods
- Web UI: Offers a user-friendly dashboard for browsing, editing, and reviewing infrastructure data.
- GraphQL API: Enables automation tools and developers to programmatically interact with the platform.
- Direct Integrations: Works out-of-the-box with infrastructure automation tools like Ansible and Nornir, supporting both push and pull automation patterns.
5. Security and Scalability
Infrahub supports enterprise requirements such as:
- Single sign-on (SSO)
- Granular, role-based permissions
- Optimizations for large-scale environments, suitable for organizations managing tens of thousands of assets.
Infrahub positions itself as a modern, scalable platform built for today’s digital infrastructure challenges. By delivering automation-ready, validated, and centrally governed infrastructure data, it empowers organizations to accelerate transformation while maintaining total control and visibility.
Core Components of OpsMill Infrahub
These are the fundamental components that make Infrahub a powerful platform for modern infrastructure automation, with real-world examples of each core building block:
- Unified Source of Truth: Infrahub acts as a centralized data store for all infrastructure and network information. Example: Device inventories, VLAN assignments, and application mappings are always accurate and in-sync—engineers can instantly see the latest validated info for any asset.
- Flexible, Extensible Schema: Custom data modeling lets organizations define their own infrastructure components and relationships. Example: A telecom business models "cell towers" with attributes like GPS coordinates, while a SaaS company uses the schema for "microservices" and tenant mapping.
- Built-In Version Control: Infrahub uses a Git-like change tracking system so every data or schema modification is branchable, auditable, and reversible. Example: Network changes are submitted, reviewed, approved, and rolled back as needed—with full history and peer review.
- Native CI/CD Integration: Every change is automatically validated and tested through a built-in continuous integration pipeline before being applied. Example: New subnet proposals are checked for IP conflicts and policy compliance before they go live.
- Templates and Standardization: Reusable object blueprints enforce consistency and minimize manual entry. Example: Creating a new branch office is simply filling out a template with pre-set security, networking, and provisioning rules.
- Comprehensive Audit and Activity Logs: Every change and user action is logged for maximum traceability and compliance. Example: Security teams can pinpoint who added a VPN endpoint, who approved it, and exactly what was changed.
- Multiple Access Methods: Manage and automate infrastructure via web UI, GraphQL API, Python SDK, or through integrations with existing DevOps tools. Example: Admins manage data from the dashboard while automation tools synchronize through APIs or SDK scripts.
- Enterprise-Grade Security & Performance: Advanced authentication, single sign-on, granular permissions, and resilient performance for large-scale deployments. Example: Large enterprises use role-based access controls to restrict sensitive operations and still serve data to thousands of nodes seamlessly.
- Extensive Integrations and Automation: Out-of-the-box connectors for major tools and external data sources power automated workflows. Example: Sync device records from ServiceNow’s CMDB and auto-trigger Ansible playbooks for real-time infrastructure provisioning.
Comparative Analysis: Infrahub vs. Competitors
This section provides a comparative overview of Infrahub by OpsMill and other leading "source of truth" and infrastructure automation solutions.
-
Key Competitors:
- NetBox: Open-source IP address management (IPAM) and data center infrastructure management (DCIM) tool.
- Device42: Commercial solution for IT asset discovery, data center management, and CMDB.
- ServiceNow CMDB: Enterprise IT service and configuration management database, tightly integrated into broader ITSM workflows.
- BackBox: Specializes in network device backup and automation.
-
Feature Comparison Table:
Feature/Capability Infrahub NetBox Device42 ServiceNow CMDB BackBox Schema Flexibility Fully user-defined, extensible Fixed/moderately customizable Preset with some customization Rigid, requires development Rigid, backup-centric Version Control Native Git-style branching, PRs Limited (external scripts) Basic change tracking Basic, audit log Basic log Automated CI/CD Built-in validation pipelines Not native Not native Not native Not native Templates/Standardization Reusable templates/blueprints Minimal Limited Weak None Audit & Peer Review Built-in, peer review Very limited Activity logs Basic auditing Minimal API/SDK/Access Web UI, GraphQL, REST, Python SDK REST API, Python client REST API REST/SOAP API Limited API Enterprise Features (SSO, RBAC) Native, open source 3rd party integration Commercial Native, commercial Commercial Integrations Extensive (Ansible, Terraform, CMDB) Moderate export/features Device/CMDB sync Broad (ITSM focus) Network device focus Open Source Yes, full feature set Yes, core features No No No Scalability Large-scale, enterprise-ready Good for SMBs/medium Good Enterprise, scalable Medium -
How Infrahub Stands Out:
- Unmatched Schema Flexibility: Users can model any infrastructure components or relationships. Example: A telecom tracks field equipment and microservices in one platform, which cannot be done as flexibly in Device42 or NetBox.
- In-App Git-Style Version Control & Peer Review: Native workflow for branching, pull requests, approval, audit, rollback. Example: Engineers safely submit and review changes to network schema before deploying to production.
- Built-in CI/CD Validation: Automated tests and compliance checks ensure only valid infrastructure changes are merged. Example: Proposed subnet is checked for IP overlaps, missing fields, and compliance before it deploys live.
- Enterprise-Grade Features in Open Source: Offers SSO, RBAC, and scaling performance at no additional license cost. Example: Large financial institutions run Infrahub securely across thousands of users without commercial licensing constraints.
- Seamless Modern DevOps Integration: Built for automation pipelines and Infrastructure-as-Code. Example: A cloud team uses the Python SDK and GraphQL to automate server provisioning and inventory—directly from CI/CD tools.
- Reusable Templates and Consistency: Blueprints dramatically reduce manual work and ensure consistent best-practice deployments.
- Comprehensive Audit & Activity Logs: Every change and action is tracked for compliance and rapid troubleshooting.
-
Where Competitors Have Strengths:
- NetBox: Simple, effective for pure IP management and smaller static networks.
- Device42: Robust inventory/discovery for legacy data centers.
- ServiceNow: Complete ITSM toolset and workflows for organizations invested in enterprise service management.
- BackBox: Specialized in network device backup and restore, especially for regulated industries.
-
Infrahub is Ideal For:
- Organizations needing custom data models and deep automation.
- Teams requiring built-in audit, compliance, and peer review for infrastructure change management.
- Environments preferring open source with enterprise-grade controls.
- Companies moving towards DevOps, GitOps, or Infrastructure-as-Code at scale.
Summary: Infrahub combines unmatched customization, granular automation, enterprise governance, and open-source accessibility—making it a standout choice for organizations seeking a next-generation, collaborative, and future-ready infrastructure platform.
Use Cases and Applications
OpsMill’s Infrahub platform is used across a wide range of industries and scenarios to streamline infrastructure automation, improve operational efficiency, and accelerate digital transformation. Here are some of the most impactful use cases and applications:
- AI GPU Data Centers: Enterprises building large-scale GPU data centers for AI and machine learning leverage Infrahub to automate deployment and management of GPU pods, maximize utilization, and reduce downtime. This enables faster time-to-market for AI initiatives and higher capital efficiency.
- Retail Store Infrastructure Automation: Retailers use Infrahub to roll out, upgrade, and manage diverse store infrastructures across regions. The platform supports versioned, repeatable infrastructure services, reducing manual effort, truck rolls, and human error while improving IT staff efficiency.
- Edge and Point of Presence (PoP) Automation: Digital service providers automate the lifecycle of edge locations and PoPs, ensuring fast, reliable deployments and optimal user experiences. Infrahub manages the design, deployment, and ongoing operations of these distributed sites.
- Hybrid and Multi-Cloud Platform Engineering: Organizations unify and automate infrastructure across on-premises, private, and public clouds. Infrahub’s provider-agnostic data models support automation tools like Terraform and Pulumi, reducing complexity and speeding up deployments.
- Network Source of Truth (NSoT): Infrahub acts as a central, authoritative repository for network intent, tracking planned changes, rendering configurations in standard formats (OpenConfig, YANG), and integrating with automation tools for seamless deployment.
- IP Address Management (IPAM) and DCIM: Infrahub provides robust IPAM and data center infrastructure management, handling complex scenarios like overlapping IPs and VLANs, and supporting automation-friendly, branch-aware resource allocation.
- Security Policy Automation: Security teams model and automate network security policies, enabling auto-generation of firewall rules and maintaining compliance with evolving requirements.
- Service Catalogs and Self-Service Infrastructure: Infrahub enables IT teams to build service catalogs, allowing internal users to request and provision infrastructure as a service, improving agility and reducing bottlenecks.
- Brownfield Network Automation: Infrahub helps organizations modernize existing (brownfield) networks by turning them into network-as-a-service (NaaS), reducing configuration errors, downtime, and SLA violations.
- Inventory and Asset Management: Centralizes physical and logical asset data, synchronizing with external systems and providing a single source for inventory management and reporting.
Roadmap and Future Enhancements
OpsMill is committed to continuous innovation, with a clear roadmap of enhancements designed to make Infrahub even more powerful and adaptable for modern infrastructure automation. Here’s what’s on the horizon:
- Attribute-Level and Metadata Permissions: Upcoming releases will introduce fine-grained access controls, allowing organizations to set permissions at the attribute and metadata level for users and groups. This will enable more secure, tailored collaboration and governance within Infrahub.
- Computed Attributes: Infrahub will soon support dynamic, computed attributes—fields whose values are generated automatically based on logic or other data within the system. This feature will empower teams to automate complex data relationships and reduce manual input.
- Enhanced Task Framework: The roadmap includes a more robust task framework, providing greater visibility and control over background processes such as generator execution, repository syncs, and automation triggers. Users will be able to monitor, manage, and troubleshoot tasks with improved transparency.
- Performance Optimizations: Ongoing improvements will further accelerate query speeds, object list retrieval, and branch management—ensuring Infrahub remains efficient even at massive scale.
- Expanded Integrations: Future updates will extend Infrahub’s integration ecosystem, making it easier to connect with additional automation tools, cloud providers, and external data sources. This will help organizations unify their infrastructure management across hybrid and multi-cloud environments.
- New User Experience Enhancements: Expect a more intuitive and streamlined web interface, with refined navigation and visualization tools to simplify complex infrastructure modeling and management.
- SaaS Offering and Enterprise Features: OpsMill plans to launch a fully managed SaaS version of Infrahub, alongside continued development of enterprise-grade features such as advanced RBAC, SSO, and SLA-backed support.
These planned enhancements reflect OpsMill’s ongoing commitment to empowering teams with the tools they need to automate confidently, collaborate securely, and scale infrastructure operations for the future.
Schema Design Example
Infrahub’s flexible schema system lets you model any infrastructure or business logic using a simple YAML format. Here’s a practical example that demonstrates how you might define devices and sites—two common building blocks in infrastructure management:
version: "1.0"
nodes:
- name: Device
namespace: Network
attributes:
- name: hostname
kind: Text
unique: true
- name: model
kind: Text
- name: firmware
kind: Number
- name: Site
namespace: Organization
attributes:
- name: address
kind: Text
- name: contact
kind: Text
- name: email
kind: Email
relationships:
- name: site_devices
from: Site
to: Device
cardinality: many
direction: outbound
- Nodes: Define the main object types (e.g., Device and Site) and their attributes (such as hostname, model, address, and email).
- Attributes: Specify the data fields for each node, supporting types like text, number, and email, with options for uniqueness and validation.
- Relationships: Model how objects relate to each other (e.g., a Site can have many Devices), capturing real-world infrastructure connections.
This modular, human-readable approach makes it easy to evolve your schema as your infrastructure grows or changes, and supports advanced automation and integration workflows.
Getting Started with Infrahub: Step-by-Step Guide
This section walks you through the detailed process of getting started with OpsMill Infrahub—from initial setup to your first automated workflow.
-
1. Preparation & Prerequisites
- Ensure you have access to a supported Linux server or VM with Docker and sufficient resources.
- Have a modern web browser and network connectivity for accessing the web UI.
- Optionally, prepare a GitHub/GitLab account for SSO and version control integration.
-
2. Download & Install Infrahub
-
Docker (Recommended):
- Clone the official Infrahub repository:
git clone https://github.com/opsmill/infrahub.git
- Navigate to the project directory:
cd infrahub
- Start Infrahub using Docker Compose:
docker compose up -d
- Clone the official Infrahub repository:
- Manual Install: Refer to the documentation for system package or custom deployments.
- Cloud Quickstart (if available): Launch a cloud-hosted instance via OpsMill’s official marketplace or cloud providers.
-
Docker (Recommended):
-
3. Initial Configuration
- Access the web interface at
http://localhost:8080
(or your server’s IP). - Create the first admin user and set up basic organization details.
- Configure authentication: connect SSO (Google, GitHub, etc.) for secure access, or use local accounts for testing.
- Access the web interface at
-
4. Define Your Schema
- Navigate to the Schema Designer in the UI.
- Create custom data models that match your infrastructure objects (e.g., "Device," "Server," "Office," "Subnet").
- Add fields and relationships—select attribute types (text, number, IP, enum, reference, etc.).
- Tip: Use built-in templates for common objects as a starting point.
-
5. Add and Import Data
- Use the web interface, CSV import tool, or API to populate records—devices, networks, users, sites, and their attributes.
- Leverage integrations (e.g., ServiceNow, Ansible, or custom scripts) for bulk data import and syncing from external systems.
-
6. Enable Version Control & Collaboration
- Branches and pull requests are available out-of-the-box. Start your first feature branch to test updates before merging to main.
- Invite teammates, set role-based access, and collaborate on data/model changes via pull requests and code reviews.
-
7. Set Up CI/CD Validation
- Configure built-in CI checks (via the UI or
infrahub.yml
) for data linting, schema validation, or policy enforcement. - Try making an intentional error and watch the validation pipeline block the change—ensuring only safe, compliant changes make it through.
- Configure built-in CI checks (via the UI or
-
8. Integrate with Automation Tools
- Connect Infrahub to automation frameworks like Ansible, Terraform, or Nornir via the REST or GraphQL API, or use the official Python SDK.
- Test automated workflows: fetch the latest infrastructure inventory from Infrahub in your playbooks or CI jobs.
-
9. Explore Audit, Logs & Dashboards
- Review audit trails to monitor every change, approval, or rollback.
- Use dashboards for visualizing topology, device status, and changes over time.
-
10. Expand & Collaborate
- Onboard more teams, grow your schema as your infrastructure evolves, and connect to other systems as needed.
- Leverage OpsMill’s docs, community forums, Discord, and GitHub discussions for help and best practices.
Next Steps: For guided learning, check out Hands-On Labs and the official documentation for deeper dives into schema design, API integration, and CI/CD workflows. Join the OpsMill community for support, feedback, and ongoing learning.
End-to-End Example: Using Infrahub with Jinja2 Templating, Nornir, and API/CLI
This section provides a detailed, step-by-step guide—starting from scratch—using Infrahub as your source of truth, processing infrastructure data with Jinja2 templates, automating device configs via Nornir, and leveraging both the Infrahub API and CLI.
-
1. Install Prerequisites
- Linux machine/VM with Docker, python3, and pip installed.
- Clone and run Infrahub:
git clone https://github.com/opsmill/infrahub.git && cd infrahub && docker compose up -d
- Install required Python libraries:
pip install jinja2 nornir nornir_napalm infrahub-sdk requests
-
2. Initial Infrahub Setup
- Open Infrahub Web UI at
http://localhost:8080
. - Create an admin user and log in.
- Go to Schema Designer to define objects:
- Example: "Device" (name: string, mgmt_ip: IP, role: enum, site: reference) - Save schema; use built-in templates for common infra objects if desired.
- Open Infrahub Web UI at
-
3. Populate Infrahub with Devices & Inventory
- Add devices via the Web UI, import CSV, or the CLI/API. Example using CLI:
infrahub-cli create device --name=router1 --mgmt_ip=10.0.0.1 --role=core --site=HQ infrahub-cli create device --name=switch1 --mgmt_ip=10.0.0.2 --role=access --site=HQ
- Alternatively, script data creation via API (Python requests or infrahub-sdk).
- Add devices via the Web UI, import CSV, or the CLI/API. Example using CLI:
-
4. Fetch Data from Infrahub via API
- Acquire API token from your user settings.
-
Use Python to fetch devices:
import requests token = "YOUR_API_TOKEN" resp = requests.get( "http://localhost:8080/api/devices", headers={"Authorization": f"Bearer {token}"} ) devices = resp.json()
- Or use CLI to export data:
infrahub-cli export devices --output devices.json
-
5. Jinja2 Templating with Inventory Data
- Create a Jinja2 template, e.g., router_config.j2:
hostname {{ device.name }} interface Loopback0 ip address {{ device.mgmt_ip }} 255.255.255.255 !
- Render configs for all devices:
from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('.')) template = env.get_template('router_config.j2') for device in devices: config = template.render(device=device) with open(f"{device['name']}_config.txt", "w") as f: f.write(config)
- Create a Jinja2 template, e.g., router_config.j2:
-
6. Automate Device Deployment with Nornir
- Prepare a Nornir inventory YAML file, or dynamically create inventory from Infrahub data.
- Create a Nornir script to push config (example with Napalm):
from nornir import InitNornir from nornir_napalm.plugins.tasks import napalm_configure nr = InitNornir(inventory={"plugin": "DictInventory", "options": {"hosts": { dev["name"]: { "hostname": dev["mgmt_ip"], "platform": "ios", "username": "admin", "password": "yourpass" } for dev in devices }}}) def push_config(task): fname = f"{task.host.name}_config.txt" with open(fname) as fh: config = fh.read() task.run(task=napalm_configure, configuration=config, replace=False) nr.run(task=push_config)
- This will apply your rendered Jinja2 configs to the live network devices.
-
7. Automate with CLI & Expand Integrations
- Infrahub CLI supports batch CRUD actions, export/import, user management, etc.
- Integrate further with Ansible, Terraform, or third-party ITSM/CMDB via API or direct connectors.
-
8. Review, Audit, and Collaborate
- All changes are tracked in Infrahub’s audit log (visible in Web UI).
- Utilize pull requests and peer review to manage updates before deployment.
-
9. Tips for Productionizing
- Set up proper RBAC, SSO authentication, and regular data syncs.
- Use CI/CD validation in Infrahub to catch misconfigurations before acting on new templates/data.
- Implement scheduled polling or webhooks for automation triggers.
Summary: This example demonstrates the full workflow: defining infra data models in Infrahub, populating a real inventory, extracting that data via API/CLI, rendering network configs dynamically with Jinja2, deploying them at scale with Nornir, and maintaining an auditable, collaborative source of truth throughout. For more, consult the official docs and hands-on labs for live walkthroughs.
Conclusion
Throughout this blog post, we’ve taken a comprehensive journey through OpsMill and its innovative Infrahub platform. We started with an overview of what OpsMill is and why it’s rapidly becoming essential in the world of infrastructure automation. We explored its key features, such as a unified source of truth, flexible schema design, built-in version control, and robust CI/CD integration, all of which empower teams to automate confidently and collaborate securely.
We highlighted the hands-on labs and community resources available, making it easy for users to learn, experiment, and connect with other practitioners. Real-world use cases demonstrated how OpsMill is making a difference in industries ranging from AI data centers to retail and edge computing. The roadmap section gave us a glimpse into the future, showing OpsMill’s commitment to continuous improvement and innovation. We also looked at a practical schema design example and shared a variety of additional resources to support your journey.
Takeaways:
- OpsMill’s Infrahub is a powerful, flexible platform designed to centralize, automate, and scale infrastructure operations.
- Its open, extensible approach means you can model any infrastructure and adapt quickly as your needs evolve.
- Built-in collaboration, security, and automation features help organizations reduce errors, speed up deployments, and maintain control at scale.
- A vibrant community and wealth of resources ensure you’re never alone as you adopt and master the platform.
Thank you for joining us on this deep dive into OpsMill! Whether you’re just starting your automation journey or looking to take your infrastructure operations to the next level, OpsMill and Infrahub offer the tools, support, and community you need to succeed. Happy automating! 🚀