Move host-level configuration to triangle-infrastructure - #221
Merged
Conversation
Server configuration that is applied to a machine, rather than built and
shipped with a release, now lives in DrexelTriangle/triangle-infrastructure as
Ansible roles. This repo keeps everything that versions with the application:
compose.cms.yml, the blue/green deploy and rollback scripts, the Dockerfiles,
the container-internal frontend/nginx.conf, and the workflows.
Moved: deploy/mariadb/, deploy/maxscale/, deploy/proxmox/,
deploy/nginx/triangle-cms.conf, deploy/nginx/triangle-{loki,prometheus}.conf,
deploy/compose.observability.yml, deploy/scripts/deploy-observability.sh,
scripts/pull-dashboards.sh, and observability/ except prometheus.dev.yml.
The dev stack loses Loki, Promtail and Grafana. loki-config.yml and
promtail-config.yml were mounted by both the dev compose file and Delta's, so
keeping a copy here would have meant two sources of truth for the production
log pipeline with nothing to catch drift between them. Dev keeps Prometheus;
use `docker compose logs` for the rest.
The Deploy Delta workflow no longer runs deploy-observability.sh. That step
read observability/ out of the runner's checkout, so leaving it in place would
fail every deploy once these files are gone.
test_host_nginx_health_uses_default_type moved to the infrastructure repo's
tests/site-contracts.sh along with the file it asserts on. The remaining deploy
script tests pass unchanged.
Before merging, see the ordering note in the PR: Delta's observability stack
keeps running on restart:unless-stopped, but nothing updates it until
playbooks/observability.yml has been applied.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-up to moving host config into triangle-infrastructure: - Retarget comments that pointed at moved files (deploy/nginx/triangle-cms.conf, prometheus.delta.yml, the Grafana dashboard) to say the host Nginx site and those configs now live in triangle-infrastructure. Touches clipboard.ts, homepage_carousel_settings.go, compose.cms.yml and prometheus.dev.yml. - Drop dead .gitignore entries: `.webhook` (its comment pointed at the now-moved deploy/mariadb/README.md, and nothing in this repo uses the file) and `deploy/runner/` (unreferenced; the runner lives on the host). Kept the db-backups and deploy/*.env rules. Comment/ignore-only; no behaviour change. go build and the dev prometheus config still validate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The infra split moved Loki, Promtail, Grafana, Alertmanager, blackbox and the Delta scrape config to triangle-infrastructure, and removed Loki/Promtail/ Grafana from the dev stack. That left a lone dev Prometheus scraping the local CMS with nothing to visualise it (dev Grafana is gone) and nothing in CI, tests or scripts depending on it -- a scraper with no consumer. Removed the dev prometheus service and its volume from docker-compose.yml and deleted observability/prometheus/prometheus.dev.yml, so observability/ no longer exists in this repo. The backend still exposes GET /metrics; scrape it directly in local dev if needed. Updated the README and setup_containers messaging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits server configuration out of this repo and into
DrexelTriangle/triangle-infrastructure(private), where it is applied with Ansible instead of copied over SCP.
Draft: do not merge until Delta is adopted
Merging this is safe for deploys — the workflow step that read the removed
files is removed in the same commit, so Deploy Delta will not break.
What it does mean is that Delta's observability stack stops being updated by
anything. It keeps running on
restart: unless-stopped, but a config changewould no longer reach it. Order:
playbooks/observability.yml --check --diffagainst Delta, then for real.Steps 1–2 have not been done. Everything else here has no live coupling —
nothing reads
deploy/mariadb/,deploy/maxscale/,deploy/proxmox/ordeploy/nginx/triangle-cms.confat deploy time.The boundary
Infrastructure is what gets applied to a machine and survives a
docker compose down. Application is what is built and shipped per release.This repo keeps
compose.cms.yml, the blue/green deploy and rollback scripts,common.sh, all three Dockerfiles, the container-internalfrontend/nginx.conf, the active-upstream seed file, the env templates andevery workflow.
There is a third category with no owner: runtime state.
/etc/nginx/triangle-cms/active-upstreams.confis written bydeploy.shandread back to determine the live slot, so its correct contents are unknowable
from any git tree. Ansible manages the directory and never the file; the role
has a guard task that fails the run if that file ever appears in it.
Moved
deploy/mariadb/roles/mariadb_{primary,replica}/deploy/maxscale/roles/maxscale/deploy/proxmox/roles/proxmox_ip_watch/deploy/nginx/triangle-cms.confroles/delta_cms_host/files/deploy/nginx/triangle-{loki,prometheus}.confroles/observability/files/nginx/deploy/compose.observability.ymlroles/observability/files/deploy/scripts/deploy-observability.shroles/observability/files/scripts/observability/exceptprometheus.dev.ymlroles/observability/files/observability/observability/grafana/dashboards/grafana/dashboards/scripts/pull-dashboards.shgrafana/Two changes that are not just file moves
The dev stack loses Loki, Promtail and Grafana.
loki-config.ymlandpromtail-config.ymlwere mounted by both the repo-rootdocker-compose.ymland Delta's
compose.observability.yml. Keeping a copy here would have meanttwo sources of truth for the production log pipeline with nothing to catch
drift. Dev keeps Prometheus;
docker compose logscovers the rest.deploy-observability.shis now self-contained. It used tosource deploy/scripts/common.shfornginx_testandnginx_reload— the onlytwo functions it took. Those are duplicated into the infra repo as
lib-nginx.sh, minuscommon.sh'sDEPLOY_TEST_MODEhooks, which stay herewith the test harness that uses them.
Verification
deploy/scripts/deploy_scripts_test.shpasses.test_host_nginx_health_uses_default_typemoved to the infra repo'stests/site-contracts.shwith the file it asserts on — leaving it here wouldhave tested whichever stale copy was on the runner.
go build ./...clean;docker compose configvalid.delta_cms_host, bothmariadbroles andmaxscaleall reportchanged=0. That gate is what proves the roles describe the servers as theyactually are rather than as the repo assumed.
Known follow-up
.gitignorestill says "seedeploy/mariadb/README.md" for the.webhookentry. Left alone deliberately — there is an unrelated uncommitted change in
that file on this working tree.
🤖 Generated with Claude Code