Self-hosted Backstage on kai-server #94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-04-14T09:22:54Z - https://github.com/coilysiren/infrastructure/issues/63
Self-hosted Backstage on kai-server
Goal
Stand up a personal Backstage instance at
backstage.coilysiren.meto serve as a dev portal + TechDocs host for ~79 publiccoilysirenrepos. First step toward getting acquainted with Backstage (and later, Dagger) as upstream OSS contribution targets.Topology
apt install postgresql-16), not in-clustercoilysiren)github.com/coilysiren, bootstrapped by a batch PR addingcatalog-info.yamlstubs to all repos so the portal is non-empty on day oneRepo layout
Two repos touched. One new, one existing.
coilysiren/backstage(new)Self-contained, mirrors the
coilysiren/backendpattern exactly.npx @backstage/create-appat the rootDockerfile— standard multi-stage Backstage buildMakefilewith.build-dockerand.deploytargetsapp-config.yaml(committed, non-secret) +app-config.production.yaml(references env vars)deploy/— raw k8s manifests:namespace.yamldeployment.yaml(referencesghcr.io/coilysiren/backstage:\$SHA)service.yamlingressroute.yaml(Traefik) forbackstage.coilysiren.mecertificate.yaml(cert-manager)externalsecret.yaml— pulls GitHub PAT, GitHub OAuth client ID/secret, Postgres password from SSMendpoints.yaml— headless Service + manual Endpoints pointing at the host IP so Backstage reaches host Postgres via a stable DNS name (postgres.backstage.svc.cluster.local).github/workflows/build-and-publish.yml— copy-pasted fromcoilysiren/backend:mainmake .deploycoilysiren/infrastructure(this repo — minimal addition)Two things added. Nothing else touched.
postgresql-16via apt (idempotent)backstagerole andbackstagedatabaseALTER ROLEpg_hba.conf/postgresql.confto accept connections from the k3s pod CIDR on the host interfaceinv backstage.db-init(idempotent) that runs the above. Run once by hand from kai-server. No automation for v1.Backups deferred. Not in scope for v1. Revisit once the portal has any state worth preserving beyond the re-ingestable catalog.
Secrets
All runtime secrets live in AWS SSM and are pulled into the cluster via the existing external-secrets operator into the
backstagenamespace:github-pat— existing PAT, used for catalog discovery, TechDocs source fetching, rate-limit-friendly API accessgithub-oauth-client-id/github-oauth-client-secret— new GitHub OAuth app for single-user loginpostgres-password— shared between the host Postgres role and the Backstage pod'sDATABASE_PASSWORDenv varGitHub Actions secrets (for the deploy job, matching
backend):KUBE_SERVER,KUBE_CA,KUBE_CLIENT_CERT,KUBE_CLIENT_KEY,TS_OAUTH_CLIENT_ID,TS_OAUTH_SECRET.Catalog bootstrap
One-time scripted batch PR across the coilysiren org:
catalog-info.yamlper repo (name, description from repo metadata, ownercoilysiren, type inferred from primary language —library,service,website)Good candidate for being packaged as a Dagger module afterward — reusable, generates blog content, and doubles as the first concrete "Backstage + Dagger working together" artifact.
Out of scope for v1
coilysiren/infrastructurebeyond the Postgres bootstrap taskDefinition of done
backstage.coilysiren.meresolves and serves Backstage over TLScoilysirengit pushtocoilysiren/backstagemain deploys automatically via the existingbackend-style workflowk3srestart unchangedcoilysiren.melinks to a TechDocs page and the link resolvesIceboxed in the 2026-05-29 backlog burn-down: self-host Backstage dev portal, speculative play. Reopen anytime if it becomes real.
Iceboxed in the 2026-05-29 backlog burn-down: duplicate of #48 backstage note; speculative dev portal. Reopen anytime if it becomes real.