Named instance types - fixed (vCPU, memory) sizes, like cloud instance classes.
The caller picks a type instead of juggling raw numbers; this module turns it
into host-side resource caps expressed as firecracker jailer flags.
We run firecracker under the jailer,
which creates the cgroup (+ chroot, namespaces, privilege drop) and applies
--cgroup <file>=<value> settings before exec'ing firecracker. cgroup/1
returns those --cgroup args (cgroup v2 only) ready to splice into the
jailer command.
Summary
Functions
All supported instance architectures.
The full resource bundle for a type. vcpus and mem feed both the cgroup
caps and firecracker's machine-config; disk sizes the rootfs image; the
disk_bw/net_bw throughputs feed firecracker's drive/NIC rate limiters.
All known instance types.
Types
@type arch() :: Sys.Arch.t()
The CPU architecture an instance's guest runs on.
@type t() ::
:micro
| :milli
| :centi
| :deci
| :base
| :deca
| :hecto
| :kilo
| :mega
| :giga
| :tera
An instance size.
Functions
@spec arches() :: [arch()]
All supported instance architectures.
@spec spec(t()) :: Hyper.Vm.Instance.Spec.t()
The full resource bundle for a type. vcpus and mem feed both the cgroup
caps and firecracker's machine-config; disk sizes the rootfs image; the
disk_bw/net_bw throughputs feed firecracker's drive/NIC rate limiters.
@spec types() :: [t()]
All known instance types.