instance-kvm-input-schema.json 7.65 KB
Newer Older
1
{
2 3 4 5
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",

  "title": "Input Parameters",
6 7 8 9 10 11 12
  "properties": {
    "ram-size": {
      "title": "RAM size",
      "description": "RAM size, in MB.",
      "type": "integer",
      "default": 1024,
      "minimum": 128,
13
      "multipleOf": 128
14 15 16 17 18 19 20
    },
    "disk-size": {
      "title": "Disk size",
      "description": "Disk size, in GB.",
      "type": "integer",
      "default": 10,
      "minimum": 1,
21
      "maximum": 1000
22
    },
23 24 25 26 27 28 29 30 31 32 33 34
    "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",
35
      "minimum": 1
36
    },
37
    "cpu-options": {
38 39
      "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.",
40 41 42
      "type": "string"
    },
    "numa": {
43 44
      "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.",
45 46
      "type": "string"
    },
47

48
    "nbd-host": {
49 50 51 52 53 54 55 56 57 58 59 60 61 62
      "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
    },
63

Cédric de Saint Martin's avatar
Cédric de Saint Martin committed
64 65 66 67
    "nbd2-host": {
      "title": "Second NBD hostname",
      "description": "hostname (or IP) of the second NBD server (containing drivers for example).",
      "type": "string",
Cédric de Saint Martin's avatar
Cédric de Saint Martin committed
68
      "format": ["host-name", "ip-address", "ipv6"]
Cédric de Saint Martin's avatar
Cédric de Saint Martin committed
69 70 71 72 73 74 75 76 77
    },
    "nbd2-port": {
      "title": "Second NBD port",
      "description": "Port of the second NBD server containing the boot image.",
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },

78 79 80 81
    "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",
82
      "type": "string"
83
    },
84 85 86
    "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.",
87
      "type": "string"
88
    },
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
    "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,
      "default": 0
    },
    "external-disk-size": {
104 105
      "title": "Size of additional disk to create for virtual machine, in Gigabytes",
      "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.",
106
      "type": "integer",
107
      "minimum": 10,
108
      "maximum": 1000,
109 110
      "default": 20
    },
111 112 113 114 115
    "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",
116
      "enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
117
    },
118

119 120
    "use-tap": {
      "title": "Use QEMU TAP network interface",
121
      "description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
122 123 124
      "type": "boolean",
      "default": false
    },
125 126 127 128 129 130
    "use-nat": {
      "title": "Use QEMU USER Mode networking",
      "description": "Use QEMU user-mode network stack (NAT).",
      "type": "boolean",
      "default": true
    },
131 132 133
    "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.",
134
      "type": "string"
135
    },
136 137 138 139 140 141
    "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
    },
Alain Takoudjou's avatar
Alain Takoudjou committed
142 143 144 145 146 147
    "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
    },
148 149 150 151 152 153 154 155 156 157 158 159 160 161
    "enable-http-server": {
      "title": "Enable local http server",
      "description": "Set if local http server which serve files to the vm should be deployed. If set to true, get file into the vm with URL: http://10.0.2.100/FILE.",
      "type": "boolean",
      "default": false
    },
    "httpd-port": {
      "title": "Local http server port",
      "description": "Port of the local http server used to share files.",
      "type": "integer",
      "default": 8081,
      "minimum": 1,
      "maximum": 65535
    },
162
    "authorized-key": {
163
      "title": "Public keys to get from all virtual machines.",
164 165 166 167 168 169
      "description": "Set the 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": "string"
    },
    "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.",
170 171
      "type": "string"
    },
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
    "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"
    }
  }
}