{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Isothrum run status",
"description": "A run as it stands.",
"type": "object",
"properties": {
"state": {
"description": "Where it stands. While an operation holds the run: the moving state it is in (`starting`\nthrough an `up`), else, before it records one or for an operation that leaves the run as\nit was meanwhile (an `update`: `ready`), the state the run's record holds.",
"$ref": "#/$defs/RunState"
},
"live": {
"description": "Whether the machines and outputs were read from the engine now. False while an operation\nholds the run (in this process or another), whose tools a read would contend with (Vagrant\nrefuses to read a VM's state while a `vagrant up` provisions it): they are then as the\nrunner last read them (none before it ever did), and the outputs the engine itself gives\nare left out.",
"type": "boolean",
"default": true
},
"provider": {
"description": "The Vagrant provider it uses, when it has one.",
"anyOf": [
{
"$ref": "#/$defs/Provider"
},
{
"type": "null"
}
]
},
"machines": {
"description": "Every machine of the manifest.",
"type": "array",
"items": {
"$ref": "#/$defs/MachineStatus"
}
},
"networks": {
"description": "The run's networks.",
"type": "array",
"items": {
"$ref": "#/$defs/NetworkView"
}
},
"outputs": {
"description": "Its outputs, each filled from what was read. While not [`Status::live`], an output the\nengine itself gives (a Terraform output) has only its default, if any.",
"type": "array",
"items": {
"$ref": "#/$defs/OutputValue"
}
},
"message": {
"description": "The run's message, filled, once the run is ready.",
"type": [
"string",
"null"
]
},
"native": {
"description": "The hypervisor's own app that shows the run's running VMs in a window of its own\n([`crate::Running::native_console`]), and what of it this computer needs; none where the\nrun's provider has none (vagrant-qemu), or for a run of containers.",
"anyOf": [
{
"$ref": "#/$defs/NativeApp"
},
{
"type": "null"
}
]
}
},
"required": [
"state",
"machines",
"networks",
"outputs"
],
"$defs": {
"RunState": {
"description": "Where a run stands.",
"oneOf": [
{
"description": "Being started.",
"type": "string",
"const": "starting"
},
{
"description": "Up, every member machine running.",
"type": "string",
"const": "ready"
},
{
"description": "Something of it exists, but not every member machine runs (a failed start, a machine down).",
"type": "string",
"const": "failed"
},
{
"description": "Being parked.",
"type": "string",
"const": "parking"
},
{
"description": "Parked: stopped, what it created kept.",
"type": "string",
"const": "parked"
},
{
"description": "Being resumed.",
"type": "string",
"const": "resuming"
},
{
"description": "Being removed.",
"type": "string",
"const": "stopping"
},
{
"description": "Nothing of it exists.",
"type": "string",
"const": "absent"
}
]
},
"Provider": {
"description": "A Vagrant provider (`vagrant up --provider`).",
"oneOf": [
{
"description": "VirtualBox.",
"type": "string",
"const": "virtualbox"
},
{
"description": "VMware Workstation or Fusion.",
"type": "string",
"const": "vmware_desktop"
},
{
"description": "Hyper-V.",
"type": "string",
"const": "hyperv"
},
{
"description": "Parallels Desktop.",
"type": "string",
"const": "parallels"
},
{
"description": "libvirt (KVM).",
"type": "string",
"const": "libvirt"
},
{
"description": "QEMU.",
"type": "string",
"const": "qemu"
},
{
"description": "UTM.",
"type": "string",
"const": "utm"
},
{
"description": "An ESXi server.",
"type": "string",
"const": "vmware_esxi"
}
]
},
"MachineStatus": {
"description": "One machine of the manifest, as it stands.",
"type": "object",
"properties": {
"name": {
"description": "Its name.",
"type": "string"
},
"role": {
"description": "What it is for.",
"$ref": "#/$defs/Role"
},
"state": {
"description": "Its state.",
"$ref": "#/$defs/MachineState"
},
"addresses": {
"description": "Its static addresses, by network.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"published": {
"description": "Its published ports.",
"type": "array",
"items": {
"$ref": "#/$defs/PublishedPort"
}
},
"console": {
"description": "Its graphical console under the run's provider, as the manifest offers it (`none` and\nwhy where there is none); `None` when the manifest says nothing (a container).",
"anyOf": [
{
"$ref": "#/$defs/ConsoleOffer"
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"role",
"state",
"addresses",
"published"
]
},
"Role": {
"description": "What a machine is to the run.",
"oneOf": [
{
"description": "One of the environment's own machines: one the spec describes.",
"type": "string",
"const": "member"
},
{
"description": "A one-shot that must exit 0 (an `init:` script).",
"type": "string",
"const": "job"
},
{
"description": "Isoloom's plumbing (the controller, probes, route keepers): never shown, never counted as down.",
"type": "string",
"const": "infra"
},
{
"description": "The user's seat, or its stand-in.",
"type": "string",
"const": "access"
},
{
"description": "An observer (`tools:`).",
"type": "string",
"const": "tool"
},
{
"description": "A check runner (Compose profile `check`).",
"type": "string",
"const": "check"
}
]
},
"MachineState": {
"description": "A machine's state, as its engine reports it.",
"oneOf": [
{
"description": "Running.",
"type": "string",
"const": "running"
},
{
"description": "Running, but failing its health check.",
"type": "string",
"const": "unhealthy"
},
{
"description": "Exited with this code (a job that finished, or a machine that died).",
"type": "object",
"properties": {
"exited": {
"type": "integer",
"format": "int32"
}
},
"required": [
"exited"
],
"additionalProperties": false
},
{
"description": "Created or stopped, not running.",
"type": "string",
"const": "stopped"
},
{
"description": "Not there.",
"type": "string",
"const": "absent"
},
{
"description": "Something else, as the engine says it.",
"type": "object",
"properties": {
"unknown": {
"type": "string"
}
},
"required": [
"unknown"
],
"additionalProperties": false
},
{
"description": "Not read: another process acts on it (Vagrant's lock on the machine, held by a `vagrant\nup` that isn't this runner's), so its state is whatever that action leaves.",
"type": "string",
"const": "busy"
}
]
},
"PublishedPort": {
"description": "A published port: where a machine's port answers on the host.",
"type": "object",
"properties": {
"port": {
"description": "The machine's port.",
"type": "integer",
"format": "uint16",
"minimum": 0,
"maximum": 65535
},
"protocol": {
"description": "`tcp` or `udp`.",
"$ref": "#/$defs/Protocol"
},
"host_port": {
"description": "The host port.",
"type": "integer",
"format": "uint16",
"minimum": 0,
"maximum": 65535
}
},
"required": [
"port",
"protocol",
"host_port"
]
},
"Protocol": {
"description": "A port's transport protocol.",
"oneOf": [
{
"description": "TCP.",
"type": "string",
"const": "tcp"
},
{
"description": "UDP.",
"type": "string",
"const": "udp"
}
]
},
"ConsoleOffer": {
"description": "What a status says of a machine's graphical console under the run's provider: its protocol,\nor `none` and why ([`isoloom_manifest::Console`]'s, as the manifest says it).",
"type": "object",
"properties": {
"protocol": {
"description": "`vnc`, `rdp`, or `none`.",
"$ref": "#/$defs/ConsoleProtocol"
},
"note": {
"description": "Why there is none, or what it needs (an extension pack).",
"type": [
"string",
"null"
]
},
"unavailable": {
"description": "Why it can't be shown now, as the status found it on a running machine: its hypervisor\ngives it no display (a VM started without one), or it doesn't answer where the hypervisor\nsays. None when it answers, or wasn't looked at: the machine doesn't run, it has none, or\nit is reached through an SSH tunnel or Proxmox's API, which a status doesn't open.",
"type": [
"string",
"null"
]
}
},
"required": [
"protocol"
]
},
"ConsoleProtocol": {
"description": "The protocol a graphical console speaks.",
"oneOf": [
{
"description": "VNC (RFB).",
"type": "string",
"const": "vnc"
},
{
"description": "Microsoft's Remote Desktop Protocol.",
"type": "string",
"const": "rdp"
},
{
"description": "No graphical console: the console's `note` says why.",
"type": "string",
"const": "none"
}
]
},
"NetworkView": {
"description": "A network of the run.",
"type": "object",
"properties": {
"name": {
"description": "Its name in the spec.",
"type": "string"
},
"cidr": {
"description": "Its block.",
"type": "string"
},
"internet": {
"description": "Whether it reaches the internet.",
"type": "boolean"
},
"native": {
"description": "Its name where the target created it (`web-portal_backend`), when known.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"cidr",
"internet"
]
},
"OutputValue": {
"description": "An output's value. A sensitive one shows as `***` wherever it is written out (its JSON, its\n`Debug`, an event); the runner keeps the value itself for its own use (a guest delivery's\naddress, masking it in what tools print).",
"type": "object",
"properties": {
"name": {
"description": "Its name.",
"type": "string"
},
"role": {
"description": "What it is for (`entry`: where a user starts, the address to open).",
"$ref": "#/$defs/OutputRole"
},
"sensitive": {
"description": "Whether the value is sensitive.",
"type": "boolean"
},
"value": {
"description": "Its value, when it can be read; `***` when it is sensitive.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"role",
"sensitive"
]
},
"OutputRole": {
"description": "What the embedder does with an output.",
"oneOf": [
{
"description": "Where to start: the address a user opens first.",
"type": "string",
"const": "entry"
},
{
"description": "An address.",
"type": "string",
"const": "address"
},
{
"description": "Anything else worth showing.",
"type": "string",
"const": "info"
}
]
},
"NativeApp": {
"description": "The hypervisor's own app that shows a running VM's screen in a window of its own, and what of\nit this computer must have (any one of `needs`).",
"type": "object",
"properties": {
"name": {
"description": "Its name as its maker writes it (`VirtualBox`, `VMware Fusion`): what a button names.",
"type": "string"
},
"needs": {
"description": "What opens it, best first: the program or app [`NativeConsole::ways`] runs, in the same\norder.",
"type": "array",
"items": {
"$ref": "#/$defs/NativeNeed"
}
}
},
"required": [
"name",
"needs"
]
},
"NativeNeed": {
"description": "What of a hypervisor's app must be on this computer for a way to open it.",
"oneOf": [
{
"description": "A program, by its name on `PATH` or its full path.",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "program"
},
"at": {
"type": "string"
}
},
"required": [
"kind",
"at"
]
},
{
"description": "A macOS app bundle.",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "mac_app"
},
"at": {
"type": "string"
}
},
"required": [
"kind",
"at"
]
},
{
"description": "The default browser (a web console).",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "browser"
}
},
"required": [
"kind"
]
}
]
}
}
}