How to Install the Service Catalog Demo
This guide explains how to install the Service Catalog demo, a self-service portal built on Infrahub's source of truth. By the end of the guide, you can request network services through a web interface.
Need help or have questions? Join our Discord community for support!https://discord.gg/opsmillWhat you'll achieve
After completing this installation, you will have:
- A running Infrahub instance with network infrastructure data
- A Service Catalog portal for requesting services
- Loaded demo data, including locations, devices and network resources
- Configured Git integration for infrastructure-as-code workflows
- Semaphore automation for deploying configurations to network devices
Prerequisites
Before you begin, install these tools:
Required software
-
🐳 Docker: Container runtime for running Infrahub and its dependencies
- Docker Desktop for local development
- Or Docker Engine on a Linux VM for server deployments
- At least 4 GB of RAM allocated to Docker
-
🐍 uv: Fast Python package and project manager
- Install via the official installation guide
- Used to manage Python packages and virtual environments
- Version 0.4.0 or higher recommended
System requirements
- Operating System: macOS, Linux, or Windows with WSL2
- Memory: At least 8GB RAM (16GB recommended)
- Storage: 10GB free disk space
- Network: Internet connection for downloading dependencies
Installation steps
Step 1: Clone the repository
Download the demo code from GitHub. This repository contains the configuration files, schemas and demo data.
git clone https://github.com/opsmill/infrahub-demo-service-catalog.git
cd infrahub-demo-service-catalog
The repository includes:
- Infrahub schemas defining the data models for network infrastructure
- Demo data with sample locations, devices, and network resources
- Service Catalog application built with Streamlit
- Docker configuration for running all components
Step 2: Configure environment variables
Set up the connection details for Infrahub. These variables tell the Service Catalog application how to communicate with the Infrahub API.
export INFRAHUB_ADDRESS="http://localhost:8000"
export INFRAHUB_API_TOKEN="06438eb2-8019-4776-878c-0941b1f1d1ec"
Understanding the variables
-
INFRAHUB_ADDRESS: The URL where Infrahub's API is accessible- The default is
localhost:8000for local development - Change this if you run Infrahub on a different host or port
- The default is
-
INFRAHUB_API_TOKEN: Authentication token for API access- The demo uses a token configured in advance
- In production, generate and store tokens securely
Step 3: Install Python dependencies
Use uv to create a virtual environment and install all required Python packages.
uv sync
This command:
- Creates an isolated Python virtual environment
- Installs the Infrahub SDK for API interactions
- Installs Streamlit for the web portal interface
- Sets up development tools (pytest, ruff, mypy)
uv automatically manages virtual environments. Run all subsequent commands with the uv run prefix so that they use the correct environment.
Step 4: Start the application stack
Launch Infrahub and the Service Catalog using Docker Compose. This command starts several services.
uv run invoke start
The invoke start command is a wrapper that:
- Uses the correct Docker Compose configuration
- Mounts the
service_catalogmodule into the Infrahub container - Starts Infrahub, the Streamlit application, and Semaphore
- Sets up networking between containers
The Service Catalog portal and Semaphore run from published images, registry.opsmill.io/opsmill/infrahub-demo-service-catalog-streamlit:main and registry.opsmill.io/opsmill/infrahub-demo-service-catalog-semaphore:main, which invoke start pulls. The Semaphore image holds the playbooks of the ansible folder. To build both images from your checkout instead, run uv run invoke start --build, or set INFRAHUB_SERVICE_CATALOG_BUILD=true. The build mounts the service_catalog and ansible folders, so your edits to the portal and the playbooks appear without rebuilding. To run other images, set STREAMLIT_IMAGE or SEMAPHORE_IMAGE.
What gets started
This command launches:
- Infrahub Core: The main application server (port 8000)
- PostgreSQL: Database for storing infrastructure data
- Redis: Cache and message broker
- RabbitMQ: Task queue for asynchronous operations
- Service Catalog: Streamlit web portal (port 8501)
- Semaphore: Ansible automation UI (port 3000)
Step 5: Initialize the demo environment
Once Infrahub is running, initialize the demo by loading the repository and permissions, then seeding Semaphore.
uv run invoke init
This single command performs three things:
- Seeds Semaphore with the project, SSH key, repository, inventory, environment, and task template (idempotent: you can run it more than once)
- Loads the repository configuration from
bootstrap/repository.yamlinto Infrahub. It is a read-writeCoreRepositorythat references the local checkout mounted at/upstreamin the container - Loads permissions from
bootstrap/permissions.yml, creating an operator account (john/infrahub) with permissions to manage repositories, merge branches, and review proposed changes, and a change manager account (emma/infrahub) that approves and merges proposed changes and changes no other data
What the repository provides
Once Infrahub imports the repository, it loads:
- Generator Scripts: Python code that automates service provisioning
- Configuration Templates: Jinja2 templates for device configurations
- Schema: Data models for DCIM, IPAM, services, and locations
- Objects and data: Demo infrastructure loaded from YAML fixtures
- Menu: Custom navigation structure for the Infrahub UI
The repository imports:
- Locations: Sites in Paris, Brussels, New York, and Dallas
- Devices: Core switches and edge routers at each site
- Providers: Transit and peering providers (Cogent, Zayo, Colt, Lumen, Equinix)
- Network Resources: VLAN pools, IP prefix pools, interface profiles
- Templates: Device configurations and service definitions
The schema uses a hierarchical structure:
- Locations contain devices
- Devices have interfaces and connections
- Services allocate resources from pools
- Everything is version-controlled and auditable
Infrahub also loads three service tiers (Gold, Silver, Bronze), four customers, friendly device names such as "Paris edge router 1", and a list price for each device type from the repository. Step 6 adds the upstream circuits used to calculate the cost of service. After invoke init there are no services yet: you create them by ordering through the portal or by running Step 6.
Step 6: Seed the business impact demo (optional)
Run this step only for the business impact pages. You do not need it for the service request walkthrough.
uv run invoke seed
The command uses the INFRAHUB_ADDRESS and INFRAHUB_API_TOKEN variables from Step 2 and takes a few minutes. It runs these steps in order:
- Waits until Infrahub has imported the repository and the repository is in sync. This import includes the tiers, customers,
business_impact_servicesquery and generator definition. If the last repository import failed, the command asks Infrahub to import the last commit again. It then sets the descriptions that the Infrahub web interface shows for the redundancy check, generator, artifact definitions and stored queries. Next, it loads the circuit schema, the Circuit item of the Device Management menu, and an upstream circuit with a monthly cost for each edge router. These circuits provide data for the cost of service. A repository import that runs while the circuit schema loads can fail, so the command waits again until the repository is in sync - Creates twelve Dedicated Internet services in Paris and Brussels on
main, each with a customer and a tier, and runs the provisioning generator for each one. It then gives the three Paris Gold services a second path through the other Paris switch and edge router, generates the "Cost of service" artifact, and creates thegold-outreachwebhook, inactive, with a placeholder CRM URL - Opens three maintenance proposed changes: "Paris router 1 maintenance", "Brussels switch 1 maintenance" and "New York router 1 maintenance"
- Waits for each proposed change pipeline to finish
You can run it again. It creates only the services, second paths, webhook and proposed changes that are missing, and changes a description only when it differs. It runs the provisioning generator again for every service, sets the devices to maintenance again on their branches, and waits for the pipelines again. A webhook that already exists keeps its URL and its active setting.
mainInfrahub imports the repository from the committed main branch of your checkout. A feature that is not on main yet, such as a branch that has not been merged, is not imported, and invoke seed then waits until it times out.
Verify your installation
Confirm that everything works by accessing all three interfaces:
Infrahub web UI
- URL: http://localhost:8000
- Admin account:
admin/infrahub - Operator account:
john/infrahub(limited permissions) - Change manager account:
emma/infrahub(approves and merges proposed changes; changes no other data) - What to Check:
- Navigate to the Schema page to see loaded models
- Check the Objects page to verify demo data is present
- Confirm the repository appears under Repositories
- Log in as
johnto verify operator-level access works
Service catalog portal
- URL: http://localhost:8501
- What to Check:
- Home page displays available services
- Service request forms are accessible
- No connection errors appear
- After Step 6, the "Planned maintenance" page shows "3 Gold services for Helix Health and Northbank have fewer separate paths during this change" for "Paris router 1 maintenance"
Semaphore automation UI
- URL: http://localhost:3000
- Username:
admin - Password:
semaphore - What to Check:
- Login page loads successfully
- The "Service Catalog" project is visible (created by
invoke init) - The "Deploy" task template and "Infrahub" inventory are configured
Troubleshooting common issues
Services won't start
- Confirm that Docker is running and has enough resources
- Check for port conflicts (3000, 8000, 8501, 5432, 6379)
- Run
uv run invoke destroythenuv run invoke startto reset
The portal image does not pull
invoke startkeeps the copy of the image that is already on your machine when the registry is not reachable- Without a local copy, run
uv run invoke start --buildto build the portal from your checkout
Schema load fails
- Wait for Infrahub to fully start (check logs with
docker compose logs infrahub) - Retry the schema load command after 30 seconds
Can't access web interfaces
- Verify environment variables are set correctly
- Check firewall rules if running on a remote server
- Confirm that all containers are running:
docker compose ps
Next steps
Now that your environment is running:
- For Users: Follow the user walkthrough to learn how to request services
- For Developers: Check the developer walkthrough to understand the architecture
- Explore Further: Browse the Infrahub UI to understand the data model and relationships