Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -46,7 +46,6 @@ SENTRY_S3_BACKUP_BUCKET=hivegrid-sentry-backups
SENTRY_S3_BACKUP_ACCESS_KEY=replace-me
SENTRY_S3_BACKUP_SECRET_KEY=replace-me
# Optional: GPG recipient fingerprint to encrypt the tarballs with before upload.
# If left empty, backup.sh falls back to AES256 with the SENTRY_SECRET_KEY as
# symmetric passphrase (still better than plaintext, but rotate carefully).
SENTRY_BACKUP_GPG_RECIPIENT=
# Required: dedicated GPG recipient fingerprint for backup encryption. Never
# reuse SENTRY_SECRET_KEY or another runtime secret as backup key material.
SENTRY_BACKUP_GPG_RECIPIENT=replace-me-with-dedicated-backup-recipient
@@ -54,7 +54,7 @@ See `docs/observability/sentry-selfhost.md` (full deploy + upgrade + backup
runbook). High-level:
1. Copy `.env.example` → `.env`, fill secrets (Coolify-Vault).
2. Run `./install.sh` (clones upstream at pinned tag, applies overlays,
2. Run `./install.sh` (fetches the immutable upstream commit, applies overlays,
installs).
3. In Coolify, attach this stack to the `sentry.saas-ctrl.com` domain.
4. Smoke-test per `## Test Requirements` in
@@ -62,7 +62,8 @@ runbook). High-level:
## Versioning
- Upstream pin: `getsentry/self-hosted` tag **`25.12.1`** (see `UPSTREAM.md` for
- Upstream pin: `getsentry/self-hosted` tag **`25.12.1`**, commit
**`5c9794c9b1fda551f38515f85d56ec298371d060`** (see `UPSTREAM.md` for
rationale — skipping the buggy `25.12.0` migration release; staying on the
v25.x LTS-ish line until we manually qualify v26.x).
- GlitchTip alternative pin: `glitchtip/glitchtip:v6.1.6`.
@@ -6,6 +6,7 @@
| --- | --- |
| Upstream repo | <https://github.com/getsentry/self-hosted> |
| Pinned git tag | **`25.12.1`** |
| Pinned commit | **`5c9794c9b1fda551f38515f85d56ec298371d060`** |
| Release line | `v25.x` (LTS-ish; we treat the v25.x line as our long-term track until v26.x is qualified) |
| Why not `25.12.0` | `25.12.0` shipped a known migration bug in the `snuba-api` migration step that aborts the installer mid-way; `25.12.1` is the hotfix. |
| Why not `26.x` | v26.x is the current major and introduces breaking schema changes (Snuba consumers + ClickHouse-table renames). We intentionally trail one major behind to land changes after they have been hot-fixed in the wild. |
@@ -37,21 +38,22 @@ at deploy time inside our own wrapper. Our repository only contains the
- `install.sh` — wrapper that clones upstream + applies overlays + invokes
the upstream installer
## Clone strategy (what `install.sh` does)
## Fetch strategy (what `install.sh` does)
The wrapper performs the equivalent of:
The tag is release metadata only. The wrapper executes the immutable commit
that the tag resolved to when this pin was reviewed:
```bash
# Clone exactly the pinned tag into infra/sentry/upstream/self-hosted/,
# shallow + single-branch to keep the working tree lean.
git clone \
--branch 25.12.1 \
--depth 1 \
--single-branch \
https://github.com/getsentry/self-hosted.git \
infra/sentry/upstream/self-hosted
git -C infra/sentry/upstream/self-hosted init
git -C infra/sentry/upstream/self-hosted remote add origin https://github.com/getsentry/self-hosted.git
git -C infra/sentry/upstream/self-hosted fetch --depth 1 origin 5c9794c9b1fda551f38515f85d56ec298371d060
git -C infra/sentry/upstream/self-hosted checkout --detach 5c9794c9b1fda551f38515f85d56ec298371d060
```
The installer then compares `rev-parse HEAD` with the pinned commit and aborts
on any mismatch. Moving or replacing the upstream tag therefore cannot change
the executed installer.
After cloning, the wrapper:
1. Copies `infra/sentry/docker-compose.override.yml` →
@@ -74,7 +76,8 @@ repo for a fresh checkout but stays empty until the first `install.sh` run.
To upgrade to a newer `25.x.y` patch:
1. Update the tag in this file (`UPSTREAM.md`) and in `install.sh`.
1. Resolve and review the new tag, then update both tag and immutable commit in
this file (`UPSTREAM.md`) and in `install.sh`.
2. Read upstream release notes for any `sentry.conf.py` migrations and
sync our overlay if upstream renamed/removed any setting we override.
3. On staging, run `./install.sh` again. The upstream installer is
@@ -9,7 +9,7 @@
# in the background. Re-uses the upstream Postgres + ClickHouse client tools
# at versions matching the Sentry stack (Postgres 14, ClickHouse 23.8).
FROM alpine:3.20
FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
# --- Runtime deps ------------------------------------------------------------
# postgresql-client -> pg_dump
@@ -11,8 +11,7 @@
# SENTRY_S3_BACKUP_BUCKET target bucket name
# SENTRY_S3_BACKUP_ACCESS_KEY S3 access key
# SENTRY_S3_BACKUP_SECRET_KEY S3 secret key
# SENTRY_SECRET_KEY fallback symmetric passphrase for GPG
# SENTRY_BACKUP_GPG_RECIPIENT optional GPG recipient fingerprint
# SENTRY_BACKUP_GPG_RECIPIENT required dedicated GPG recipient fingerprint
#
# SENTRY_PG_HOST default "postgres" (upstream service name)
# SENTRY_PG_PORT default 5432
@@ -44,6 +43,7 @@ shopt -s inherit_errexit 2>/dev/null || true
: "${SENTRY_S3_BACKUP_BUCKET:?SENTRY_S3_BACKUP_BUCKET is required}"
: "${SENTRY_S3_BACKUP_ACCESS_KEY:?SENTRY_S3_BACKUP_ACCESS_KEY is required}"
: "${SENTRY_S3_BACKUP_SECRET_KEY:?SENTRY_S3_BACKUP_SECRET_KEY is required}"
: "${SENTRY_BACKUP_GPG_RECIPIENT:?SENTRY_BACKUP_GPG_RECIPIENT is required}"
TODAY="$(date -u +%Y-%m-%d)"
NOW="$(date -u +%Y-%m-%dT%H-%M-%SZ)"
@@ -120,16 +120,9 @@ log "clickhouse archive size: $(du -h "${CH_DUMP_FILE}" | cut -f1)"
encrypt() {
local src="$1"
local dst="${src}.gpg"
if [[ -n "${SENTRY_BACKUP_GPG_RECIPIENT:-}" ]]; then
log "encrypting ${src##*/} to GPG recipient ${SENTRY_BACKUP_GPG_RECIPIENT}"
gpg --batch --yes --trust-model always --recipient "${SENTRY_BACKUP_GPG_RECIPIENT}" \
--output "${dst}" --encrypt "${src}"
else
log "encrypting ${src##*/} symmetrically (AES256) with SENTRY_SECRET_KEY"
gpg --batch --yes --symmetric --cipher-algo AES256 \
--passphrase "${SENTRY_SECRET_KEY:?SENTRY_SECRET_KEY missing for symmetric fallback}" \
--output "${dst}" "${src}"
fi
log "encrypting ${src##*/} to the dedicated backup GPG recipient"
gpg --batch --yes --trust-model always --recipient "${SENTRY_BACKUP_GPG_RECIPIENT}" \
--output "${dst}" --encrypt "${src}"
rm -f "${src}"
printf "%s" "${dst}"
}
@@ -2,7 +2,7 @@
# infra/sentry/install.sh
#
# Wrapper around the upstream getsentry/self-hosted installer pinned at
# 25.12.1 (see UPSTREAM.md). Run this script on the staging Hetzner host
# the immutable commit behind 25.12.1 (see UPSTREAM.md). Run this script on the staging Hetzner host
# from the repository root or from `infra/sentry/`:
#
# cd infra/sentry && ./install.sh
@@ -19,6 +19,7 @@ shopt -s inherit_errexit 2>/dev/null || true
# -----------------------------------------------------------------------------
UPSTREAM_REPO="https://github.com/getsentry/self-hosted.git"
UPSTREAM_TAG="25.12.1"
UPSTREAM_COMMIT="5c9794c9b1fda551f38515f85d56ec298371d060"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
UPSTREAM_DIR="${SCRIPT_DIR}/upstream/self-hosted"
@@ -65,30 +66,28 @@ set +a
: "${SENTRY_BASE_URL:?SENTRY_BASE_URL must be set in .env}"
# -----------------------------------------------------------------------------
# Step 1: clone upstream at pinned tag (or update if already cloned)
# Step 1: fetch and check out the immutable upstream commit
# -----------------------------------------------------------------------------
mkdir -p "${SCRIPT_DIR}/upstream"
if [[ ! -d "${UPSTREAM_DIR}/.git" ]]; then
log "cloning upstream getsentry/self-hosted @ ${UPSTREAM_TAG}"
git clone \
--branch "${UPSTREAM_TAG}" \
--depth 1 \
--single-branch \
"${UPSTREAM_REPO}" \
"${UPSTREAM_DIR}"
log "initializing upstream getsentry/self-hosted @ ${UPSTREAM_COMMIT} (${UPSTREAM_TAG})"
mkdir -p "${UPSTREAM_DIR}"
git -C "${UPSTREAM_DIR}" init --quiet
git -C "${UPSTREAM_DIR}" remote add origin "${UPSTREAM_REPO}"
else
log "upstream clone exists; fetching tag ${UPSTREAM_TAG}"
git -C "${UPSTREAM_DIR}" fetch --depth 1 origin "refs/tags/${UPSTREAM_TAG}:refs/tags/${UPSTREAM_TAG}"
git -C "${UPSTREAM_DIR}" checkout --quiet "tags/${UPSTREAM_TAG}"
log "upstream clone exists; resetting canonical origin"
git -C "${UPSTREAM_DIR}" remote set-url origin "${UPSTREAM_REPO}"
fi
# Sanity-check the checked-out tag matches.
ACTUAL_TAG="$(git -C "${UPSTREAM_DIR}" describe --tags --exact-match 2>/dev/null || echo unknown)"
if [[ "${ACTUAL_TAG}" != "${UPSTREAM_TAG}" ]]; then
die "upstream checkout is at '${ACTUAL_TAG}', expected '${UPSTREAM_TAG}'"
git -C "${UPSTREAM_DIR}" fetch --depth 1 origin "${UPSTREAM_COMMIT}"
git -C "${UPSTREAM_DIR}" checkout --quiet --detach "${UPSTREAM_COMMIT}"
ACTUAL_COMMIT="$(git -C "${UPSTREAM_DIR}" rev-parse --verify HEAD)"
if [[ "${ACTUAL_COMMIT}" != "${UPSTREAM_COMMIT}" ]]; then
die "upstream checkout is at '${ACTUAL_COMMIT}', expected '${UPSTREAM_COMMIT}'"
fi
log "upstream pinned at ${ACTUAL_TAG}"
log "upstream pinned at ${ACTUAL_COMMIT} (${UPSTREAM_TAG})"
# -----------------------------------------------------------------------------
# Step 2: apply our overlay files