REFERENCE

Other machines

Sandboxes on your other hosts, over ssh, in the same CLI and dashboard.


Experimental

Add a machine

TERMINAL
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 here

A 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.

TERMINAL
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 GPU

A 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:

  1. Install the same devsandbox release on all three.
  2. On the desktop, run devsandbox machine add box --control-plane.
  3. On box, run devsandbox serve install. A run box/<sandbox> from the desktop brings the repos along.
  4. On the laptop, run devsandbox machine add box, then devsandbox machine approve <id> on the desktop.
  5. 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)

MENU /
View on GitHub