Skip to main content

Install and run Infrahub Exporter

This guide walks you through installing and running the Infrahub Exporter on your system.

Installation

Choose one of the following methods to install Infrahub Exporter.

Using poetry

  1. Clone the repository
git clone https://github.com/opsmill/infrahub-exporter.git
cd infrahub-exporter
  1. Install dependencies
poetry install
  1. Configure your exporter

See the Configuration guide

  1. Run the exporter
poetry run python -m infrahub_exporter --config path/to/config.yml
  1. Clone the repository
git clone https://github.com/opsmill/infrahub-exporter.git
cd infrahub-exporter
  1. Build the Docker image
docker build -t infrahub-exporter:latest -f development/Dockerfile .
  1. Configure your exporter

See the Configuration guide

  1. Run the container
docker run \
-v "path/to/config.yml:/app/config.yml" \
-p 8001:8001 \
infrahub-exporter:latest
  1. **Docker compose example
  infrahub-exporter:
image: infrahub-exporter:latest
restart: unless-stopped
ports:
- "8001:8001"
volumes:
- path/to/config.yml:/app/config.yml:ro
- path/to/queries:/app/queries:ro
environment:
- INFRAHUB_SIDECAR_LOG_LEVEL=INFO
depends_on:
- infrahub-server # adjust to your Infrahub service name