instance-kvm-cluster-input-schema.json 12.4 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 27 28
      "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",
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg"
        }
29 30 31
      },
      "type": "object"
    },
32
    "slave-frontend": {
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
      "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",
          "default": "default"
        },
        "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",
          "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
        },
        "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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
              "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": {
                  "title": "Specify if cached will be used for this slave frontend.",
                  "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": {
                  "title": "Specify path to the VirtualHostRoot of the zope.",
                  "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": {
                  "title": "Specify if website should be accessed using https only.",
                  "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
                },
                "kvm-partition-name": {
                  "title": "Reference name in 'kvm-partition-dict' to get IPv6 for slave frontend from.",
                  "description": "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.",
                  "type": "string",
                  "default": ""
                },
                "service-port": {
105 106 107
                  "title": "Specify the port of service to run in VM.",
                  "description": "This will allow to get URL from defined nat-rules. The port should exist in nat-rules of KVM referenced by 'kvm-partition-name'",
                  "type": "number"
108 109 110 111 112 113 114 115
                },
                "url-scheme": {
                  "title": "Say If HTTP service to run into the Virtual Machine will use http or https.",
                  "description": "Say If HTTP service to run into the Virtual Machine will use http or https. Possible values: http, https",
                  "type": "string",
                  "default": "http"
                }
              },
116 117 118 119 120
              "type": "object"
            }
          },
         "type": "object"
        }
121 122 123
      },
      "type": "object"
    },
124
    "kvm-partition-dict": {
125
      "title": "kvm instances definition",
126 127 128
      "description": "kvm instances definition",
      "patternProperties": {
        ".*": {
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
          "properties": {
            "ram-size": {
              "title": "RAM size",
              "description": "RAM size, in MB.",
              "type": "integer",
              "default": 1024,
              "minimum": 128,
              "multipleOf": 128,
              "maximum": 16384
            },
            "disk-size": {
              "title": "Disk size",
              "description": "Disk size, in GB.",
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 80
            },
            "disk-type": {
              "title": "Disk type",
              "description": "Type of QEMU disk drive.",
              "type": "string",
              "default": "virtio",
              "enum": [
                "ide",
                "scsi",
                "sd",
                "mtd",
                "floppy",
                "pflash",
                "virtio"
              ]
            },
            "cpu-count": {
              "title": "CPU count",
              "description": "Number of CPU cores.",
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            },
169 170 171 172 173 174 175 176 177 178
            "cpu-options": {
              "title": "Additional options (cores, threads, sockets, maxcpus) to use with cpu-count.",
              "description": "Additional options to use with cpu-count. Options are separated by coma: [cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]. Only set this option if you really know what you're doing.",
              "type": "string"
            },
            "numa": {
              "title": "Simulate a multi node NUMA system. If mem and cpus are omitted, resources are split equally.",
              "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. Only set this option if you really know what you're doing.",
              "type": "string"
            },
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
            "nbd-host": {
              "title": "NBD hostname",
              "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
            },
            "nbd2-host": {
              "title": "Second NBD hostname",
              "description": "hostname (or IP) of the second NBD server (containing drivers for example).",
              "type": "string",
              "format": [
                "host-name",
                "ip-address",
                "ipv6"
              ]
            },
            "nbd2-port": {
              "title": "Second NBD port",
              "description": "Port of the second NBD server containing the boot image.",
              "type": "integer",
              "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": {
              "title": "Define if virtual hard drive to download is gzipped",
              "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
            },
            "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,
              "maximum": 4,
              "default": 0
            },
            "external-disk-size": {
              "title": "Number of additional disk to create for virtual machine, in Gigabytes",
              "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": 10,
              "maximum": 100,
              "default": 20
            },
248 249 250 251 252 253 254
            "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",
              "enum": ["qcow2", "raw", "vdi", "vmdk", "cloop"]
            },
255 256 257 258 259 260 261 262 263 264 265
            "use-tap": {
              "title": "Use QEMU TAP network interface",
              "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
              "type": "boolean",
              "default": false
            },
            "use-nat": {
              "title": "Use QEMU USER Mode networking",
              "description": "Use QEMU user-mode network stack (NAT).",
              "type": "boolean",
              "default": true
266
            },
267 268 269 270 271 272 273 274 275 276 277
            "nat-rules": {
              "title": "List of rules for NAT of QEMU user mode network stack.",
              "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\". Ignored if \"use-tap\" parameter is enabled.",
              "type": "array",
              "default": [
                22,
                80,
                443
              ]
            }
          },
278 279 280 281 282 283
          "type": "object"
        }
      },
      "type": "object"
    }
  }
284
}