0
0
{
"lexicon": 1,
"id": "com.publicdomainrelay.temp.compute.vm",
"description": "A requested virtual machine: the payload of a compute RFP.",
"defs": {
"main": {
"type": "record",
"key": "any",
"record": {
"type": "object",
"required": ["role"],
"properties": {
"role": { "type": "string", "description": "The VM name within the requester's contract." },
"kind": { "type": "string", "knownValues": ["vm", "deno"], "description": "What the bidder runs for this request: a firecracker virtual machine (the default when absent), or a deno sandbox that runs user_data as its program and reports its output as a guest event." },
"cpus": { "type": "integer", "minimum": 1, "description": "vCPUs for the VM; the requester writes 2 unless the contract says otherwise, and the bidder takes 2 when absent." },
"mem": { "type": "string", "description": "Guest memory size, such as 4G; the requester writes 4G unless the contract says otherwise, and the bidder takes 4G when absent." },
"nestedVirt": { "type": "boolean", "description": "The VM must run VMs of its own; only a bidder whose offering sets nestedVirt runs it." },
"disk": { "type": "string", "description": "Disk size, such as 50G (the requester always writes 50G). A requester image's kernel and rootfs together fit in it." },
"image": { "type": "ref", "ref": "#image" },
"network": { "type": "string", "description": "Network transfer allowance, such as 500G; the requester writes none and the bidder ignores it today." },
"location": { "type": "ref", "ref": "#location", "description": "Where the VM should run; the requester writes none and the bidder ignores it today." },
"user_data": { "type": "string", "description": "cloud-init user data." },
"net": { "type": "boolean", "description": "kind deno: the program reaches the public internet (never loopback, link-local or private ranges). A bidder runs it only for its owner: the requester is the bidder's DID, its operator, or associated to that operator." },
"expiresAt": { "type": "string", "format": "datetime", "description": "When the requester wants the VM ended. The bidder ends it then (it may end it earlier by its own policy) and refuses an RFP whose expiresAt has passed; without it, the bidder ends the VM 24 h after the accept." },
"createdAt": { "type": "string", "format": "datetime" }
}
}
},
"image": {
"type": "object",
"description": "kind vm: a requester-chosen VM image the bidder boots instead of its own pinned one; only a bidder whose offering sets images runs it.",
"required": ["url", "sha256"],
"properties": {
"url": { "type": "string", "format": "uri", "maxLength": 2048, "description": "An https base URL of a directory holding image.json, the kernel and the rootfs that image.json names." },
"sha256": { "type": "string", "minLength": 64, "maxLength": 64, "description": "The hex sha256 of that image.json; the bidder checks it before it reads the file." }
}
},
"location": {
"type": "object",
"properties": {
"country": { "type": "string" },
"region": { "type": "string" }
}
}
}
}