Installation
Before you can run the demo, you need to install the prerequisites and set up the environment.
Need help or have questions? Join our Discord community for support!https://discord.gg/opsmillPrerequisites
Before you get started, make sure the following tools are installed:
- 🐳 Docker: Could be Docker Desktop on your laptop or any Docker endpoint on a VM.
- 🐍 Poetry: Install Poetry by following the official installation guide.
Steps
1. Clone the repository
Clone the GitHub repository.
git clone https://github.com/opsmill/infrahub-demo-service-catalog.git
cd infrahub-demo-service-catalog
2. Set environmental variables
These environment variables are used to connect to the Infrahub instance and authenticate API requests.
export INFRAHUB_ADDRESS="http://localhost:8000"
export INFRAHUB_API_TOKEN="06438eb2-8019-4776-878c-0941b1f1d1ec"
3. Install the dependencies
Our demos use Poetry to manage the Python environment.
poetry install
4. Start Infrahub
Make sure to start Infrahub using the following command to ensure the service_catalog
module is loaded correctly! This will also start the Streamlit app for the service catalog.
poetry run invoke start
5. Load schema and data into Infrahub
These commands will load the schema and data into Infrahub.
poetry run infrahubctl schema load schemas/ --wait 10
poetry run infrahubctl object load data/
6. Connect read-only repository
Infrahub can connect to external repositories to fetch scripts, templates, or other resources. Learn more about git integration in the Infrahub documentation.
Connect the demo repository as a read-only source with the following command:
poetry run infrahubctl repository add --ref main --read-only infrahub-demo https://github.com/opsmill/infrahub-demo-service-catalog.git
Confirmation
- 👉 Log in to the Infrahub UI on port
8000
with usernameadmin
and passwordinfrahub
. - 👉 Access the Service Catalog on port
8501
.
Next steps
With the demo set up, you can now explore the service catalog and its features in the user walkthrough documentation.