Reference
What it does
The deployment module stores what a tenant wants to run: a deployment specification enumerating one or more groups of services, each with resource requirements (CPU, memory, storage), placement constraints, and pricing bounds. When a tenant creates a deployment, the module emits the orders that the market module opens for bidding.
Deployments are versioned, updatable state: tenants can update or close a deployment, and group-level granularity means a single deployment can fan out to multiple orders placed with different providers in different regions.
Why it exists: Tenants think in terms of workloads, not individual orders. The deployment module translates a declarative workload description into marketplace primitives, the same way a Kubernetes Deployment translates a desired state into pods — but with the exchange, not a scheduler, deciding who runs it.
State
Primary objects
| Concept | Definition |
|---|---|
Deployment | A tenant's declarative description of the services they want the marketplace to run. |
Group | A subdivision of a deployment that becomes an independently-biddable order with its own placement rules. |
SDL | The stack definition language in which workloads are described — services, resources, and placement. |
Messages
Messages & queries
Message and query surfaces are documented at implementation level in the module docs ↗ and the source ↗. The objects above are the state those messages create and transition.
Connections
Module interactions
-
x/marketDeployment groups generate the orders the market opens for bidding. -
x/escrowA deployment funds the escrow that backs its resulting leases. -
x/certTenant certificates authenticate the deployment owner to providers. -
x/veidThe current implementation includes tenant identity checks; this is not the intended universal marketplace access policy.
Flows
Core flow
- Describe — Write the spec. Services, resources, placement, and pricing bounds declared in the stack definition language.
- Emit — Groups become orders. Each group fans out to an order that the market module opens for competitive bidding.
- Fund — Fund the escrow. The deployment funds the escrow account backing its resulting leases — demand arrives with budget attached.
- Run — Update or close. Deployments are versioned: update specs as needs change or close out, with unspent escrow returning to the tenant.
Questions
Asked about x/deployment
What is a deployment group?
A subdivision of a deployment that becomes an independently-biddable order with its own placement rules — the unit providers actually compete for.
What is SDL?
The stack definition language: how services, resources, and placement are described for the marketplace. Think of it as the desired-state document the exchange acts on.
How is the deployment owner authenticated?
Tenant certificates (x/cert) authenticate the owner to providers when delivering manifests, and deployment creation itself is gated by the tenant's VEID identity.
Related