{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://zenika.com/strigo.schema.json", "title": "Strigo", "description": "A Zenika Strigo Class configuration", "type": "object", "properties": { "$schema": { "type": "string" }, "id": { "description": "The Strigo ID of the class, shouldn't be changed", "type": "string" }, "name": { "description": "The name of the class", "type": "string" }, "description": { "description": "The list of lines of description of the class (can be empty list `[]`)", "type": "array", "items": { "type": "string" } }, "labels": { "description": "The list of labels of the class (can be empty list `[]`)", "type": "array", "items": { "type": "string" } }, "presentations": { "description": "The list of presentation materials (1 and only 1 element)", "type": "array", "minItems": 1, "maxItems": 1, "items": { "type": "object", "properties": { "file": { "description": "The path to presentation file (typically `pdf/Zenika-Formation-xxx-Slides.pdf` or `pdf/Zenika-training-material-Slides.pdf`)", "type": "string" }, "notes_source": { "description": "The path to the listing of slides for notes extraction (should be `Slides/slides.json`)", "type": "string", "default": "Slides/slides.json" } }, "additionalProperties": false, "required": [ "file" ] } }, "resources": { "description": "The list of lab machines", "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "name": { "description": "The display name of the machine", "type": "string" }, "instance_type": { "description": "The size of the machine (one of `t3.medium`, `t3.large` or `t3.xlarge`", "type": "string", "enum": [ "t3.medium", "t3.large", "t3.xlarge", "t3a.micro", "t3a.small", "t3a.medium", "t3a.large", "t3a.xlarge" ] }, "image": { "description": "The machine image, can be the normalized name of the preconfigured Strigo images (lower case, space replaced by simple hyphen `-`), or a custom image", "oneOf": [ { "description": "A predefined image (deprecated in favor of '{\"image_name\": this_value}'", "$ref": "#/$defs/strigo_image_name", "deprecated": true }, { "description": "A predefined image", "type": "object", "properties": { "image_name": { "$ref": "#/$defs/strigo_image_name" } }, "additionalProperties": false, "required": [ "image_name" ] }, { "description": "A custom image", "type": "object", "properties": { "image_id": { "description": "The AMI ID", "$ref": "#/$defs/ec2_ami" }, "image_user": { "description": "The default user of the AMI", "type": "string" }, "ec2_region": { "description": "The region of the AMI", "$ref": "#/$defs/ec2_region" }, "image_region_mapping": { "description": "A list of alternative AMIs for other regions", "type": "object", "propertyNames": { "description": "The region of the AMI", "$ref": "#/$defs/ec2_region" }, "patternProperties": { "": { "description": "The AMI ID", "$ref": "#/$defs/ec2_ami" } } } }, "additionalProperties": false, "required": [ "image_id", "image_user" ] } ] }, "is_windows": { "description": "Flag the machine as a Windows machine to interpret 'init_scripts' as powershell", "type": "boolean", "default": false }, "init_scripts": { "description": "The list of init scripts to use for the machine, content of all the scripts will be concatenated into 1 init script in Strigo", "type": "array", "items": { "$ref": "#/$defs/script" } }, "post_launch_scripts": { "description": "The list of post launch batch scripts (Windows only) to use for the machine, content of all the scripts will be concatenated into 1 init script in Strigo", "type": "array", "items": { "$ref": "#/$defs/script" } }, "view_interface": { "description": "The default interface of the machine", "oneOf": [ { "type": "null" }, { "type": "string", "enum": [ "terminal", "desktop" ] } ] }, "webview_links": { "description": "The list of web interfaces of the machine", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "The name of the interface", "type": "string" }, "url": { "description": "The URL of the interface (something of the form `http://instance.autolab.strigo.io:`)", "type": "string", "pattern": "https?://(instance.autolab.strigo.io:[0-9]+|.*)/?.*" } }, "additionalProperties": false, "required": [ "name", "url" ] } } }, "additionalProperties": false, "required": [ "name", "instance_type" ] } } }, "additionalProperties": false, "required": [ "id", "name", "presentations", "resources" ], "$defs": { "strigo_image_name": { "type": "string", "enum": [ "debian-8.7", "debian-11", "ubuntu-16.04.2", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-22.04-desktop", "amazon-linux-v2.0.20221210.1", "docker-17.09.0-ce", "windows-server-2016", "windows-server-2019", "centos-7.9" ] }, "ec2_ami": { "type": "string", "pattern": "^ami-[0-9a-f]{8,}$" }, "ec2_region": { "type": "string", "enum": [ "eu-west-1", "eu-west-2", "eu-west-3", "us-west-1", "us-west-2", "us-east-1", "us-east-2", "ca-central-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1" ] }, "script": { "oneOf": [ { "description": "A local script (deprecated in favor of '{\"path\": this_value}'", "type": "string", "deprecated": true }, { "description": "A local script", "type": "object", "properties": { "path": { "description": "The path of the local script", "type": "string" } }, "additionalProperties": false, "required": [ "path" ] }, { "description": "A remote script from https://github.com/Zenika-Training/strigo-init-script-libs", "type": "object", "properties": { "script": { "description": "The filename of the script", "type": "string" }, "version": { "description": "The git version of the script to get", "type": "string", "default": "main" }, "env": { "description": "The mapping of environment variables for the script", "type": "object" } }, "additionalProperties": false, "required": [ "script" ] } ] } } }