instance-kvm-cluster-input-schema.json 25.5 KB
Newer Older
1 2 3 4 5 6
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Input Parameters",
  "properties": {
    "frontend": {
7 8 9 10 11 12
      "title": "KVM frontend (web socket)",
      "description": "Front end used to provide VNC.",
      "properties": {
        "frontend-instance-guid": {
          "title": "Frontend Instance ID",
          "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
13
          "type": "string"
14 15 16
        },
        "frontend-software-type": {
          "title": "Frontend Software Type",
17
          "description": "Type of the frontend instance, like \"RootSoftwareInstance\".",
18
          "type": "string",
19
          "default": "RootSoftwareInstance"
20 21 22 23 24 25
        },
        "frontend-software-url": {
          "title": "Frontend Software URL",
          "description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
          "type": "string",
          "format": "uri",
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
        },
        "frontend-additional-instance-guid": {
          "title": "Additional Frontend Instance ID",
          "description": "Unique identifier of the additional frontend instance, like \"SOFTINST-11031\", if empty won't be requested.",
          "type": "string"
        },
        "frontend-additional-software-type": {
          "title": "Additional Frontend Software Type",
          "description": "Type of the frontend instance, like \"RootSoftwareInstance\".",
          "type": "string",
          "default": "RootSoftwareInstance"
        },
        "frontend-additional-software-url": {
          "title": "Additional Frontend Software URL",
          "description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
          "type": "string",
          "format": "uri",
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
45
        }
46 47 48
      },
      "type": "object"
    },
49
    "slave-frontend": {
50 51 52 53 54 55 56 57 58 59 60 61 62
      "title": "Web frontend",
      "description": "Front end used to provide web access for internal services at the kvm.",
      "properties": {
        "instance-guid": {
          "title": "Main Frontend Instance ID",
          "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
          "type": "string",
          "default": ""
        },
        "frontend-software-type": {
          "title": "Frontend Software Type",
          "description": "Type of the frontend instance, like \"frontend\".",
          "type": "string",
63
          "default": "custom-personal"
64 65 66 67 68 69
        },
        "frontend-software-url": {
          "title": "Frontend Software URL",
          "description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
          "type": "string",
          "format": "uri",
70
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
71 72 73 74 75 76
        },
        "slave-frontend-dict": {
          "title": "Slave Front end definition",
          "description": "Slave Front end definition",
          "patternProperties": {
            ".*": {
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
              "properties": {
                "domain": {
                  "title": "Name of the domain to be used",
                  "description": "Name of the domain to be used (example: mydomain.com). Subdomains of this domain will be used for the slave instances (example: instance12345.mydomain.com).",
                  "type": "string",
                  "default": ""
                },
                "url": {
                  "title": "URL of backend to use.",
                  "description": "URL of backend to use. This URL will be used to request frontend if parameter 'kvm-partition-name' is not set.",
                  "format": "uri",
                  "type": "string",
                  "default": ""
                },
                "enable-cache": {
92
                  "title": "Use cache for this slave frontend.",
93 94 95 96 97 98 99 100 101 102 103
                  "description": "Specify if slave frontend should use a squid to connect to backend.",
                  "type": "boolean",
                  "default": false
                },
                "type": {
                  "title": "Specify if slave frontend will redirect to a zope backend.",
                  "description": "If specified, Apache RewriteRule will use Zope's Virtual Host Daemon. Possible values: 'zope', 'default'.",
                  "type": "string",
                  "default": "default"
                },
                "zope-path": {
104
                  "title": "Path to the VirtualHostRoot of the zope.",
105 106 107 108 109
                  "description": "Only used if type is 'zope'. Will append the specified path to the VirtualHostRoot of the zope's VirtualHostMonster.",
                  "type": "string",
                  "default": ""
                },
                "https-only": {
110
                  "title": "Access website with https url only.",
111 112 113 114
                  "description": "Specify if website should be accessed using https only. If so, the frontend will redirect the user to https if accessed from http.",
                  "type": "boolean",
                  "default": false
                },
115
                "kvm-partition-name": {
116 117
                  "title": "Reference name in kvm instance definition to get url from.",
                  "description": "Compose url from kvm definition. Only work if 'use-nat' is true and 'service-port' is set. This will allow to get URL from defined nat-rules. Play the same as url, but help if you don't know kvm ipv6 yet.",
118 119 120 121
                  "type": "string",
                  "default": ""
                },
                "service-port": {
122 123
                  "title": "Port of service into the VM (require: kvm-name).",
                  "description": "This will allow to get URL from defined nat-rules. The port should exist in nat-rules of KVM you have referenced by 'kvm-partition-name'",
124
                  "type": "integer"
125 126
                },
                "url-scheme": {
127 128
                  "title": "Scheme of HTTP service into the VM (require: kvm-name).",
                  "description": "Say If HTTP service to run/or running into the Virtual Machine will use http or https. Possible values: http, https.",
129
                  "type": "string",
130 131 132 133
                  "enum": [
                    "http",
                    "https"
                  ],
134 135 136
                  "default": "http"
                }
              },
137 138 139
              "type": "object"
            }
          },
140
          "type": "object"
141
        }
142 143 144
      },
      "type": "object"
    },
145 146 147 148
    "fw-restricted-access": {
      "title": "Restrict all access to VM with firewall.",
      "description": "When Firewall is enabled, this parameter define if only vm of this cluster and authorized sources ip should have access to cluster.",
      "type": "string",
149 150 151 152
      "enum": [
        "on",
        "off"
      ],
153 154 155
      "default": "off"
    },
    "fw-authorized-sources": {
156 157 158 159
      "title": "List of IP/Network address authorized to cluster.",
      "description": "When Firewall is enabled, this contain the list of IP address to authorize for access to all VM of this cluster.",
      "type": "array",
      "optional": true
160 161
    },
    "fw-reject-sources": {
162 163 164 165
      "title": "List of IP/Network address rejected, if 'Restrict all access' is off.",
      "description": "When Firewall is enabled, this contain the list of IP address which should not access to all VM of this cluster.",
      "type": "array",
      "optional": true
166
    },
167
    "authorized-keys": {
168 169 170
      "title": "Public keys for virtual machines.",
      "description": "Set the list of public keys to add in your virtual machine. The public key file will be available in the VM via url http://10.0.2.100/authorized_keys if you keep the NAT interface enabled",
      "type": "array"
171
    },
172 173 174
    "bootstrap-script-url": {
      "title": "Virtual Machines bootstrap script URL.",
      "description": "If dedicaced disk image is used, this script will be downloaded and run at first boot of the virtual machine. Set md5sum to URL like: http://example.com/file#MD5SUM. Get file in vm at http://10.0.2.100/vm-bootstrap.",
175 176
      "type": "string",
      "format": "uri"
177
    },
178 179 180 181 182
    "cluster-data": {
      "title": "Text content to share with virtual machines.",
      "description": "Text content which will be written in a file data of cluster http server. All VM will be able to download that file via the static URL of cluster HTTP server: https://10.0.2.101/FOLDER_HASH/data.",
      "type": "string"
    },
183
    "monitor-interface-url": {
184 185 186 187 188
      "title": "Monitor Web Interface URL",
      "description": "Give Url of HTML web interface that will be used to render this monitor instance.",
      "type": "string",
      "format": "uri",
      "default": "https://monitor.app.officejs.com"
189 190
    },
    "monitor-cors-domains": {
191 192 193 194
      "title": "Monitor CORS domains",
      "description": "List of cors domains separated with space. Needed for ajax query on this monitor instance from a different domain.",
      "type": "string",
      "default": "monitor.app.officejs.com"
195
    },
196
    "kvm-partition-dict": {
197
      "title": "kvm instances definition",
198 199 200
      "description": "kvm instances definition",
      "patternProperties": {
        ".*": {
201
          "properties": {
202 203 204 205 206 207
            "computer-guid": {
              "title": "ID of the computer where to deploy this VM.",
              "description": "Unique identifier of the computer, like \"COMP-1234\". By default, let Master choose a computer.",
              "type": "string",
              "default": ""
            },
208 209 210 211 212
            "state": {
              "title": "State of this Virtual Machine",
              "description": "Define if SlapOS should start or stop this VM.",
              "type": "string",
              "default": "started",
213 214 215 216
              "enum": [
                "started",
                "stopped"
              ]
217
            },
218 219 220 221 222 223
            "enable-device-hotplug": {
              "title": "Enable device hotplug mode",
              "description": "If yes, this will allow to Create devices like CPU and Memory in hotplug mode without restart the VM. Operatin System should be configured to Online new created devices.",
              "type": "boolean",
              "default": false
            },
224 225 226 227 228
            "ram-size": {
              "title": "RAM size",
              "description": "RAM size, in MB.",
              "type": "integer",
              "default": 1024,
229 230
              "minimum": 1024,
              "multipleOf": 512
231
            },
232 233
            "ram-max-size": {
              "title": "Maximum RAM size, in MB",
234
              "description": "Define the maximum size of the memory. The size is in MB and should be a multiple of 512. Defaults to ram-size + 512",
235 236 237 238 239
              "type": "integer",
              "minimum": 1024,
              "multipleOf": 512
            },
            "ram-hotplug-slot-size": {
240 241 242 243
              "title": "Size of Hotpluggable RAM slot, in MB",
              "description": "Define the RAM size to plug on one hotpluggable slot in MB, understand the size of one RAM bar. The RAM hotplugged on each slot will always have the same RAM size.",
              "type": "integer",
              "default": 512,
244 245
              "minimum": 512,
              "multipleOf": 512
246
            },
247 248 249 250 251 252
            "auto-ballooning": {
              "title": "Enable qemu auto ballooning.",
              "description": "Enable virtio balloon device to allows KVM guests to reduce/re-increase their memory size.",
              "type": "boolean",
              "default": true
            },
253 254 255 256 257
            "disk-size": {
              "title": "Disk size",
              "description": "Disk size, in GB.",
              "type": "integer",
              "default": 10,
258
              "minimum": 1
259
            },
260
            "disk-format": {
261 262
              "title": "Disk format.",
              "description": "Format of QEMU disk drive, to create.",
263 264
              "type": "string",
              "default": "qcow2",
265 266 267 268 269 270 271 272
              "enum": [
                "qcow2",
                "raw",
                "vdi",
                "vmdk",
                "cloop",
                "qed"
              ]
273
            },
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
            "disk-type": {
              "title": "Disk type",
              "description": "Type of QEMU disk drive.",
              "type": "string",
              "default": "virtio",
              "enum": [
                "ide",
                "scsi",
                "sd",
                "mtd",
                "floppy",
                "pflash",
                "virtio"
              ]
            },
289 290 291 292 293
            "disk-cache": {
              "title": "Cache option to use with Disk.",
              "description": "Disk cache controls how the host cache is used to access block data.",
              "type": "string",
              "default": "writeback",
294 295 296 297 298 299 300
              "enum": [
                "none",
                "writeback",
                "unsafe",
                "directsync",
                "writethrough"
              ]
301 302 303 304 305 306
            },
            "disk-aio": {
              "title": "Disk aio to use.",
              "description": "Selects between pthread based disk I/O and native Linux AIO.",
              "type": "string",
              "default": "threads",
307 308 309 310
              "enum": [
                "threads",
                "native"
              ]
311
            },
312 313 314 315
            "cpu-count": {
              "title": "CPU count",
              "description": "Number of CPU cores.",
              "type": "integer",
316
              "minimum": 1
317
            },
318 319
            "cpu-max-count": {
              "title": "Maximum CPU amount",
320
              "description": "Specifies the maximum number of CPUs. Defaults to cpu-count + 1",
321
              "type": "integer",
322
              "minimum": 1
323 324
            },
            "numa": {
325 326
              "title": "Simulate a multi node NUMA system.",
              "description": "Simulate a multi node NUMA system. If mem and cpus are omitted, resources are split equally. Each numa option are separated by space: node,nodeid=4,cpus=40-49,mem=64g node,nodeid=1,cpus=10-19,mem=128g. Set this option if you know what you're doing.",
327 328
              "type": "string"
            },
329 330 331 332 333 334 335 336
            "machine-options": {
              "title": "Machine options.",
              "description": "Select the emulated machine by name. Ex: pc-i440fx-2.4,accel=kvm",
              "type": "string"
            },
            "cpu-model": {
              "title": "CPU model.",
              "description": "Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx",
337 338
              "type": "string",
              "default": "host"
339
            },
340
            "nbd-host": {
341
              "title": "NBD hostname or IP",
342 343
              "description": "hostname (or IP) of the NBD server containing the boot image.",
              "type": "string",
344
              "format": "internet-address"
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
            },
            "nbd-port": {
              "title": "NBD port",
              "description": "Port of the NBD server containing the boot image.",
              "type": "integer",
              "default": 1024,
              "minimum": 1,
              "maximum": 65535
            },
            "virtual-hard-drive-url": {
              "title": "Existing disk image URL",
              "description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
              "format": "uri",
              "type": "string"
            },
            "virtual-hard-drive-md5sum": {
              "title": "Checksum of virtual hard drive",
              "description": "MD5 checksum of virtual hard drive, used if virtual-hard-drive-url is specified.",
              "type": "string"
            },
            "virtual-hard-drive-gzipped": {
366
              "title": "Virtual hard drive to download is gzipped",
367 368 369 370
              "description": "Define if virtual hard drive to download is gzipped using gzip. This help to reduce size of file to download.",
              "type": "boolean",
              "default": false
            },
371 372 373 374 375 376
            "hard-drive-url-check-certificate": {
              "title": "Check certificate when downloading virtual hard drive from https.",
              "description": "Define if certificate should be checked when downloading virtual hard drive from https url.",
              "type": "boolean",
              "default": true
            },
377 378 379 380 381 382 383 384
            "external-disk-number": {
              "title": "Number of additional disk to create for virtual machine",
              "description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.",
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "external-disk-size": {
385
              "title": "Size of additional disk to create for virtual machine, in Gigabytes",
386
              "description": "Specify the size of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.",
387
              "type": "integer",
388
              "minimum": 5,
389 390
              "default": 20
            },
391 392 393 394 395
            "external-disk-format": {
              "title": "Type of external disk drive to create by QEMU.",
              "description": "Type of QEMU disk drive, to create.",
              "type": "string",
              "default": "qcow2",
396 397 398 399 400 401 402 403
              "enum": [
                "qcow2",
                "raw",
                "vdi",
                "vmdk",
                "cloop",
                "qed"
              ]
404
            },
405 406 407 408 409 410 411 412 413 414 415
            "wipe-disk-ondestroy": {
              "title": "Wipe disks when destroy the VM",
              "description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
              "type": "boolean",
              "default": false
            },
            "wipe-disk-iterations": {
              "title": "Wipe disk iterations",
              "description": "Number of disk overwrite iterations with random data. Default is 1. WARNING: Increase this value will slow down partition destruction and increase IO.",
              "type": "integer",
              "default": 1,
416
              "minimum": 1
417
            },
418
            "use-tap": {
419
              "title": "Enable QEMU TAP network interface",
420 421
              "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
              "type": "boolean",
422
              "default": true
423 424
            },
            "use-nat": {
425
              "title": "Enable QEMU USER Mode interface (NAT)",
426 427 428
              "description": "Use QEMU user-mode network stack (NAT).",
              "type": "boolean",
              "default": true
429
            },
430 431
            "nat-rules": {
              "title": "List of rules for NAT of QEMU user mode network stack.",
432
              "description": "List of rules for NAT of QEMU user mode network stack, as comma-separated list of ports. For each port specified, it will redirect port x of the VM (example: 80) to the port x + 10000 of the public IPv6 (example: 10080). Defaults to \"22 80 443\".",
433
              "type": "array",
434 435 436 437 438 439
              "default": []
            },
            "nat-restrict-mode": {
              "title": "Isolate the NAT Interface (No Internet access)",
              "description": "If this option is enabled, the NAT interface will be isolated, i.e. it will not be able to contact the host and no guest IP packets will be routed over the host to the outside. This option does not affect any explicitly set nat rules.",
              "type": "boolean",
440
              "default": false
441
            },
442 443 444 445 446 447
            "enable-vhost": {
              "title": "Use vhost-net to improve network performance of tap interface",
              "description": "The vhost-net provides much improved network performance for your VM. Only work if the vhost-net kernel module is loaded and available on host machine, please keep this option off if you're not shure.",
              "type": "boolean",
              "default": false
            },
448 449 450
            "bootstrap-script-url": {
              "title": "VM bootstrap script URL.",
              "description": "If dedicaced disk image is used, this script will be downloaded and run at first boot of the virtual machine. Set md5sum to URL like: http://example.com/file#MD5SUM. Get file in vm at http://10.0.2.100/vm-bootstrap.",
451 452
              "type": "string",
              "format": "uri"
453
            },
454 455 456 457
            "data-to-vm": {
              "title": "Text content to send to this virtual machine.",
              "description": "Text content which will be written in a file 'data' of http server of this virtual machine instance. The file will be available via URL: http://10.0.2.100/data in the VM.",
              "type": "string"
Alain Takoudjou's avatar
Alain Takoudjou committed
458
            },
459 460 461
            "disable-ansible-promise": {
              "title": "Desactivate Ansible promise check",
              "description": "If the VM of cluster doesn't run Ansible and report status to this SlapOS instances, then this allow to disable ansible promise so your instance will not fail to check ansible promise.",
Alain Takoudjou's avatar
Alain Takoudjou committed
462
              "type": "boolean",
463
              "default": false
464 465 466
            },
            "boot-image-url-list": {
              "title": "Boot image list",
467
              "description": "The list shall be list of direct URLs to images, followed by hash (#), then by image MD5SUM. Each image shall appear on newline, like: \"https://example.com/image.iso#06226c7fac5bacfa385872a19bb99684<newline>https://example.com/another-image.iso#31b40d58b18e038498ddb46caea1361c\". They will be provided in KVM image list according to the order on the list. After updating the list, the instance has to be restarted to refresh it. Amount of images is limited to 4, and one image can be maximum 10G. Image will be downloaded and checked against its MD5SUM 4 times, then it will be considered as impossible to download with given MD5SUM. Each image has to be downloaded in time shorter than 4 hours, so in case of very slow images to access, it can take up to 16 hours to download all of them. Note: The instance has to be restarted in order to update the list of available images in the VM. Note: Maximum 3 ISOs are supported.",
468
              "type": "string",
469
              "textarea": true
470 471 472 473 474 475
            },
            "boot-image-url-select": {
              "title": "Boot image",
              "type": "array",
              "oneOf": [
                {
476 477 478
                  "const": [
                    "https://shacache.nxdcdn.com/0a6aee1d9aafc1ed095105c052f9fdd65ed00ea9274188c9cd0072c8e6838ab40e246d45a1e6956d74ef1b04a1fc042151762f25412e9ff0cbf49418eef7992e#a3ebc76aec372808ad80000108a2593a"
                  ],
479 480 481
                  "title": "Debian Buster 10.5 netinst x86_64"
                },
                {
482 483 484
                  "const": [
                    "https://shacache.nxdcdn.com/ce5ddfdbdaccdf929b7fe321212356347d82a02f6b7733427282b416f113d91e587682b003e9d376ac189c3b731595c50c236962aadf2720c16d9f36913577c0#23bf2a2d60271e553e63525e794415f1"
                  ],
485 486 487
                  "title": "Centos 8.2004 Minimal x86_64"
                },
                {
488 489 490
                  "const": [
                    "https://shacache.nxdcdn.com/302c990c6d69575ff24c96566e5c7e26bf36908abb0cd546e22687c46fb07bf8dba595bf77a9d4fd9ab63e75c0437c133f35462fd41ea77f6f616140cd0e5e6a#f3a306f40e4a313fb5a584d73b3dee8f"
                  ],
491 492 493
                  "title": "Ubuntu Focal 20.04.1 Live Server x86_64"
                },
                {
494 495 496
                  "const": [
                    "https://shacache.nxdcdn.com/6635269a7eb6fbd6b85fda40cd94f14a27bf53cb1fc82ffcce9fe386a025a43e1ab681db7e8cec50416bfbfc90262f0d95273686a101c74b3f17646f0a34c85b#3708a59af6cf820a95cafe0ae73ac399"
                  ],
497 498 499
                  "title": "openSUSE Leap 15.2 NET x86_64"
                },
                {
500 501 502
                  "const": [
                    "https://shacache.nxdcdn.com/fc17e8c6ae0790162f4beb8fa6226d945cff638429588999b3a08493ff27b280dc2939fba825ae04be1d9082ea8d7c3c002c5e4c39fbbcf88b8ab5104619e28a#ebcdb2223a77f098af3923fe1fa180aa"
                  ],
503 504 505
                  "title": "Arch Linux 2020.09.01 x86_64"
                },
                {
506 507 508
                  "const": [
                    "https://shacache.nxdcdn.com/c5a511f349a1146b615e6fab9c24f9be4362046adcf24f0ff82c470d361fac5f6628895e2110ebf8ff87db49d4c413a0a332699da6b1bec64275e0c17a15b999#ca7a1e555c04b4d9a549065fa2ddf713"
                  ],
509 510 511
                  "title": "Fedora Server 32-1.6 netinst x86_64"
                },
                {
512 513 514
                  "const": [
                    "https://shacache.nxdcdn.com/6c355def68b3c0427f21598cb054ffc893568902f205601ac60f192854769b31bc9cff8eeb6ce99ef975a8fb887d8d3e56fc6cd5ea5cb4b3bba1175c520047cb#57088b77f795ca44b00971e44782ee23"
                  ],
515 516 517
                  "title": "FreeBSD 12.1 RELEASE bootonly x86_64"
                }
              ]
518 519 520 521 522 523
            },
            "whitelist-domains": {
              "title": "Whitelist domains",
              "description": "List of whitelisted domain names to be accessed from the VM. They will be resolved to IPs depending on where the VM end up. IPs can be used too.",
              "type": "string",
              "textarea": true
524 525
            }
          },
526 527 528 529 530 531
          "type": "object"
        }
      },
      "type": "object"
    }
  }
532
}