BXUP Track progress & test yourself — free
Forward Deployed AI Engineer · Hands-on lab · ~1 min read
FORWARD DEPLOYED AI ENGINEER · HANDS-ON LAB

Lab 06 · Air-Gapped VPC Container Deployment with Prometheus Telemetry

Package a complete enterprise GenAI architecture into a multi-container Docker Compose topology with non-root user permissions, healthcheck probes, and Prometheus metrics for air-gapped private VPC deployment.

Time & Tier

~120 minutes hands-on · FDE Track, Core Production difficulty.

The Scenario

A banking client’s infrastructure team demands a single-command deployable package that runs completely isolated inside their private AWS VPC, exposes real-time token telemetry to their existing Grafana dashboards, and includes zero hardcoded secrets.

Deliverables

  1. Dockerfile: Multi-stage, non-root Python runtime container.
  2. docker-compose.yml: Multi-service compose file with API, Qdrant, and Redis.
  3. metrics.py: Prometheus exporter for tokens/sec, p95 latency, and cache hit ratios.

Step-by-Step Instructions

  1. Write the Production Dockerfile: Use a lightweight Python base (python:3.12-slim), install dependencies, create an unprivileged user appuser, and define healthcheck endpoints.

  2. Instrument Prometheus Metrics:

    from prometheus_client import Counter, Histogram
    
    REQUEST_COUNT = Counter("ai_requests_total", "Total AI queries processed", ["status"])
    LATENCY_HISTOGRAM = Histogram("ai_latency_seconds", "Inference latency in seconds")
    TOKEN_USAGE = Counter("ai_tokens_consumed", "Total tokens used", ["model"])
    
  3. Wire Multi-Container Topology: Configure docker-compose.yml linking the FastAPI app to private Qdrant and Redis services with explicit volume persistence.

  4. Verify It Works: Run docker compose up -d. Curl http://localhost:8000/metrics and verify that Prometheus gauges report live execution metrics.

This is the free reading view. Open BXUP to track your progress, run the hands-on labs, and prove it with original, exam-pattern assessments.
© Anvi Innovate · BXUP — Be Exponentially Upskilled · BXUP is an independent learning platform, not affiliated with or endorsed by AWS, Microsoft, Google, NVIDIA, IBM, Salesforce, Databricks, Oracle or Anthropic. All trademarks belong to their respective owners. · bxup.in