k8s: snapshot-schedule setup for the ci-build disk#62
Open
jmandel wants to merge 2 commits into
Open
Conversation
fhir-ci-build-disk (build.fhir.org/ig store + upload landing zone) had no recovery point. Add an idempotent setup script that attaches a daily snapshot schedule with a retention window, and reference it from create.sh. Snapshots are incremental + compressed and auto-expire after RETENTION_DAYS (default 7), so cost is ~baseline + retention*daily-delta, not N full copies; stored in-region to avoid the multi-region premium. Tunable via env vars (RETENTION_DAYS, DISKS, etc). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… broke gcloud filter parsing) Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Why
fhir-ci-build-diskholds the published build.fhir.org/ig site (/var/www) andthe SSH upload landing zone, but has no recovery point — a disk loss, corruption,
or an accidental VM/disk delete is currently unrecoverable. (Its only existing
snapshot is a one-off from 2018.)
What
A new idempotent
k8s/snapshot-schedule.shthat:(
us-east1), with a retention window so snapshots auto-expire, andfhir-ci-build-disk.create.shnow points to it next to the disk creation.Cost is bounded by design
the previous one, and you're billed on those compressed/used bytes, not the disk's
1 TB provisioned (or its used) size.
RETENTION_DAYS(default 7),so the set never grows unbounded. Steady-state ≈ compressed baseline + retention ×
daily-delta, not N full copies.
Tunable via env vars (
RETENTION_DAYS,START_TIME,DISKS,PROJECT,REGION,ZONE). Run it after clearing orphaned staging dirs from~/uploading(see thereindex GC) so the baseline snapshot isn't bloated with cruft.
🤖 Generated with Claude Code