PoC for Service Catalog
This repository is a proof of concept for service catalog using Infrahub and Streamlit.
Running the demoโ
Clone the repositoryโ
Clone the GitHub repository to the server you will run this demo on:
git clone https://github.com/opsmill/infrahub-demo-service-catalog.git
cd infrahub-demo-service-catalog
Prerequisitesโ
Before you get started, make sure the following tools are installed:
-
โ Infrahub Docker Compose Requirements Follow the Infrahub installation guide to set up the necessary Docker Compose environment.
-
๐ Poetry Install Poetry by following the official installation guide.
-
๐งช Containerlab (For Lab Testing) If you plan to run lab topologies, you'll also need Containerlab.
Set environmental variablesโ
export INFRAHUB_ADDRESS="http://localhost:8000"
export INFRAHUB_API_TOKEN="06438eb2-8019-4776-878c-0941b1f1d1ec"
Install the Infrahub SDKโ
Our demos use poetry to manage the Python environment.
poetry install
Start Infrahubโ
poetry run invoke start
Load schema and data into Infrahubโ
poetry run infrahubctl schema load schemas/
infrahubctl object load data/
Connect read-only repositoryโ
infrahubctl repository add --ref main --read-only infrahub-demo https://github.com/opsmill/infrahub-demo-service-catalog.git
Spin service catalog appโ
streamlit run service_catalog/๐ _Home_Page.py`
Loginโ
๐ Login to Infrahub UI on port 8000
with username admin
and password infrahub
๐ You can connect to Service catalog on port 8501