Skip to content

Repository files navigation

Keylime Monitoring Dashboard — Deployment

Deployment automation for the Keylime Monitoring Dashboard. Containerfiles, Podman Compose, and scripts for plug-and-play provisioning of the frontend, backend, and supporting services.

Architecture

Browser ──TLS 1.3──▶ Reverse Proxy (:8443)
├── / → Frontend (static files)
└── /api/*, /ws → Backend (:8080)
├── mTLS → Keylime Verifier (:8881)
├── mTLS → Keylime Registrar (:8891)
├── TCP → TimescaleDB (:5432)
└── TCP → Redis (:6379)
ServiceImageRole
frontendkeylime-webtool-frontendnginx reverse proxy + React SPA
backendkeylime-webtool-backendRust/Axum REST + WebSocket API
timescaledbtimescale/timescaledbAttestation event time-series store
redisredis:7-alpineResponse cache with tiered TTLs

Prerequisites

ToolMinimum VersionInstall (Fedora/RHEL)
Podman4.0+sudo dnf install podman
podman-compose1.0+pip install podman-compose
OpenSSL3.0+Installed by default on RHEL 9 / Fedora 40+
Makeanysudo dnf install make

Quick Start

git clone https://github.com/keylime-webtool/keylime-webtool-deploy.git
cd keylime-webtool-deploy
make setup

That single command will:

  1. Verify podman and podman-compose are installed
  2. Copy .env.example to .env (if missing)
  3. Generate self-signed TLS certificates (if missing)
  4. Build OCI images for the frontend and backend
  5. Start all services

The dashboard is then available at https://localhost:8443.

Configuration Reference

All configuration is managed through environment variables in .env. See .env.example for the full list with documentation.

VariableDefaultDescription
HOST_HTTPS_PORT8443Host port for the HTTPS frontend
KEYLIME_VERIFIER_URLhttps://localhost:8881Keylime Verifier API endpoint
KEYLIME_REGISTRAR_URLhttps://localhost:8891Keylime Registrar API endpoint
TLS_CERT_PATH./certs/tls.crtPath to TLS certificate
TLS_KEY_PATH./certs/tls.keyPath to TLS private key
KEYLIME_CA_CERT./certs/keylime-ca.crtKeylime CA certificate
KEYLIME_CLIENT_CERT./certs/keylime-client.crtKeylime client certificate
KEYLIME_CLIENT_KEY./certs/keylime-client.keyKeylime client key
POSTGRES_DBkeylime_dashboardTimescaleDB database name
POSTGRES_USERkeylimeTimescaleDB user
POSTGRES_PASSWORDchangemeTimescaleDB password
DATABASE_URLpostgresql://keylime:...Full connection string for the backend
REDIS_URLredis://redis:6379Redis connection string
RUST_LOGinfoBackend log level

Make Targets

make help # Show all targets
make setup # One-command bootstrap
make build # Build/rebuild OCI images
make up # Start services
make down # Stop services (keep data)
make logs # View logs (ARGS="-f" to follow, ARGS="backend" for one service)
make health # Check service health
make certs # Generate self-signed TLS certificates
make clean # Full reset: stop, remove volumes, images, and certs

Production Deployment

TLS Certificates

Replace the self-signed certificates with real ones:

# Edit .env to point to your real certificates
TLS_CERT_PATH=/path/to/production.crt
TLS_KEY_PATH=/path/to/production.key

Keylime mTLS Certificates

Mount the mTLS certificates issued by your Keylime CA:

KEYLIME_CA_CERT=/path/to/keylime/cacert.crt
KEYLIME_CLIENT_CERT=/path/to/keylime/client.crt
KEYLIME_CLIENT_KEY=/path/to/keylime/client.key

Database Credentials

Set a strong password and update the DATABASE_URL to match:

POSTGRES_PASSWORD=<strong-random-password>
DATABASE_URL=postgresql://keylime:<strong-random-password>@timescaledb:5432/keylime_dashboard

Resource Limits

Add resource limits in a compose.override.yaml:

services:
backend:
deploy:
resources:
limits:
cpus: "2.0"memory: 512Mtimescaledb:
deploy:
resources:
limits:
cpus: "2.0"memory: 1G

Air-Gapped Deployment

For environments without internet access, pre-build and transfer images as OCI archives.

On a connected machine:

make build
podman save -o keylime-frontend.tar keylime-webtool-frontend:latest
podman save -o keylime-backend.tar keylime-webtool-backend:latest
podman save -o timescaledb.tar docker.io/timescale/timescaledb:latest-pg16
podman save -o redis.tar docker.io/library/redis:7-alpine

Transfer the .tar files to the air-gapped host, then:

podman load -i keylime-frontend.tar
podman load -i keylime-backend.tar
podman load -i timescaledb.tar
podman load -i redis.tar
cp .env.example .env
# Edit .env with production values
podman-compose up -d

Troubleshooting

Services won't start:

make health # Check which service is unhealthy
make logs ARGS="backend"# Check specific service logs
podman ps -a # Check container states

"Permission denied" on certificate files:

SELinux may block volume mounts. The compose file uses the :Z label, but if issues persist:

sudo setsebool -P container_manage_cgroup on

TimescaleDB init.sql not applied:

The init script only runs on first container start. To re-initialize:

make clean # Removes volumes
make up # Fresh start with init.sql

Port 8443 already in use:

Change HOST_HTTPS_PORT in .env:

HOST_HTTPS_PORT=9443
make up

Frontend shows "502 Bad Gateway":

The backend hasn't finished starting. Check its health:

make health
make logs ARGS="backend"

License

Apache-2.0 — see LICENSE.

About

Deployment automation for the Keylime Monitoring Dashboard. Containerfiles, Podman Compose, and scripts for plug-and-play provisioning of the frontend, backend, and supporting services.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages