WP-0014: Helm adopt and deploy Core Hub on CoulombCore; backup auth tooling
Adopt live Core Hub resources, align prod ConfigMap naming, default production image registry to gitea, and install Helm release core-hub rev 1 (smoke passed). Add apps-pg-backup and check-backup-lane-auth targets; document OIDC login requirement now that OpenBao is unsealed.
This commit is contained in:
parent
871c56692b
commit
e9ee577d03
9 changed files with 101 additions and 31 deletions
21
Makefile
21
Makefile
|
|
@ -63,7 +63,7 @@ CORE_HUB_CHART ?= charts/core-hub
|
||||||
CORE_HUB_VALUES ?= helm/core-hub-values.yaml
|
CORE_HUB_VALUES ?= helm/core-hub-values.yaml
|
||||||
CORE_HUB_STAGING_NAMESPACE ?= core-hub-staging
|
CORE_HUB_STAGING_NAMESPACE ?= core-hub-staging
|
||||||
CORE_HUB_STAGING_VALUES ?= helm/core-hub-staging-values.yaml
|
CORE_HUB_STAGING_VALUES ?= helm/core-hub-staging-values.yaml
|
||||||
CORE_HUB_IMAGE_REPOSITORY ?= forgejo.coulomb.social/coulomb/core-hub
|
CORE_HUB_IMAGE_REPOSITORY ?= gitea.coulomb.social/coulomb/core-hub
|
||||||
CORE_HUB_IMAGE_TAG ?=
|
CORE_HUB_IMAGE_TAG ?=
|
||||||
CORE_HUB_BASE_URL ?= https://hub.coulomb.social
|
CORE_HUB_BASE_URL ?= https://hub.coulomb.social
|
||||||
CORE_HUB_KUBECONFIG ?= $(PRODUCTION_KUBECONFIG)
|
CORE_HUB_KUBECONFIG ?= $(PRODUCTION_KUBECONFIG)
|
||||||
|
|
@ -141,7 +141,19 @@ cnpg-backup-status: check-production-kubeconfig ## Report CNPG backup spec and S
|
||||||
|
|
||||||
apps-pg-backup-dry-run: check-production-kubeconfig ## Logical pg_dump + age encrypt for vergabe_db (no upload)
|
apps-pg-backup-dry-run: check-production-kubeconfig ## Logical pg_dump + age encrypt for vergabe_db (no upload)
|
||||||
chmod +x tools/apps-pg-backup-dry-run.sh
|
chmod +x tools/apps-pg-backup-dry-run.sh
|
||||||
KUBECONFIG="$(PRODUCTION_KUBECONFIG)" PLATFORM_REPO="$(PLATFORM_REPO)" tools/apps-pg-backup-dry-run.sh
|
KUBECONFIG="$(PRODUCTION_KUBECONFIG)" PLATFORM_REPO="$(PLATFORM_REPO)" RAILIANCE_BACKUP_DRY_RUN=1 \
|
||||||
|
tools/apps-pg-backup-dry-run.sh
|
||||||
|
|
||||||
|
apps-pg-backup: check-production-kubeconfig ## Logical pg_dump + age encrypt + Nextcloud upload for vergabe_db
|
||||||
|
chmod +x tools/apps-pg-backup-dry-run.sh
|
||||||
|
@KUBECONFIG="$(PRODUCTION_KUBECONFIG)" PLATFORM_REPO="$(PLATFORM_REPO)" bao kv metadata get \
|
||||||
|
platform/workloads/railiance/backup/offsite-lane >/dev/null 2>&1 || { \
|
||||||
|
echo "ERROR: OpenBao backup-lane auth missing." >&2; \
|
||||||
|
echo "Run: bao login -method=oidc -path=netkingdom role=railiance-backup-workload-kv-read" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}
|
||||||
|
KUBECONFIG="$(PRODUCTION_KUBECONFIG)" PLATFORM_REPO="$(PLATFORM_REPO)" RAILIANCE_BACKUP_DRY_RUN=0 \
|
||||||
|
tools/apps-pg-backup-dry-run.sh
|
||||||
|
|
||||||
##@ Vergabe Teilnahme
|
##@ Vergabe Teilnahme
|
||||||
|
|
||||||
|
|
@ -222,6 +234,11 @@ inter-hub-logs: check-railiance01-kubeconfig ## Tail inter-hub app logs from Rai
|
||||||
|
|
||||||
##@ Core Hub
|
##@ Core Hub
|
||||||
|
|
||||||
|
core-hub-helm-adopt: check-production-kubeconfig ## Annotate live Core Hub resources for Helm ownership
|
||||||
|
chmod +x tools/core-hub-helm-adopt.sh
|
||||||
|
KUBECONFIG="$(CORE_HUB_KUBECONFIG)" CORE_HUB_NAMESPACE="$(CORE_HUB_NAMESPACE)" CORE_HUB_RELEASE="$(CORE_HUB_RELEASE)" \
|
||||||
|
tools/core-hub-helm-adopt.sh
|
||||||
|
|
||||||
core-hub-render-baseline: ## Render checked-in core-hub values for chart validation only
|
core-hub-render-baseline: ## Render checked-in core-hub values for chart validation only
|
||||||
helm template $(CORE_HUB_RELEASE) $(CORE_HUB_CHART) \
|
helm template $(CORE_HUB_RELEASE) $(CORE_HUB_CHART) \
|
||||||
--namespace $(CORE_HUB_NAMESPACE) \
|
--namespace $(CORE_HUB_NAMESPACE) \
|
||||||
|
|
|
||||||
|
|
@ -29,5 +29,5 @@ app.kubernetes.io/component: api
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "corehub.runtimeConfigMapName" -}}
|
{{- define "corehub.runtimeConfigMapName" -}}
|
||||||
{{- printf "%s-runtime" .Release.Name -}}
|
{{- default (printf "%s-runtime" .Release.Name) .Values.runtime.configMapName -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
@ -10,6 +10,7 @@ replicaCount: 1
|
||||||
runtime:
|
runtime:
|
||||||
coreHubEnv: production
|
coreHubEnv: production
|
||||||
autoCreateTables: "0"
|
autoCreateTables: "0"
|
||||||
|
configMapName: ""
|
||||||
|
|
||||||
envSecretName: core-hub-prod-env
|
envSecretName: core-hub-prod-env
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ export RAILIANCE_BACKUP_NC_TOKEN=$(
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Blocker observed 2026-07-10:** OpenBao at `https://bao.coulomb.social` reports
|
**OpenBao unsealed 2026-07-10.** KV fetch still requires a valid caller token via
|
||||||
`Vault is sealed`. `warden access issue-core-ingestion-api-key --fetch --no-policy`
|
OIDC (`railiance-backup-workload-kv-read`). Agent sessions cannot complete the
|
||||||
reaches the broker but fails with the same sealed error. Unseal requires operator
|
browser callback to `localhost:8250` — run login in an interactive operator shell,
|
||||||
shamir keys before any KV fetch succeeds.
|
then `make apps-pg-backup` or `tools/check-backup-lane-auth.sh`.
|
||||||
|
|
||||||
## CNPG barman ObjectStore (Phase 2 — deferred)
|
## CNPG barman ObjectStore (Phase 2 — deferred)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@
|
||||||
# the Secret 'core-hub-prod-env' in the core-hub namespace.
|
# the Secret 'core-hub-prod-env' in the core-hub namespace.
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
repository: gitea.coulomb.social/coulomb/core-hub
|
||||||
tag: "production-placeholder" # Render baseline only; deploy requires CORE_HUB_IMAGE_TAG=<sha>.
|
tag: "production-placeholder" # Render baseline only; deploy requires CORE_HUB_IMAGE_TAG=<sha>.
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
coreHubEnv: production
|
coreHubEnv: production
|
||||||
autoCreateTables: "0"
|
autoCreateTables: "0"
|
||||||
|
configMapName: core-hub-prod-runtime
|
||||||
|
|
||||||
envSecretName: core-hub-prod-env
|
envSecretName: core-hub-prod-env
|
||||||
|
|
||||||
|
|
|
||||||
31
tools/check-backup-lane-auth.sh
Executable file
31
tools/check-backup-lane-auth.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
path="${RAILIANCE_BACKUP_BAO_PATH:-platform/workloads/railiance/backup/offsite-lane}"
|
||||||
|
|
||||||
|
if ! bao status >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: cannot reach OpenBao at ${BAO_ADDR:-https://bao.coulomb.social}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sealed="$(bao status -format=json 2>/dev/null | python3 -c "import json,sys; print(json.load(sys.stdin).get('sealed', True))")"
|
||||||
|
if [[ "$sealed" == "True" ]]; then
|
||||||
|
echo "ERROR: OpenBao is sealed" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "ok: OpenBao unsealed"
|
||||||
|
|
||||||
|
if bao token lookup >/dev/null 2>&1; then
|
||||||
|
echo "ok: caller token valid"
|
||||||
|
else
|
||||||
|
echo "WARN: no valid caller token — run OIDC login:" >&2
|
||||||
|
echo " bao login -method=oidc -path=netkingdom role=railiance-backup-workload-kv-read" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if bao kv metadata get "$path" >/dev/null 2>&1; then
|
||||||
|
echo "ok: backup offsite-lane path readable"
|
||||||
|
else
|
||||||
|
echo "ERROR: cannot read metadata for ${path}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
27
tools/core-hub-helm-adopt.sh
Executable file
27
tools/core-hub-helm-adopt.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Adopt live Core Hub manifests into Helm release ownership (WP-0014-T02).
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
namespace="${CORE_HUB_NAMESPACE:-core-hub}"
|
||||||
|
release="${CORE_HUB_RELEASE:-core-hub}"
|
||||||
|
|
||||||
|
resources=(
|
||||||
|
"deployment/core-hub-api"
|
||||||
|
"service/core-hub-api"
|
||||||
|
"configmap/core-hub-prod-runtime"
|
||||||
|
"ingress/core-hub"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Adopting Core Hub resources into Helm release ${release}/${namespace}"
|
||||||
|
for resource in "${resources[@]}"; do
|
||||||
|
echo " ${resource}"
|
||||||
|
kubectl annotate -n "$namespace" "$resource" \
|
||||||
|
meta.helm.sh/release-name="$release" \
|
||||||
|
meta.helm.sh/release-namespace="$namespace" \
|
||||||
|
--overwrite
|
||||||
|
kubectl label -n "$namespace" "$resource" \
|
||||||
|
app.kubernetes.io/managed-by=Helm \
|
||||||
|
--overwrite
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "ok: adoption metadata applied — run core-hub-server-dry-run next"
|
||||||
|
|
@ -34,15 +34,14 @@ id: RAILIANCE-WP-0013-T01
|
||||||
status: progress
|
status: progress
|
||||||
priority: high
|
priority: high
|
||||||
needs_human: true
|
needs_human: true
|
||||||
intervention_note: "OpenBao sealed at bao.coulomb.social — operator unseal + OIDC login (railiance-backup-workload-kv-read) required"
|
intervention_note: "OpenBao unsealed; OIDC login required in interactive shell (browser callback localhost:8250) before offsite-lane upload"
|
||||||
state_hub_task_id: "f2051213-0a9f-418e-82ad-9bd7c79fd0dc"
|
state_hub_task_id: "f2051213-0a9f-418e-82ad-9bd7c79fd0dc"
|
||||||
```
|
```
|
||||||
|
|
||||||
Credential routing in `docs/credential-routing-railiance-apps.md`. `warden access`
|
OpenBao unsealed (2026-07-10). Stale `~/.vault-token` returns 403; agent OIDC login
|
||||||
reaches the platform broker; KV fetch fails while OpenBao is sealed. Phase 1 lane:
|
times out without browser callback completion. Operator command:
|
||||||
`platform/workloads/railiance/backup/offsite-lane`. CoulombCore clusters:
|
`bao login -method=oidc -path=netkingdom role=railiance-backup-workload-kv-read`.
|
||||||
`apps-pg`, `gitea-db`, `net-kingdom-pg`, `state-hub-db`. `make apps-pg-backup-dry-run`
|
Then `make apps-pg-backup` uploads via offsite-lane. Dry-run path proven.
|
||||||
succeeded (pg_dump + age encrypt; upload blocked on offsite-lane).
|
|
||||||
|
|
||||||
## Wire apps-pg backup coverage
|
## Wire apps-pg backup coverage
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,46 +28,39 @@ approval. Do not store secrets in workplans.
|
||||||
|
|
||||||
```task
|
```task
|
||||||
id: RAILIANCE-WP-0014-T01
|
id: RAILIANCE-WP-0014-T01
|
||||||
status: progress
|
status: done
|
||||||
priority: high
|
priority: high
|
||||||
state_hub_task_id: "b9dea9f3-f0c0-41c1-b9c4-ec4c44d43d55"
|
state_hub_task_id: "b9dea9f3-f0c0-41c1-b9c4-ec4c44d43d55"
|
||||||
```
|
```
|
||||||
|
|
||||||
Production on CoulombCore (`PRODUCTION_KUBECONFIG=~/.kube/config`). Live image:
|
CoulombCore production cluster confirmed. `core-hub-server-dry-run` passed after
|
||||||
`gitea.coulomb.social/coulomb/core-hub:a33191a`. `core-hub-prod-env` exists.
|
`make core-hub-helm-adopt` and configMap name alignment (`core-hub-prod-runtime`).
|
||||||
`core-hub-server-dry-run` blocked: existing Service/Deployment lack Helm ownership
|
Live image `gitea.coulomb.social/coulomb/core-hub:a33191a` verified.
|
||||||
metadata — needs adopt/patch before `helm upgrade --install`.
|
|
||||||
|
|
||||||
## Adopt Helm-managed Core Hub release
|
## Adopt Helm-managed Core Hub release
|
||||||
|
|
||||||
```task
|
```task
|
||||||
id: RAILIANCE-WP-0014-T02
|
id: RAILIANCE-WP-0014-T02
|
||||||
status: wait
|
status: done
|
||||||
priority: high
|
priority: high
|
||||||
state_hub_task_id: "0e591104-0123-4e4a-84ff-5deb435e8441"
|
state_hub_task_id: "0e591104-0123-4e4a-84ff-5deb435e8441"
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `core-hub-migrate` then `core-hub-deploy` with an explicit
|
`CORE_HUB_IMAGE_TAG=a33191a make core-hub-deploy` installed Helm release
|
||||||
`CORE_HUB_IMAGE_TAG`. Confirm the Helm release owns `core-hub-api`, runtime
|
`core-hub` revision 1 on CoulombCore. Resources carry Helm ownership metadata.
|
||||||
ConfigMap, and Service in namespace `core-hub`. Retire duplicate resources from
|
Service-repo `k8s/railiance-production/` path is now superseded for operations.
|
||||||
the service-repo `k8s/railiance-production/` apply path once stable.
|
|
||||||
|
|
||||||
Blocked on: `RAILIANCE-WP-0014-T01`.
|
|
||||||
|
|
||||||
## Verify Core Hub post-cutover smoke
|
## Verify Core Hub post-cutover smoke
|
||||||
|
|
||||||
```task
|
```task
|
||||||
id: RAILIANCE-WP-0014-T03
|
id: RAILIANCE-WP-0014-T03
|
||||||
status: wait
|
status: done
|
||||||
priority: high
|
priority: high
|
||||||
state_hub_task_id: "eca3ce8b-68a8-44d0-90c7-2cdefa482200"
|
state_hub_task_id: "eca3ce8b-68a8-44d0-90c7-2cdefa482200"
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `make core-hub-status`, `make core-hub-smoke`, and `make core-hub-release-info`.
|
Post-deploy `make core-hub-status` and `make core-hub-smoke` passed on
|
||||||
Ingress for `hub.coulomb.social` must remain healthy. Document rollback steps in
|
`https://hub.coulomb.social` after Helm rollout (2026-07-10).
|
||||||
`docs/core-hub-on-railiance01.md` if Helm values drift from prior manifests.
|
|
||||||
|
|
||||||
Blocked on: `RAILIANCE-WP-0014-T02`.
|
|
||||||
|
|
||||||
## Refresh vergabe-teilnahme production image
|
## Refresh vergabe-teilnahme production image
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue