the existing infrastructure
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://example.com/schemas/vm.schema.json",
|
||||
"title": "Virtual machine",
|
||||
"description": "Contract between the VM files in envs/*/vms/ and modules/vm. CI validates every file against it; Quai renders its form from it.",
|
||||
"type": "object",
|
||||
"required": ["template", "cpu", "memory_gb", "disks", "network"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"owner": { "type": "string", "title": "Owner" },
|
||||
"description": { "type": "string", "title": "Description", "maxLength": 200 },
|
||||
"template": {
|
||||
"type": "string",
|
||||
"title": "OS template",
|
||||
"enum": ["ubuntu-24.04", "rhel-9", "windows-2022"],
|
||||
"default": "ubuntu-24.04"
|
||||
},
|
||||
"cpu": { "type": "integer", "title": "vCPUs", "minimum": 1, "maximum": 32, "default": 2 },
|
||||
"memory_gb": { "type": "integer", "title": "Memory (GB)", "minimum": 1, "maximum": 256, "default": 4 },
|
||||
"disks": {
|
||||
"type": "array",
|
||||
"title": "Disks",
|
||||
"minItems": 1,
|
||||
"maxItems": 8,
|
||||
"items": { "$ref": "#/$defs/disk" },
|
||||
"default": [{ "size_gb": 50, "tier": "standard" }]
|
||||
},
|
||||
"network": {
|
||||
"type": "object",
|
||||
"title": "Network",
|
||||
"required": ["vlan"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"vlan": { "type": "integer", "title": "VLAN", "enum": [110, 120, 130], "default": 110 },
|
||||
"ip": { "type": "string", "title": "Static IP", "format": "ipv4", "description": "Leave empty for DHCP." }
|
||||
}
|
||||
},
|
||||
"backup": { "type": "boolean", "title": "Backup", "default": true },
|
||||
"backup_policy": { "type": "string", "title": "Backup policy", "enum": ["daily", "hourly"], "default": "daily" },
|
||||
"tags": {
|
||||
"type": "object",
|
||||
"title": "Tags",
|
||||
"additionalProperties": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"disk": {
|
||||
"type": "object",
|
||||
"required": ["size_gb"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"size_gb": { "type": "integer", "title": "Size (GB)", "minimum": 10, "maximum": 4096 },
|
||||
"tier": { "type": "string", "title": "Tier", "enum": ["standard", "ssd"], "default": "standard" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user