Schema design
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
models
directory of the Infrahub repository - In other OpsMill-provided demo repositories
- Via the Infrahub community
The schema definitional YAML file can be stored in any file storage, however storage in a Git repository would be best practice. The schema can be loaded in to Infrahub via infrahubctl load
command or via REST API. Swagger documentation for the REST API can be viewed by clicking the {...}
Swagger Documentation icon in the bottom-left of the Frontend UI of Infrahub.
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 done at any time, and it's best practice to make schema changes in a branch to allow for testing before implementation.