Skip to content

CI: Pin Azure deploy to commit SHA, prune images, make Prometheus private - #356

Merged
DoPri merged 3 commits into
mainfrom
ci/azure-deploy-rigor
Jul 18, 2026
Merged

CI: Pin Azure deploy to commit SHA, prune images, make Prometheus private#356
DoPri merged 3 commits into
mainfrom
ci/azure-deploy-rigor

Conversation

@DoPri

@DoPri DoPri commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Brings the Azure VM deploy up to the same rigor the Kubernetes path already has, and closes an open Prometheus on the public deployment.

Pin deployed images to the commit SHA + prune old ones. The k8s deploy passes image.tag=<sha> to Helm, but the VM just did docker compose pull against ghcr.io/...:latest, so it ran "whatever latest was at pull time": not traceable to a commit, racy when two merges queue, and impossible to roll back precisely.

  • docker-compose.yml now uses :${IMAGE_TAG:-latest} for the five app images, so it still defaults to :latest for local/manual use.
  • The Ansible deploy role passes IMAGE_TAG (from the new image_tag var) into docker compose pull and up, defaulting to latest when unset.
  • The CI Deploy to Azure VM job passes the built short SHA (needs.build-image.outputs.image-tag, the same value k8s already uses) as image_tag.
  • The role also prunes unused images older than a week (docker image prune -af --filter until=168h) after each deploy, so old SHA-tagged layers stop piling up until the disk fills.

Keep Prometheus off the public router. On the public (Let's Encrypt) deployment, /prometheus was reachable unauthenticated: the TLS overlay only added TLS, no auth. In k8s Prometheus is private (port-forward only) and only Grafana is exposed (behind Keycloak). The overlay now disables the Prometheus Traefik router and publishes it on the VM's loopback (127.0.0.1:9090), so it's reachable via an SSH tunnel (ssh -L 9090:localhost:9090 <vm>), mirroring kubectl port-forward. Local dev is unchanged: it doesn't use the overlay, so http://localhost/prometheus/ still works.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • CI / infra

Definition of Done

  • CI is green
  • If the API changed: api/openapi.yaml is updated and lint passes
  • If a service was added or restructured: docker-compose still comes up cleanly (docker compose up)
  • Tests added or updated for the changed behaviour
  • Docs updated where it matters (README, ADRs, comments)

Notes for the reviewer

@DoPri
DoPri requested review from BjarneHa and ladu-tu as code owners July 18, 2026 19:09
@DoPri DoPri added the infrastructure Infrastructure, cloud, deployment configuration label Jul 18, 2026
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@DoPri, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fd62811d-235e-4863-a955-7e2b51c2e285

📥 Commits

Reviewing files that changed from the base of the PR and between e76d670 and d6fe99a.

📒 Files selected for processing (6)
  • .env.example
  • .github/workflows/ci.yml
  • docker-compose.letsencrypt.yml
  • docker-compose.yml
  • infra/azure/README.md
  • infra/azure/ansible/roles/deploy/tasks/main.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/azure-deploy-rigor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ladu-tu ladu-tu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the cleanup work!

@DoPri
DoPri merged commit b35f1aa into main Jul 18, 2026
31 checks passed
@DoPri
DoPri deleted the ci/azure-deploy-rigor branch July 18, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Infrastructure, cloud, deployment configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants