~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
94 lines · 3.6 KB Raw History

socialweb-computer-kcp

Request and provide VMs on an atproto compute market. One binary, socialweb-computer: a requester requests a VM from a bidder, a bidder provides its host's VMs, and both are atproto accounts that vouch for each other.

Install

Linux amd64 or arm64, the current release of channel stable:

curl -sfL https://socialweb.computer/install.sh | bash -e
echo 'export PATH="$HOME/.local/bin:$PATH"' | tee -a ~/.bashrc ~/.bash_profile

Or from a clone (rc for the release candidate):

git clone --depth 1 https://knotless.dev/socialweb.computer/socialweb-computer-kcp
cd socialweb-computer-kcp
scripts/install.sh stable
export PATH=$HOME/.local/bin:$PATH

scripts/install.sh reads the channel's record from the releases' account (did:plc:gmlkrhimoueejcertevr4hl3), follows it by CID to the version and the manifest, and checks the download against the binary's CID in that manifest before it installs to ${PREFIX:-$HOME/.local}/bin. You see installed stable <version> (<sha256>) to ... and the version line. A main commit or a dev build: docs/bidder.md.

Request a VM

socialweb-computer run request --name vm1 --atproto-oauth-qr --exec -- id

Sign in with the QR code (or the URL under it); you see uid=0(root) gid=0(root) groups=0(root) and the VM is released. A bidder serves you only when its operator vouches for you: docs/quickstart-prod.md. Hold a VM, ssh in, sizes, app passwords, the long-lived requester: docs/quickstart-prod.md. As your account or as an identity associated to it: Who you run as.

Run a bidder

sudo "$(command -v socialweb-computer)" install bidder --handle <your handle> --bidder-operator-signin <your handle>

Linux with /dev/kvm: docs/bidder.md; an agent of your account or your account itself: Who you run as.

Try a local market

One machine, its own PLC, relay, PDSes and a bidder; nothing leaves it:

S=~/.swc/demo
socialweb-computer dev up --instance demo --profile market-network --host-backend proc --state-dir $S
socialweb-computer run request --network demo --state-dir $S --name vm1 --exec -- id

You see uid=0(root) ... again, from a VM of your own bidder. Then:

socialweb-computer dev down --instance demo --state-dir $S

More: docs/quickstart-local.md.

When it goes wrong

  • socialweb-computer check-host -role requester|bidder -state-dir <state dir>: each FAIL names its fix
  • logs: <state dir>/requests/<name>/logs/core.log, <state dir>/dev/<instance>/logs/core.log; an installed bidder: sudo journalctl _SYSTEMD_USER_UNIT=socialweb-computer-bidder@<handle>.service
  • live state: docs/inspect.md

run request --exec and run request ssh read stdin: paste a block with one of them as its last line.

Docs

docwhat
docs/quickstart-prod.mdrequest from prod bidders: vouches, hold and ssh, sizes, sign-in modes, run requester
docs/bidder.mdbuilds and channels, a bidder in the foreground or as a service, upgrade, self-update
docs/quickstart-local.mda whole market on one machine
docs/gateway.mdKubernetes clusters from the gateway
docs/how-it-works.mdthe protocol: request, bid, accept, receipt
docs/README.mdevery other doc

License

Unlicense (public domain).