instance-kvm-cluster-input-schema.json 5.32 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 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 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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",

  "title": "Input Parameters",
  "properties": {
    "frontend": {
      "frontend-instance-guid": {
        "title": "Frontend Instance ID",
        "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
        "type": "string",
        "default": "SOFTINST-11031"
      },
      "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"
      },
      "type": "object"
    },
    "kvm-partition-dict": {
      "description": "kvm instances definition",
      "patternProperties": {
        ".*": {
            "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
              },
          
              "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
              },
          
              "use-tap": {
                "title": "Use QEMU TAP network interface",
                "description": "Use QEMU TAP network interface, requires a bridge on SlapOS Node. If false, use user-mode network stack (NAT).",
                "type": "boolean",
                "default": false
              },
              "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": "string"
              }
            },
          "type": "object"
        }
      },
      "type": "object"
    }
  }
}