Add a machine
devsandbox machine add me@my-server # offers to install devsandbox there
devsandbox run api # a sandbox defined only there
devsandbox stop my-server/test # qualified when the name exists here too
devsandbox port my-server/web 3000 # the port opens hereA machine’s config roots are the ones its own daemon lists. machine add asks you to confirm the machine’s key fingerprint. Your ssh-agent reaches the machine only with --agent or devsandbox machine set my-server --agent on. VS Code on a machine isn’t supported yet. Brokered credentials stay on the host that logged in: run devsandbox login on the machine whose sandboxes use them. An instance another machine placed there runs without its claims, with a warning.
What a machine lends
Work placed on a machine gets nothing extra unless that host allows it. Only the host itself sets this, with machine allow, or with machine add over your ssh session to it.
devsandbox machine allow --gpus on --bind-add ~/datasets # on the machine
devsandbox machine add box --allow gpus --allow-bind /srv/data
devsandbox run ml --place # to a machine that lends a GPUA config every machine runs
The fleet’s authority is the host of its first machine add. When a run, rebuild or start there finds the config changed, it signs a new version and every machine installs its own copy. Machines keep running it while the authority is off. Edit the config on the authority only, since a copy changed in place is refused.
To run your desktop’s config on a server box and drive it from a laptop:
- Install the same devsandbox release on all three.
- On the desktop, run
devsandbox machine add box --control-plane. - On
box, rundevsandbox serve install. Arun box/<sandbox>from the desktop brings the repos along. - On the laptop, run
devsandbox machine add box, thendevsandbox machine approve <id>on the desktop. - On the laptop, run
devsandbox run box/<sandbox>.
A host with no container runtime, like that laptop, is a driver. Nothing is placed on it, and a bare run <sandbox> goes to the machine that runs it.
Control plane and versions
devsandbox machine control-plane <m> moves the control plane, even off a dead one. Members run the build the authority pins, downloaded and checked by sha256. machine ls shows a machine behind the pin, and devsandbox machine upgrade <m> copies this build over it. A link a sandbox on a machine opens lands on the host that last attached to it with a terminal.
Source: site/src/content/docs/machines.mdxEdit this page on GitHub(opens in a new tab)