2024-10-20 14:43:09 +08:00
2023-09-12 11:20:26 +08:00
2024-10-20 14:35:51 +08:00
2023-09-12 11:20:26 +08:00

Hanzo Compute

Machines and GPUs for Hanzo Cloud, launched in Hanzo's own AWS account and billed by the hour.

Go 1.24 Compute License

Compute launches, starts, stops and terminates machines for an org, prices every size from one catalog, and debits the org's prepaid balance through Hanzo Commerce. It holds no cloud credential: every call to a cloud goes through hanzoai/egress, which keeps the account's credential in KMS, signs the request in memory and returns only the answer.

Features

  • Hosted machines — EC2 in Hanzo's account, x86_64 CPU and GPU sizes, one encrypted gp3 root volume each, IMDSv2 only.
  • No key in compute — AWS is reached through egress, which assumes the hanzo-compute role with its own IAM identity. A provider row stores a label and a region, never a key, and a write carrying one is refused.
  • Per-org identity — Hanzo IAM (hanzo.id) bearer tokens, scoped by the org a caller is a signed member of. The one platform privilege is acting in the admin org.
  • Metering — the first hour is authorized and debited before a launch; every later running hour, and a stopped machine's disk, is debited hourly. A machine its org cannot pay for is stopped.

Architecture

  console.hanzo.ai / api.hanzo.ai
                │
                ▼
        Hanzo Compute ──── balance, debits ───▶ Hanzo Commerce
                │
                │ ZAP, its own IAM token
                ▼
          hanzoai/egress ── KMS: cloud/aws/hanzo-compute/credential
                │
                │ SigV4, signed in memory
                ▼
       EC2 · CloudWatch (us-east-1)

The role egress assumes, and what it may do, is in egress's deploy/aws.

API Surface

Endpoint Method Description
/v1/regions, /v1/sizes, /v1/gpus GET The catalog, with Hanzo's price per running and stopped hour
/v1/machines GET The caller org's machines
/v1/machines POST Quote (dryRun) or launch a machine
/v1/machines/:owner/:name GET, PUT, DELETE Read, start or stop, or terminate one machine
/v1/machines/:owner/:name/agent GET, PUT, DELETE A machine's bound agent

License

Apache-2.0. See NOTICE for third-party attributions.

S
Description
Hanzo Compute — machines, clusters, pools and accelerators.
Readme Apache-2.0
9.9 MiB
Languages
Go 99.9%