Adding a provider¶
A provider is a small adapter: provision capacity, boot a container, tear it down, report price.
type Provider interface {
Bootstrap(ctx, DeploymentSpec, BootstrapOpts) (GatewayInfo, error) // CLI-side, local creds
Offerings(ctx, region) ([]Offering, error) // gpu class -> instance type + live price
Launch(ctx, NodeSpec) (Node, error) // gateway-side
List(ctx, deployment) ([]Node, error)
Terminate(ctx, NodeID) error
Destroy(ctx, DeploymentSpec) error
}
Rules¶
- Idempotent creates. Every create is get-or-create by name
gr-<deployment>-*or taggeniusrise:deployment. - Tag everything.
Destroyand orphan cleanup only touch tagged/prefixed resources — the user's account must be safe by construction. - Minimum footprint. Default network, no managed k8s, no NAT gateways, no load balancers. If a provider lacks small CPU instances, require
gateway.hostinstead. - Nodes dial out. The tunnel expects nodes behind NAT/firewalls; never require inbound node ports.
- Price your offerings from a public API where one exists, and add the fetcher to
tools/pricegen.
Checklist for a new provider¶
- [ ] adapter in
internal/provider/<name>/ - [ ] unit tests for user-data/script rendering and any pure helpers
- [ ] offerings in
tools/pricegen+ embedded fallback entry - [ ] contract suite passes against the fake, then
make e2e PROVIDER=<name> - [ ]
spec.Validateerror messages for provider-specific requirements (likegateway.host) - [ ] docs page under
docs/providers/