Infrahub by OpsMill acts as a central hub to manage the data, templates and playbooks that powers your infrastructure. At its heart, Infrahub is built on 3 fundamental pillars:
- A Flexible Schema: A model of the infrastructure and the relation between the objects in the model, that's easily extensible.
- Version Control: Natively integrated into the graph database which opens up some new capabilities like branching, diffing, and merging data directly in the database.
- Unified Storage: By combining a graph database and git, Infrahub stores data and code needed to manage the infrastructure.
This repository is demoing the key Infrahub features for an example service provider with IXP peerings.
If you want to be able to make change to this repository, it is recommended to create a fork of this repository. Changes can be merged into the upstream repository using the pull request workflow.
To have a consistent user experience, independent of hardware resources, we recommend the usage of Github CodeSpaces.
- Click the green
Code
button - Switch to the
Codespaces
tab - Click the
+ to the right of Codespaces
(or click the...
button and selectNew with options
to be able to select your region)
We recommend that you use a dedicated virtual environment.
The easiest way is to leverage poetry
.
poetry install --no-root
Define and export the following environment variables:
export INFRAHUB_PRODUCTION=false
export INFRAHUB_IMAGE_NAME=infrahub
export INFRAHUB_SECURITY_SECRET_KEY=327f747f-efac-42be-9e73-999f08f86b92
export INFRAHUB_SDK_API_TOKEN=06438eb2-8019-4776-878c-0941b1f1d1ec
export INFRAHUB_SDK_TIMEOUT=20
export INFRAHUB_METRICS_PORT=8001
export INFRAHUB_DB_TYPE=neo4j
export INFRAHUB_SECURITY_INITIAL_ADMIN_TOKEN=06438eb2-8019-4776-878c-0941b1f1d1ec
export INFRAHUB_CONTAINER_REGISTRY=9r2s1098.c1.gra9.container-registry.ovh.net
export INFRAHUB_VERSION=0.14.1
export DATABASE_DOCKER_IMAGE="neo4j:5.19-community"
export CACHE_DOCKER_IMAGE="redis:7.2"
export MESSAGE_QUEUE_DOCKER_IMAGE="rabbitmq:3.12-management"
invoke start
invoke load-schema
invoke load-data
invoke stop
invoke destroy