Repository navigation
feat(devbox): add plural devbox up/down/status/check and runner commands - #851
Merged
michaeljguarino merged 18 commits intoDec 2, 2026
Merged
Conversation
`plural devbox up` turns a Linux device into a devbox runner registered with Console (PROD-5500): - Starts its own single-node k3s (>= 1.37) as plural-devbox-k3s.service from the k3s binary already installed, with a private config and data dir. It never downloads binaries; root steps are shown and confirmed, or printed with --print-root-steps. --existing-cluster uses a given kubeconfig instead. - Preflight: Kubernetes version, pod certificate APIs, single node, memory, and a read-only probe pod for /dev/kvm, proxy_arp and free disk; picks microvm or gvisor. - Creates or reuses the device's project (allowAgents), registers the cluster, installs the deployment operator, creates or reuses the project's agent-substrate global service and one devbox-runner service per runner sized to the node. - State in ~/.plural/devbox.yml, a lock, a kube-system marker, and a pinned single-context kubeconfig verified by the kube-system UID before every write. - down removes only what devbox created (shared substrate only from the last device); --purge also removes the k3s unit and data. runner add/list/remove manage more runners on the same cluster. status and check report the setup. - Host checks for WSL: unparseable mounts (Docker Desktop), shared / mount, and a warning that the virtual disk hides the Windows drive's free space. The console Go client moved to gqlgo/gqlgenc, so the GraphQL error helpers now handle both gqlgenc forks. This needs the console client release that adds ProjectFragment.allowAgents before go.mod can be bumped.
floreks
requested review from
maciaszczykm,
michaeljguarino and
zreigz
as code owners
December 1, 2026 16:26
floreks
marked this pull request as draft
December 1, 2026 16:26
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Confidence Score: 5/5
[Medium impact] The latest test-only change appears safe to merge. SummaryAdds commands to set up and manage a devbox device, register it with Console, and create its runners.
Previously accepted tradeoffs:
Reviews (9) · Last reviewed commit: "test(devbox): preallocate the purge test..." · Reviewed by Greptile |
- Record the cluster's kube-system UID in its Console metadata and only adopt a registration made for this same cluster (an older one this machine recorded gets the UID), so another device can't take over or delete it. - The kube-system marker also checks the device name. - Save the state before the k3s root steps, so a failed first run can be purged. - Keep a recreated runner's recorded sizes instead of this run's plan. - Track whether KVM was probed, so runners after up --skip-checks aren't refused. - Shell-quote printed root steps so pasting them runs the same commands. - Split up and down into stages (gocyclo) and fix lint findings.
Temporary pseudo-version for ProjectFragment.allowAgents and the gqlgo client, until the console client release replaces it.
Member
Author
Member
Author
Member
Author
Member
Author
|
@greptileai review |
Member
Author
|
@greptileai review |
Member
Author
|
@greptileai review |
…he CloudNativePG check
Member
Author
|
@greptileai review |
floreks
marked this pull request as ready for review
December 2, 2026 13:39
michaeljguarino
approved these changes
Dec 2, 2026
michaeljguarino
deleted the
sebastian/prod-5500-bring-your-own-device-devbox
branch
December 2, 2026 21:02
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
plural devbox(PROD-5500): turns a Linux device (Jetson, WSL, any Linux box) into a devbox runner registered with Console. On macOS, run k3s in a Lima VM and use--existing-cluster.upstarts its own k3s (>= 1.37) asplural-devbox-k3s.servicefrom the k3s binary already installed. It never downloads binaries, and root steps are shown before they run.--existing-clusteruses a given kubeconfig instead./dev/kvm, sysctls and disk) pick microVM or gVisor, and warn when another CloudNativePG operator runs.runner addand later runs reuse them.stopandstartstop the k3s cluster to free its CPU and memory, and bring it back.downremoves the device from Console (warning to suspend devboxes first).down --purgealso deletes the k3s cluster and Agent Substrate's data in/var/lib/ate, never deleting through a mount and leaving another cluster's state alone.status,checkandrunner add|list|remove.Depends on pluralsh/console#4770 for
ProjectFragment.allowAgents.go.modpins the console client to that branch until it's released.Labels
enhancementTest Plan
pkg/devboxpackage, the commands and the error helpers. golangci-lint is clean. Cross-compiles for linux (amd64, arm64), darwin and windows.check,up(and a re-run updating the unit), a microVM devbox with Docker, suspend and resume,status,runner add,stop/start,downon a stopped cluster,downthenupagain, anddown --purge. All pass. The fixes they needed are in this PR, and the follow-ups outside it are in PROD-5514.Checklist