Connect a Git repository to Infrahub
One of the three pillars Infrahub is built on is the idea of having unified storage for data and files. The data is stored in the graph database and the files are stored in Git.
When integrating a Git repository with Infrahub, the Task worker will ensure that both systems stay in sync at any time. Changes to branches or files in a Git repository will be synced to Infrahub automatically.
Please refer to Repository to learn more about it.
Fork & Clone the repository for the demo
Create a fork of the repository:
The goal is to have a copy of this repository under your name. This way your testing won't affect other users.
Once you have created a fork in GitHub, you'll need a Personal Access Token to authorize Infrahub to access this repository.
How to create a Personal Access Token in GitHub
If you already cloned the repository in the past, ensure only the main branch is present in GitHub. If other branches are present, we recommend deleting them before continuing.
How to Delete a branch in GitHub
- Select the name of the active branch in the top left corner (usually main)
- Select
View All Branches
at the bottom of the popup - Delete all branches but the branch
main
, with the trash icon on the right of the screen
Integrate the Git repository with Infrahub
Currently the easiest way to add a repository is to use the web interface.
Refer to Adding a repository guide.
After adding the infrahub-demo-edge
repository you will be able to see several new Transformations and related objects:
- 2 Jinja Rendered File under Jinja2 Transformation (Menu > Deployment > Transformation)
- 2 Python Transformation under Python Transformation (Menu > Deployment > Transformation)
- 2 Artifact Definition (Menu > Deployment > Artifact > Artifact Definition)
- 9 GraphQL Queries under Objects / GraphQL Query (Menu > Unified Storage > GraphQL Query)
If you don't see additional objects under the transformations or GraphQL Queries
, it's possible that the Task worker
might not be running anymore.
In this case, you should run invoke demo.start
first to ensure that everything is working.