Skip to content

feat(apps): deploy GitHub repositories on push - #31

Merged
zyx1121 merged 3 commits into
mainfrom
feat/apps
Oct 12, 2026
Merged

zyx1121 merged 3 commits into
mainfrom
feat/apps

Conversation

@zyx1121

@zyx1121 zyx1121 commented Oct 12, 2026

Copy link
Copy Markdown
Member

Summary

  • New member tools app_link, app_list, app_get, app_deploy, app_rollback, app_unlink (PLAN 7.9).
  • POST /apps/v1/{tenant}/{app}/releases accepts a GitHub OIDC token (audience = carrel host) and checks repository, branch, event, and the repository id pinned on first deploy. Artifacts count against images_gb, at most 500 MB, 3 kept.
  • carrel-deployd (new cmd/) long-polls /apps/v1/agent/next with a per-app token (stored hashed), verifies the checksum, unpacks safely, switches current atomically, health-checks the port and rolls back on failure.
  • /apps/v1/install.sh sets up the agent and the carrel-app-<app> unit; the start command stays in a local file carrel cannot change.
  • Machine deletion and app_unlink remove app records, releases and stored files.
  • Reusable action: https://github.com/NYCU-WinLab/carrel-deploy

Test plan

  • go test -race ./... on sandbox (10 new control-plane tests, 3 agent tests)
  • Deploy to carrel01 and run a real push end to end

🤖 Generated with Claude Code

zyx1121 and others added 3 commits October 12, 2026 15:55
Add app_link, app_list, app_get, app_deploy, app_rollback and app_unlink.
GitHub Actions uploads releases with an OIDC token checked against the
linked repository, branch and event. carrel-deployd, installed by the
machine owner, long-polls for releases, switches them atomically and
rolls back on a failed health check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Unpack through os.Root into a staging directory, refuse existing names
  and cap unpacked size, so chained links cannot write outside a release.
- Reserve images_gb and free disk before streaming and allow one upload
  per app at a time.
- Clear pending on live and failed reports; never prune a deploying
  release; reuse an unpacked release instead of deleting the running one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zyx1121
zyx1121 merged commit 15ac9b0 into main Oct 12, 2026
2 checks passed
@zyx1121
zyx1121 deleted the feat/apps branch October 12, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant