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​
- Clone the repository
git clone https://github.com/opsmill/infrahub-exporter.git
cd infrahub-exporter
- Install dependencies
poetry install
- Configure your exporter
See the Configuration guide
- Run the exporter
poetry run python -m infrahub_exporter --config path/to/config.yml
Using docker (recommended)​
- Clone the repository
git clone https://github.com/opsmill/infrahub-exporter.git
cd infrahub-exporter
- Build the Docker image
docker build -t infrahub-exporter:latest -f development/Dockerfile .
- Configure your exporter
See the Configuration guide
- Run the container
docker run \
-v "path/to/config.yml:/app/config.yml" \
-p 8001:8001 \
infrahub-exporter:latest
- **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