instance-kvm-cluster-input-schema.json 18.6 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 13 14 15 16 17 18 19 20 21 22 23 24 25 26
      "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\".",
          "type": "string",
          "default": ""
        },
        "frontend-software-type": {
          "title": "Frontend Software Type",
          "description": "Type of the frontend instance, like \"frontend\".",
          "type": "string",
          "default": "frontend"
        },
        "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",
27
          "default": "https://lab.nexedi.com/nexedi/slapos/raw/slapos-0.92/software/kvm/software.cfg"
28
        }
29 30 31
      },
      "type": "object"
    },
32
    "slave-frontend": {
33 34 35 36 37 38 39 40 41 42 43 44 45
      "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",
46
          "default": "custom-personal"
47 48 49 50 51 52
        },
        "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",
53
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
54 55 56 57 58 59
        },
        "slave-frontend-dict": {
          "title": "Slave Front end definition",
          "description": "Slave Front end definition",
          "patternProperties": {
            ".*": {
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
              "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": {
75
                  "title": "Use cache for this slave frontend.",
76 77 78 79 80 81 82 83 84 85 86
                  "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": {
87
                  "title": "Path to the VirtualHostRoot of the zope.",
88 89 90 91 92
                  "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": {
93
                  "title": "Access website with https url only.",
94 95 96 97
                  "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
                },
98
                "kvm-partition-name": {
99 100
                  "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.",
101 102 103 104
                  "type": "string",
                  "default": ""
                },
                "service-port": {
105 106
                  "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'",
107
                  "type": "integer"
108 109
                },
                "url-scheme": {
110 111
                  "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.",
112
                  "type": "string",
113
                  "enum": ["http", "https"],
114 115 116
                  "default": "http"
                }
              },
117 118 119 120 121
              "type": "object"
            }
          },
         "type": "object"
        }
122 123 124
      },
      "type": "object"
    },
125 126 127 128 129 130 131 132
    "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",
      "enum": ["on", "off"],
      "default": "off"
    },
    "fw-authorized-sources": {
133
        "title": "List of IP/Network address authorized to cluster.",
134 135 136 137 138 139 140 141 142 143
        "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
    },
    "fw-reject-sources": {
        "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
    },
144
    "authorized-keys": {
145 146 147
      "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"
148
    },
149 150 151
    "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.",
152 153
      "type": "string",
      "format": "uri"
154
    },
155 156 157 158 159
    "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"
    },
160 161 162 163 164 165 166 167 168 169 170 171
    "monitor-interface-url": {
        "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"
    },
    "monitor-cors-domains": {
        "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": ""
    },
172
    "kvm-partition-dict": {
173
      "title": "kvm instances definition",
174 175 176
      "description": "kvm instances definition",
      "patternProperties": {
        ".*": {
177
          "properties": {
178 179 180 181 182 183
            "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": ""
            },
184 185 186 187 188 189 190
            "state": {
              "title": "State of this Virtual Machine",
              "description": "Define if SlapOS should start or stop this VM.",
              "type": "string",
              "default": "started",
              "enum": ["started", "stopped"]
            },
191 192 193 194 195 196
            "ram-size": {
              "title": "RAM size",
              "description": "RAM size, in MB.",
              "type": "integer",
              "default": 1024,
              "minimum": 128,
197
              "multipleOf": 128
198
            },
199 200 201 202 203 204
            "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
            },
205 206 207 208 209 210
            "disk-size": {
              "title": "Disk size",
              "description": "Disk size, in GB.",
              "type": "integer",
              "default": 10,
              "minimum": 1,
211
              "maximum": 1000
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
            },
            "disk-type": {
              "title": "Disk type",
              "description": "Type of QEMU disk drive.",
              "type": "string",
              "default": "virtio",
              "enum": [
                "ide",
                "scsi",
                "sd",
                "mtd",
                "floppy",
                "pflash",
                "virtio"
              ]
            },
228 229 230 231 232 233 234 235 236 237 238 239 240 241
            "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",
              "enum": ["none", "writeback", "unsafe", "directsync", "writethrough"]
            },
            "disk-aio": {
              "title": "Disk aio to use.",
              "description": "Selects between pthread based disk I/O and native Linux AIO.",
              "type": "string",
              "default": "threads",
              "enum": ["threads", "native"]
            },
242 243 244 245
            "cpu-count": {
              "title": "CPU count",
              "description": "Number of CPU cores.",
              "type": "integer",
246
              "minimum": 1
247
            },
248
            "cpu-options": {
249 250
              "title": "CPU Additional options: cores, threads, sockets, maxcpus.",
              "description": "Additional options to use with cpu-count. Options are separated by coma: [cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]. Set this option if you know what you're doing.",
251 252 253
              "type": "string"
            },
            "numa": {
254 255
              "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.",
256 257
              "type": "string"
            },
258 259 260 261 262 263 264 265 266 267
            "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",
              "type": "string"
            },
268 269 270 271
            "keyboard-layout-language": {
              "title": "Use keyboard layout language",
              "description": "Use keyboard layout language (for example fr for French). Can be usefull with VNC display",
              "type": "string",
272 273
              "enum": ["ar", "da", "de", "de-ch", "en-gb", "en-us", "es", "et", "fi", "fo", "fr", "fr-be", "fr-ca", "fr-ch", "hr", "hu", "is", "it", "ja", "lt", "lv", "mk", "nl", "nl-be", "no", "pl", "pt", "pt-br", "ru", "sl", "sv", "th", "tr"],
              "default": "fr"
274
            },
275
            "nbd-host": {
276
              "title": "NBD hostname or IP",
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
              "description": "hostname (or IP) of the NBD server containing the boot image.",
              "type": "string",
              "format": [
                "host-name",
                "ip-address",
                "ipv6"
              ],
              "default": "debian.nbd.vifib.net"
            },
            "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": {
306
              "title": "Virtual hard drive to download is gzipped",
307 308 309 310
              "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
            },
311 312 313 314 315 316
            "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
            },
317 318 319 320 321 322 323 324
            "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": {
325
              "title": "Size of additional disk to create for virtual machine, in Gigabytes",
326
              "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.",
327 328
              "type": "integer",
              "minimum": 10,
329
              "maximum": 1000,
330 331
              "default": 20
            },
332 333 334 335 336
            "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",
337
              "enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
338
            },
339 340 341 342
            "use-tap": {
              "title": "Use QEMU TAP network interface",
              "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
              "type": "boolean",
343
              "default": true
344 345
            },
            "use-nat": {
346
              "title": "Use QEMU USER Mode interface (NAT)",
347 348 349
              "description": "Use QEMU user-mode network stack (NAT).",
              "type": "boolean",
              "default": true
350
            },
351 352
            "nat-rules": {
              "title": "List of rules for NAT of QEMU user mode network stack.",
353
              "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\".",
354
              "type": "array",
355 356 357 358 359 360
              "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",
361
              "default": false
362
            },
363 364 365 366 367 368
            "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
            },
369 370 371
            "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.",
372 373
              "type": "string",
              "format": "uri"
374
            },
375 376 377 378
            "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
379 380 381 382 383 384
            },
            "enable-monitor": {
              "title": "Deploy monitoring tools",
              "description": "Deploy monitor instance to this kvm instance. It help to check instance status, log and promise results.",
              "type": "boolean",
              "default": true
385 386
            }
          },
387 388 389 390 391 392
          "type": "object"
        }
      },
      "type": "object"
    }
  }
393
}