Concepts
Flexible schema
A core feature of Infrahub is the ability to define a relational model to describe the infrastructure, design and business logic in a way that's specific to each organization's needs, while allowing for the model to be changed via version control over time.
The schema provides an abstraction layer to the graph database, and as such no knowledge of database administration is needed for daily Infrahub usage.
The schema is described in YAML format, and consists of nodes, attributes, relationships, and other descriptors. For more detail, see the guide to creating a schema.
A new deployment of Infrahub will have no schema by default. It is up to the administrator of the system to define and load the initial schema. See the commands to load a schema for more information.
Example schemas can be found:
- In the Schema Library, this is the most comprehensive collection of schemas currently maintained by the community and OpsMill.
- In the
models
directory of the Infrahub repository - In other OpsMill-provided demo repositories
- Via the Infrahub community
The schema can be loaded into Infrahub using one of these two methods:
- Using
infrahubctl schema load
command - This is the recommended way for development or quick testing purposes. - Using Infrahub Git integration - This is the recommended way for production deployments as it offers better version control and collaboration features.
Once the schema is loaded, it's stored and version controlled in the graph database, and distributed to all containers acting as Infrahub API Servers.
Changes to the schema can be made at any time, and it's best practice to make schema changes in a branch to allow for testing before implementation.
Learn more about schema../guides/create-schemaHands-on lab - Schema introduction
Getting started with Infrahub and unsure about all the possibilities offered by flexible schemas? In our hands-on lab, we'll walk you through the fundamentals of this feature, enabling you to successfully shape your first schema.