instance-erp5-input-schema.json 14.6 KB
Newer Older
1
{
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3 4
  "description": "Parameters to instantiate ERP5",
  "additionalProperties": false,
5 6 7 8 9 10 11
  "definitions": {
    "tcpv4port": {
      "minimum": 0,
      "maximum": 65535,
      "type": "integer"
    }
  },
12
  "properties": {
13
    "sla-dict": {
14
      "description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references (note: Zope partitions reference must be prefixed with \"zope-\").",
15 16
      "additionalProperties": {
        "type": "array",
17 18 19
        "items": {
          "type": "string"
        },
20
        "uniqueItems": true
21 22 23
      },
      "type": "object"
    },
24
    "site-id": {
25
      "description": "ERP5Site object's id. An empty value disables automatic site creation.",
26 27 28
      "default": "erp5",
      "type": "string"
    },
29
    "bt5": {
30
      "description": "Business Template to install at automatic site creation. By default, all configurators are installed.",
31 32
      "type": "string"
    },
33 34 35 36
    "id-store-interval": {
      "description": "Set Store Interval of default SQL Non Continuous Increasing Id Generator at automatic site creation. If unset, the value from the erp5_core Business Template is not touched.",
      "type": "integer"
    },
37
    "timezone": {
38
      "description": "Zope's timezone. Possible values are determined by host's libc, and typically come from a separate package (tzdata, ...)",
39 40 41
      "default": "UTC",
      "type": "string"
    },
42 43 44
    "deadlock-debugger-password": {
      "description": "Password for /manage_debug_threads",
      "type": "string"
45
    },
46 47 48 49 50 51 52 53 54
    "inituser-login": {
      "description": "Login of the initial/rescue user",
      "default": "zope",
      "type": "string"
    },
    "inituser-password": {
      "description": "Password of the initial/rescue user",
      "type": "string"
    },
55
    "developer-list": {
56
      "description": "List of logins which should get the Developper role (required to modify portal_components' content), defaulting to inituser-login's value",
57
      "items": {
58
        "pattern": "^\\S+$",
59 60 61 62 63
        "type": "string"
      },
      "uniqueItems": true,
      "type": "array"
    },
64
    "hostalias-dict": {
65
      "description": "Hostname-to-domain-name mapping",
66
      "default": {},
67 68 69
      "additionalProperties": {
        "description": "A hostname to which current entry will resolve",
        "type": "string"
70 71 72
      },
      "type": "object"
    },
73
    "hosts-dict": {
74
      "description": "Host entries to be used in addition to and/or overriding auto-generated ones (erp5-catalog-0, erp5-cloudooo, erp5-memcached-persistent, erp5-memcached-volatile and erp5-smtp)",
75 76
      "patternProperties": {
        ".*": {
77
          "description": "An IP or domain name to which current entry will resolve",
78 79 80 81 82
          "type": "string"
        }
      },
      "type": "object"
    },
83 84 85 86
    "frontend": {
      "description": "Front-end slave instance request parameters",
      "properties": {
        "software-url": {
87
          "description": "Front-end's software type. If this parameter is empty, no front-end instance is requested. Else, sla-dict must specify 'frontend' which is a special value matching all frontends (e.g. {\"instance_guid=bar\": [\"frontend\"]}).",
88 89 90 91 92 93 94 95 96 97 98
          "default": "",
          "type": "string"
        },
        "domain": {
          "description": "The domain name to request front-end to respond as.",
          "default": "",
          "type": "string"
        },
        "software-type": {
          "description": "Request a front-end slave instance of this software type.",
          "default": "RootSoftwareInstance",
99
          "type": "string"
100
        },
101 102 103 104 105 106 107 108 109 110
        "virtualhostroot-http-port": {
          "description": "Front-end slave http port. Port where http requests to frontend will be redirected.",
          "default": 80,
          "type": "integer"
        },
        "virtualhostroot-https-port": {
          "description": "Front-end slave https port. Port where https requests to frontend will be redirected.",
          "default": 443,
          "type": "integer"
        }
111 112 113
      },
      "type": "object"
    },
114 115
    "zope-partition-dict": {
      "description": "Zope layout definition",
116 117 118
      "default": {
        "1": {}
      },
119 120 121 122 123
      "patternProperties": {
        ".*": {
          "additionalProperties": false,
          "properties": {
            "family": {
124
              "description": "The family this partition is part of. For example: 'public', 'admin', 'backoffice', 'web-service'... Each family gets its own balancer entry. It has no special meaning for the system.",
125 126 127 128 129 130 131 132 133 134
              "default": "default",
              "type": "string"
            },
            "instance-count": {
              "description": "Number of Zopes to setup on this partition",
              "default": 1,
              "type": "integer"
            },
            "thread-amount": {
              "description": "Number of worker threads for each created Zope process",
135
              "default": 4,
136 137 138 139 140
              "type": "integer"
            },
            "timerserver-interval": {
              "description": "Timerserver tick perdiod, in seconds, or 0 to disable",
              "default": 5,
141
              "type": "number"
142
            },
143 144 145 146
            "private-dev-shm": {
              "description": "Size of private /dev/shm for wendelin.core. If sysctl kernel.unprivileged_userns_clone exists, it must be set to 1.",
              "type": "string"
            },
147 148 149 150 151 152
            "ssl-authentication": {
              "title": "Enable SSL Client authentication on this zope instance.",
              "description": "If set to true, will set SSL Client verification to required on apache VirtualHost which allow to access this zope instance.",
              "type": "boolean",
              "default": false
            },
153 154 155 156 157
            "webdav": {
              "description": "Serve webdav queries, implies timerserver-interval=0 (disabled). Mixing webdav and non-webdav nodes in a single family will give unspecified results.",
              "default": false,
              "type": "boolean"
            },
158 159 160 161 162 163 164 165 166 167
            "longrequest-logger-interval": {
              "description": "Period, in seconds, with which LongRequestLogger polls worker thread stack traces, or -1 to disable",
              "default": -1,
              "type": "integer"
            },
            "longrequest-logger-timeout": {
              "description": "Transaction duration after which LongRequestLogger will start logging its stack trace, in seconds",
              "default": 1,
              "type": "integer"
            },
168 169
            "large-file-threshold": {
              "description": "Requests bigger than this size get saved into a temporary file instead of being read completely into memory, in bytes",
170
              "default": "10MB",
171 172
              "type": "string"
            },
173
            "port-base": {
174 175 176 177 178 179 180 181 182
              "allOf": [
                {
                  "$ref": "#/definitions/tcpv4port"
                },
                {
                  "description": "Start allocating ports at this value. Useful if one needs to make several partitions share the same port range (ie, several partitions bound to a single address)",
                  "default": 2200
                }
              ]
183
            }
184 185 186 187 188 189 190 191 192
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "kumofs": {
      "description": "Persistent memcached service",
      "additionalProperties": {
193
        "$ref": "./instance-kumofs-schema.json"
194 195 196 197 198 199
      },
      "type": "object"
    },
    "memcached": {
      "description": "Volatile memcached service",
      "additionalProperties": {
200
        "$ref": "./instance-kumofs-schema.json"
201 202 203
      },
      "type": "object"
    },
204 205 206 207
    "cloudooo-url": {
      "description": "Format conversion service URL",
      "pattern": "^https?://",
      "type": "string"
208
    },
209 210 211 212 213
    "cloudooo-retry-count": {
      "description": "Define retry count for cloudooo in network error case in test",
      "type": "integer",
      "default": 2
    },
214 215 216
    "smtp": {
      "description": "Mail queuing and relay service",
      "additionalProperties": {
217
        "$ref": "./instance-smtp-schema.json"
218 219 220
      },
      "type": "object"
    },
221 222 223
    "mariadb": {
      "description": "Relational database service",
      "additionalProperties": {
224
        "$ref": "./instance-mariadb-schema.json"
225 226 227
      },
      "type": "object"
    },
228 229 230 231
    "zodb-zeo": {
      "description": "Common settings ZEO servers",
      "properties": {
        "tcpv4-port": {
232 233 234 235 236 237 238 239
          "allOf": [
            {
              "$ref": "#/definitions/tcpv4port"
            },
            {
              "description": "Start allocating ports at this value, going upward"
            }
          ]
240 241 242 243
        },
        "backup-periodicity": {
          "description": "When to backup, specified in the same format as for systemd.time(7) calendar events (years & seconds not supported, DoW & DoM can not be combined). Enter 'never' to disable backups.",
          "default": "daily",
244
          "type": "string"
245
        },
246 247 248
        "tidstorage-repozo-path": {
          "description": "Directory for backup timestamp and tidstorage status files.",
          "default": "~/srv/backup/tidstorage",
249 250 251 252
          "type": "string"
        }
      },
      "type": "object"
253 254
    },
    "zodb": {
255
      "description": "Zope Object DataBase mountpoints. See https://github.com/zopefoundation/ZODB/blob/3.10/src/ZODB/component.xml for extra options.",
256
      "items": {
257 258 259
        "required": [
          "type"
        ],
260 261 262 263 264 265
        "properties": {
          "name": {
            "description": "Database name",
            "default": "main",
            "type": "string"
          },
266
          "mount-point": {
267 268 269 270 271
            "description": "Mount point",
            "default": "/",
            "type": "string"
          },
          "storage-dict": {
272
            "description": "Storage configuration. For NEO, 'logfile' is automatically set (see https://lab.nexedi.com/nexedi/neoppod/blob/master/neo/client/component.xml for other settings).",
273 274 275 276 277 278 279
            "properties": {
              "ssl": {
                "description": "For external NEO. Pass false if you want to disable SSL or pass custom values for ca/cert/key.",
                "default": true,
                "type": "boolean"
              }
            },
280 281 282
            "additionalProperties": {
              "type": "string"
            },
283
            "type": "object"
284 285 286
          },
          "type": true,
          "server": true
287
        },
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
        "oneOf": [
          {
            "title": "zeo",
            "properties": {
              "type": {
                "description": "Storage type",
                "const": "zeo"
              },
              "server": {
                "description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB. The partition reference is 'zodb'.",
                "$ref": "./instance-zeo-schema.json"
              }
            }
          },
          {
            "title": "neo",
            "properties": {
              "type": {
                "description": "Storage type",
                "const": "neo"
              },
              "server": {
                "description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB. Partitions references are 'neo-0', 'neo-1', ...",
                "$ref": "../neoppod/instance-neo-input-schema.json"
              }
            }
          }
        ],
316 317 318
        "additionalProperties": {
          "type": "string"
        },
319 320 321
        "type": "object"
      },
      "type": "array"
322 323
    },
    "jupyter": {
324
      "description": "Jupyter subinstance parameters",
325 326
      "properties": {
        "enable": {
327
          "description": "Whether to enable creation of associated Jupyter subinstance",
328 329 330 331 332 333 334 335 336 337
          "default": false,
          "type": "boolean"
        },
        "zope-family": {
          "description": "Zope family to connect Jupyter to by default",
          "default": "<first instantiated Zope family>",
          "type": "string"
        }
      },
      "type": "object"
338 339 340
    },
    "wendelin-core-zblk-fmt": {
      "description": "In wendelin.core there are 2 formats for storing data, so called ZBlk0 and ZBlk1. See https://lab.nexedi.com/nexedi/wendelin.core/blob/2e5e1d3d/bigfile/file_zodb.py#L19 for more details.",
341
      "default": "",
342
      "type": "string"
343 344 345 346 347 348 349 350 351 352 353 354 355
    },
    "caucase": {
      "description": "Caucase certificate authority parameters",
      "properties": {
        "url": {
          "title": "Caucase URL",
          "description": "URL of existing caucase instance to use. If empty, a new caucase instance will be deployed. If not empty, other properties in this section will be ignored.",
          "default": "",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": {
356
        "$ref": "../caucase/instance-caucase-input-schema.json"
357 358
      },
      "type": "object"
359
    },
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
    "test-runner": {
      "description": "Test runner parameters.",
      "properties": {
        "enabled": {
          "description": "Generate helper scripts to run test suite.",
          "default": true,
          "type": "boolean"
        },
        "node-count": {
          "description": "Number of tests this instance can execute in parrallel. This must be at least equal to the number of nodes configured on testnode running the test",
          "default": 3,
          "type": "integer"
        },
        "extra-database-count": {
          "description": "Number of extra databases this instance tests will need.",
          "default": 3,
          "type": "integer"
        }
      },
      "type": "object"
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
    },
    "balancer": {
      "description": "HTTP(S) load balancer proxy parameters",
      "properties": {
        "ssl": {
          "description": "HTTPS certificate generation parameters",
          "properties": {
            "caucase-url":{
              "title": "Caucase URL",
              "description": "URL of caucase service to use. If not set, global setting will be used.",
              "type": "string"
            },
            "csr": {
              "title": "csr",
              "description": "PEM-encoded certificate signature request to request server certificate with. If not provided, HTTPS will be disabled.",
              "type": "string"
            },
            "max-crl-update-delay": {
              "title": "Periodicity of CRL update (days)",
              "description": "CRL will be updated from caucase at least this often.",
              "type": "number",
              "default": 1.0
            }
          },
          "type": "object"
        }
      },
      "type": "object"
408
    }
409 410
  }
}