Automatically place servers using learned resource capacity
This commit is contained in:
+18
-1
@@ -68,7 +68,16 @@ export interface HostInventory {
|
||||
currentOperation?: string | null; [key: string]: unknown;
|
||||
capabilities?: string[];
|
||||
agentUpdate?: HostAgentUpdate;
|
||||
instanceResources?: InstanceResources[];
|
||||
}
|
||||
export interface InstanceResources {
|
||||
instanceId: string; generation: number; uptimeSeconds: number; cpuCores: number; memoryBytes: number;
|
||||
}
|
||||
export interface ResourceAllowance {
|
||||
cpuCores: number; memoryBytes: number; source: 'host' | 'fleet' | 'bootstrap';
|
||||
samples: number; observedAt: string | null;
|
||||
}
|
||||
export interface CapacityCalibration { running: ResourceAllowance; startup: ResourceAllowance }
|
||||
export interface Host {
|
||||
id: string; name: string; hostname: string; mode: HostMode; portMin: number; portMax: number;
|
||||
bindAddress: string; publicAddress: string; minimumFreeBytes: number; createdAt: string;
|
||||
@@ -95,6 +104,14 @@ export interface HostPreparation {
|
||||
}
|
||||
|
||||
export interface NativeDeploymentSelection {
|
||||
hostId: string; libraryIds: Partial<Record<'t5' | 't6', string>>; image: string;
|
||||
libraryIds: Partial<Record<'t5' | 't6', string>>; image: string;
|
||||
bindAddress?: string; publicAddress?: string; publicPort?: number;
|
||||
}
|
||||
|
||||
/** The host/port are provisional until the creation command is submitted. */
|
||||
export interface NativePlacement {
|
||||
hostId: string; libraryId: string; image?: string;
|
||||
bindAddress?: string; publicAddress?: string; publicPort?: number;
|
||||
automatic?: boolean;
|
||||
network?: { bindAddress?: string; publicAddress?: string; publicPort?: number };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user