Skip to content

metrics_exp: add nginx TLS overlay for public-IP deployments#239

Merged
cijohnson merged 1 commit into
mainfrom
dacampbe/nginx-tls-overlay
Jun 26, 2026
Merged

metrics_exp: add nginx TLS overlay for public-IP deployments#239
cijohnson merged 1 commit into
mainfrom
dacampbe/nginx-tls-overlay

Conversation

@d-camp

@d-camp d-camp commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an opt-in nginx reverse proxy layer for metrics_exp monitoring VMs deployed on public IPs where Zscaler performs SSL inspection and blocks non-standard ports (30030, 30080).

Note: This PR is intended to be reviewed alongside / merged after venksrin/control-plane-monitoring. Tagging @venksrin09 for coordination.

  • Base stack (docker-compose.yml) is completely untouched — compose override is fully opt-in
  • Validated on chi-metrics-exp-mon (Vultr Chicago ORD) with Let's Encrypt cert via nip.io — clears AMD Zscaler SSL inspection

Files changed

  • docker-compose.nginx.yml — compose override: adds fleet-nginx (nginx:alpine), overrides GF_SERVER_ROOT_URL via GRAFANA_ROOT_URL env var, mounts /etc/letsencrypt and /var/www/certbot for Let's Encrypt
  • server/config/nginx/nginx.conf — TLS termination on 443, ACME HTTP-01 challenge on port 80, WebSocket headers for Grafana live, /fleet/ path for Fleet Manager API
  • server/config/nginx/ssl/.gitkeep — preserves ssl/ dir in tree; certs are gitignored
  • .env.example — documents three GRAFANA_ROOT_URL deployment tracks

Usage

Deploy with nginx overlay:

# Set in .env:
GRAFANA_ROOT_URL=https://<your-domain>

docker compose -f docker-compose.yml -f docker-compose.nginx.yml up -d

TLS cert tracks:

Deployment Method
Private/VPN-only Skip overlay, use base stack on port 30030
Public IP (staging) Let's Encrypt via <ip>.nip.io — free, no DNS setup
Public IP (production) AMD-issued cert — contact dl.casbsecurity@amd.com

Rollback (base stack untouched):

docker compose -f docker-compose.yml -f docker-compose.nginx.yml rm -sf fleet-nginx

Test plan

  • https://<domain>/login loads Grafana correctly through Zscaler
  • https://<domain>/fleet/ proxies to Fleet Manager API
  • HTTP → HTTPS redirect works (http://301)
  • Let's Encrypt cert auto-renews (certbot systemd timer active)
  • Rollback: removing nginx container leaves base stack fully operational

🤖 Generated with Claude Code

Introduces an opt-in nginx reverse proxy layer (docker-compose.nginx.yml)
that terminates TLS on port 443 and proxies to Grafana and Fleet Manager
over the internal Docker network. Required for deployments on public IPs
where Zscaler performs SSL inspection and blocks non-standard ports.

- docker-compose.nginx.yml: compose override adding fleet-nginx container;
  overrides GF_SERVER_ROOT_URL via GRAFANA_ROOT_URL env var; mounts
  /etc/letsencrypt and /var/www/certbot for Let's Encrypt integration
- server/config/nginx/nginx.conf: nginx config with ACME HTTP-01 challenge
  support on port 80, TLS termination on 443, WebSocket proxy headers for
  Grafana live, and /fleet/ path for Fleet Manager API
- server/config/nginx/ssl/.gitkeep: placeholder keeps ssl/ dir in tree;
  certs are gitignored (*.pem, *.key already in .gitignore)
- .env.example: documents three GRAFANA_ROOT_URL deployment tracks:
  private/VPN (no TLS), nip.io + Let's Encrypt (staging/test),
  AMD-issued cert (production)

Validated on chi-metrics-exp-mon (137.220.56.231) with Let's Encrypt cert
for 137.220.56.231.nip.io — clears Zscaler SSL inspection.

Rollback (base stack untouched):
  docker compose -f docker-compose.yml -f docker-compose.nginx.yml rm -sf fleet-nginx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cijohnson cijohnson marked this pull request as ready for review June 26, 2026 23:22
@cijohnson cijohnson merged commit f000622 into main Jun 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants