77 lines
3.2 KiB
JSON
77 lines
3.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://yovision.local/schemas/coordination/v1",
|
|
"title": "YoVision coordination deployment manifest v1",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "deployment_id", "runtime_root", "products"],
|
|
"properties": {
|
|
"schema_version": { "const": "yovision.coordination/v1" },
|
|
"deployment_id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,63}$" },
|
|
"runtime_root": { "type": "string", "minLength": 1 },
|
|
"products": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["sense", "brain", "bell"],
|
|
"properties": {
|
|
"sense": { "$ref": "#/$defs/product" },
|
|
"brain": { "$ref": "#/$defs/product" },
|
|
"bell": { "$ref": "#/$defs/product" }
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"command": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["executable", "arguments"],
|
|
"properties": {
|
|
"executable": { "type": "string", "minLength": 1 },
|
|
"arguments": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"identity": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["principal", "key_id", "private_key_path"],
|
|
"properties": {
|
|
"principal": { "type": "string", "pattern": "^yv:(sense|brain|bell):[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" },
|
|
"key_id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" },
|
|
"private_key_path": { "type": "string", "minLength": 1 }
|
|
}
|
|
},
|
|
"product": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["enabled", "version", "package_root", "environment_file", "data_directory", "log_directory", "ports", "browser_origin", "cookie_name", "account_namespace", "database_id", "database_role", "start", "health", "identities"],
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"version": { "type": "string", "minLength": 1 },
|
|
"package_root": { "type": "string", "minLength": 1 },
|
|
"environment_file": { "type": "string", "minLength": 1 },
|
|
"data_directory": { "type": "string", "minLength": 1 },
|
|
"log_directory": { "type": "string", "minLength": 1 },
|
|
"ports": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 65535 }, "uniqueItems": true },
|
|
"browser_origin": { "type": "string" },
|
|
"cookie_name": { "type": "string" },
|
|
"account_namespace": { "type": "string", "minLength": 1 },
|
|
"database_id": { "type": "string" },
|
|
"database_role": { "type": "string" },
|
|
"start": { "$ref": "#/$defs/command" },
|
|
"stop": { "$ref": "#/$defs/command" },
|
|
"health": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["kind", "timeout_seconds"],
|
|
"properties": {
|
|
"kind": { "enum": ["process", "http"] },
|
|
"url": { "type": "string" },
|
|
"timeout_seconds": { "type": "integer", "minimum": 1, "maximum": 300 }
|
|
}
|
|
},
|
|
"identities": { "type": "array", "items": { "$ref": "#/$defs/identity" } }
|
|
}
|
|
}
|
|
}
|
|
}
|