Devsy
How it works

How Devsy Deploys Workspaces

devsy workspace up builds the devcontainer if needed, then starts it with the provider.

Devsy Up Sequence
Devsy up - Sequence Diagram
  1. If the provider uses a machine, Devsy creates or starts it.
  2. Devsy pulls the source and the devcontainer.json from Git or a local folder.
  3. The agent builds the workspace image. See Building.
  4. The agent starts the devcontainer through the driver, such as the Docker daemon or the Kubernetes API.
  5. Devsy starts a daemon that stops the machine or container when it is idle. It also sets up credentials and opens your IDE.

With devsy workspace up --from-snapshot <ref>, Devsy restores a snapshot and skips the build.

Machines

Machine providers, such as AWS, GCP, and DigitalOcean, create a VM to host the container. Devsy creates the VM with the CLI tool and credentials on your computer, such as aws or az, then connects through the cloud's own tunnel:

If your setup supports it, you can use SSH tunneling instead.

The agent runs an SSH server over the tunnel, which the client uses to forward ports and connect your IDE.

Devsy Architecture
Devsy - Component Diagram

Kubernetes

Kubernetes works the same way, but the tunnel is the Kubernetes API (pod exec and attach). Nothing extra runs on the node.

Devsy Architecture
Devsy - Container Diagram Kubernetes

Building

Devsy reads devcontainer.json, adds any features as build stages on the base Dockerfile, and builds an OCI image. Features add build stages, so a build is often needed even when the file only names an image.

With a local container daemon, Devsy builds with docker buildx or its built-in BuildKit client. Without one, as with Kubernetes, Devsy uses the dockerless builder, which builds in the workspace pod. You can push the image to a registry to cache it. See Reduce build times with a cache.

Devsy Architecture
Devsy - Container Diagram
Devsy Architecture 2
Devsy - Component Diagram Kubernetes Build Process

On this page