2026-09-20 12:57:44 +00:00
# cursor-devbox
2026-11-03 17:22:24 +00:00
Personal Cursor Remote-SSH workspace image and GitOps for **node4-k3s** (box2) and **node5-k3s** (box3).
2026-09-20 12:57:44 +00:00
- **Image**: `dcr.trinitysan.by/infra/cursor-devbox`
2026-11-03 17:22:24 +00:00
- **Deploy**: `deploy/node4-k3s/` and `deploy/node5-k3s/`
2026-09-20 12:57:44 +00:00
- **Flux image automation**: `flux/` (ImageRepository / ImagePolicy / ImageUpdateAutomation)
2026-11-03 17:22:24 +00:00
Infra glue per cluster lives in the infra repo: `infrastructure/node4-k3s/136-cursor-devbox.yaml` , `infrastructure/node5-k3s/137-cursor-devbox.yaml` . The Gitea PAT (`gitea-cursor-devbox-gitops-token` ) originates on node1 (`infrastructure/node1-k3s/130-cursor-devbox.yaml` ) and reaches other clusters via the federated-secrets export.
> History: the original node1 devbox (`devbox.trinitysan.by`) was decommissioned 2026-11-03 — data migrated to box3, workload and PVC removed. Image automation moved from node1 to node5 at the same time.
2026-09-20 12:57:44 +00:00
## Access
| Endpoint | Detail |
|----------|--------|
2026-10-16 10:38:26 +00:00
| SSH (node4) | `ssh -p 2222 developer@box2.trinitysan.by` |
| HTTP health (node4) | `https://box2.trinitysan.by/` |
2026-11-03 17:22:24 +00:00
| SSH (node5) | `ssh -p 2222 developer@box3.trinitysan.by` |
| HTTP health (node5) | `https://box3.trinitysan.by/` |
2026-09-20 12:57:44 +00:00
## CI
Gitea Actions (`.gitea/workflows/build-and-push.yaml` ) on `master` (Dockerfile / entrypoint changes) and `workflow_dispatch` pushes:
| Tag | Purpose |
|-----|---------|
| `:latest` | Convenience |
| `:<git-sha>` | Immutable full SHA |
| `:<run_number>-<git-sha>` | Sortable; elected by Flux ImagePolicy |
2026-09-24 08:18:58 +00:00
Repo secrets (required): `DCR_USERNAME` , `DCR_PASSWORD` . Onboarding contract: infra `docs/how-to/onboard-repo-into-deployment-infra.md` .
2026-09-20 12:57:44 +00:00
## Local build
```bash
docker build -t dcr.trinitysan.by/infra/cursor-devbox:local .
```
## Flux update flow
1. CI pushes `run_number-sha` to DCR
2. ImageRepository scans; ImagePolicy picks highest `run_number`
2026-11-03 17:22:24 +00:00
3. ImageUpdateAutomation commits the new tag into `deploy/node4-k3s/020-statefulset.yaml` and `deploy/node5-k3s/020-statefulset.yaml`
2026-09-20 12:57:44 +00:00
4. Kustomization applies; StatefulSet rolls (active SSH sessions drop)
Requires a Gitea PAT with **read+write** on this repo (`GITEA_CURSOR_DEVBOX_GITOPS_TOKEN` on node1, see infra `060-external-secrets.yaml.template` ).