feat: gitops-demo — minimal multi-instance compose for the git-sync workflow - #14
Open
Bierchermuesli wants to merge 12 commits into
Open
feat: gitops-demo — minimal multi-instance compose for the git-sync workflow#14Bierchermuesli wants to merge 12 commits into
Bierchermuesli wants to merge 12 commits into
Conversation
Replace the separate docker-compose.metrics.yml overlay with a single file using Docker Compose profiles. Run base services with `docker compose up`, add the full observability stack with `--profile metrics`. Move metrics documentation to metrics/README.md. Also gitignore docker-compose.override.yml for local customisations.
One parameterized compose file + four env files (dev-main, dev-prod, cust-dev, cust-prod). Each instance is an isolated compose project (own postgres/redis/elasticsearch/backend/worker/beat/frontend) bound to its git-sync branch; cust-prod runs pull-only (git as source of truth). Backend and legacy frontend are built locally from sibling checkouts and shared between instances via a fixed image tag.
local-dev and cust-dev share dev; local-prod and cust-prod follow prod (cust-prod pull-only). Promotion = merge dev into prod on the git host.
NEOPS_GIT_SYNC_AUTO_PULL_MIGRATION registers the PeriodicTask at migrate time; the ls-remote fast path makes the 1-minute interval essentially free when the branch has not moved.
… add retention + logentry panels The task execution/failure metrics are gauges without _total now (DB snapshots that shrink with retention) and the failure breakdowns cover a 7-day lookback: - rename all references; replace increase()/rate() on those series with clamp_min(delta(...), 0) so retention pruning can't produce phantom spikes - replace the duration heatmap (increase over a snapshot histogram was meaningless) with p50/p90/p99 histogram_quantile timeseries - retitle 'Top failure codes (all time)' to '(last 7 days)' - fix the task variable on the per-task custom metrics dashboard vmalert: replace NeopsHighTaskFailureRate — it could never fire (rate() on a gauge and state="FAILURE" doesn't match the lowercase state values) — with per-task NeopsTaskFailed/NeopsTaskPartialFailed on neops_task_last_state; add NeopsRetentionBacklogHigh and NeopsOversizedLogWrites (opt-in logentry counter, rate-safe). Dashboard additions: 'Execution Retention' row (enabled/cutoff/backlog/ oldest age) and 'Task Logging (LogEntry)' row (bytes + oversized writes per task, opt-in via NEOPS_METRICS_LOG_SIZE_TRACKING). README: document the >=1.18.7-beta.6 requirement and rename, and that the fetched community Django dashboards need the now-default-off NEOPS_METRICS_INSTRUMENT_HTTP/DB flags plus a single-worker backend.
New 'Operational' row above the custom metrics on neops / Custom Metrics — by Task, so a task's health and its template-pushed metrics live on one screen: - stats: last finished state (mapped successful/partial_failed/failed), time since last finished run, last duration, executions stored, success last 24h (clamped snapshot delta), failures in the 7d window - state-timeline of neops_task_last_state (same styling as the overview dashboard) - timeseries: executions per hour by state, duration trend, failures by exception code
… default neops-core's NEOPS_METRICS_LOOKBACK_DAYS is a freshness window for all task-scoped metrics now, defaulting to 1 day — panel titles no longer hardcode '7 days'/'7d'; descriptions reference the setting. README documents the window semantics and the alert caveat for tasks running less often than the window.
README still referenced customer-dev/customer-prod from before the dev/prod branch simplification, and the old Tools-page panel that was replaced by the dedicated /git page.
…git_sync credentials subcommand zebbra/neops-core#2212 dropped its bespoke credentials subcommand in favor of the generalized zebbra/neops-core#2233.
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.
Summary
A minimal, parameterized neops stack to exercise the
neops_git_syncenterprise module (see zebbra/neops-core#2212) end-to-end across multiple instances synced to different branches of one task repository.gitops-demo/docker-compose.yml) + one env file per instance (envs/*.env) — compose project isolation gives each instance its own containers/network/volumes. Backend and legacy frontend are built locally from sibling checkouts, shared across instances via a fixed image tag.dev-main+cust-devondev(bidirectional),dev-prod+cust-prodonprod(cust-prodpull-only — git is the source of truth there).NEOPS_GIT_SYNC_AUTO_PULL_MIGRATION), cheap thanks to thels-remotefast path added in the git-sync branch.neops_netboxenabled by default since the demo repo's tasks use its providers.neops_git_sync credentialsbootstrap command, and the promotion flow (dev → prod merge).Related
Test plan
docker compose configvalidates for all four env filesmake build && make up INSTANCE=dev-main, confirm http://localhost:8081 loads