as

Projects / plate

plate

A small VPS control plane. One process takes an API call and turns it into a container or a KVM VM.

Why

I wanted the shape of a provider: plans, an address pool, SSH keys, a firewall, snapshots, without standing up a real cloud. The interesting cut is the provider interface. Docker is the local stand-in. Proxmox is the path that clones a cloud-init template and starts a real VM.

Diagrams

A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.

The CLI, the panel, and /v1 hit one process. That process assigns an address from the pool, then calls whichever provider is configured.

flowchart TD
  client["CLI, panel, or /v1"]
  plate["plate serve"]
  pool["ippool"]
  docker["Docker provider"]
  pve["Proxmox provider"]
  client --> plate
  plate --> pool
  plate --> docker
  plate --> pve
  class client,plate,pool,docker,pve chosen
          

Docker is the laptop path. Proxmox clones a cloud-init template and starts a real VM. State is JSON under .plate/. A second plate serve would also believe it owns the pool. There is no lock and no leader election.

flowchart TD
  prov{Which provider}
  prov -->|"laptop, iptables when both addresses are known"| docker["Docker"]
  prov -->|"clone a template, resize, inject keys"| pve["Proxmox"]
  owners{Who owns the pool}
  owners -->|"one process, files under .plate"| one["Single plate serve"]
  owners -->|"two processes, no lock"| two["A second plate serve"]
  class docker,pve,one chosen
  class two rejected
          

Why this shape

CLI, panel, and HTTP all hit the same process. The provider is the only part that changes.
clientsCLI, panel, /v1Create, start, stop, firewall, snapshots, billing file.

Bearer token once any token exists. Creating an account and listing plans stay open.

platecontrol + ippoolAssigns a public IPv4 on create, releases it on delete. CIDR or an explicit list.

Provider interface

devDockeriptables DNAT on Linux when both addresses are known.
kvmProxmoxClone a template, resize, inject SSH keys, start the VM.

State is JSON under .plate/: VMs, accounts, billing, the pool. There is no second replica and no leader election. Two plate serve processes would both believe they own the pool. The boundary is one host, one process. Plans are tiny, small, medium, and large. A new VM opens SSH, HTTP, and HTTPS unless the request says otherwise.

Snapshots and the billing file make the API look like a small provider. They are not a metering pipeline. ipv1 does not allocate these addresses. The pool does.

Where it breaks

The pool is a file on one machine. A second plate serve does not lock it. And the Docker provider is not a VM. It is there so the control plane can be developed on a laptop. The Proxmox path is the one that matches the API’s story.