Skip to main content

Module instance_catalog

Module instance_catalog 

Source
Expand description

Instance type catalog and selection algorithm for cloud compute infrastructure.

This module provides:

  • A static catalog of known instance types across AWS, GCP, and Azure
  • Resource quantity parsing (CPU strings, Kubernetes-style memory/storage quantities)
  • An algorithm to select the optimal instance type for a given workload

The catalog is the single source of truth for instance type specifications. It is used by the preflights system to automatically populate CapacityGroup.instance_type and CapacityGroup.profile based on the containers in a stack.

Structs§

CatalogGpu
Static GPU specification for catalog entries (no heap allocation).
InstanceSelection
Result of instance type selection.
InstanceTypeSpec
A known instance type with its hardware specifications.
WorkloadRequirements
Aggregated resource requirements from all containers in a capacity group.

Enums§

Architecture
CPU architecture.
InstanceFamily
Instance family classification.

Functions§

catalog_for_platform
Get all instance types for a given platform.
default_architecture
Default machine architecture for images built for a managed cloud.
find_instance_type
Find a specific instance type by name and platform.
max_configurable_ephemeral_storage_bytes
Maximum workload storage that the current cloud controllers can turn into their provider-backed root disk after adding 25% filesystem headroom and 12 GiB of runtime overhead. Keep these bounds in sync with the provider controller contract; rejecting here is preferable to failing after cloud resources have already been created.
parse_cpu
Parse a CPU quantity string to f64.
parse_memory_bytes
Parse a memory or storage quantity string to bytes.
select_family
Select instance family based on workload characteristics.
select_instance_type
Select the best instance type for a workload on a given platform.