instance-erp5-input-schema.json 19.8 KB
Newer Older
1
{
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3 4
  "description": "Parameters to instantiate ERP5",
  "additionalProperties": false,
5
  "definitions": {
6 7 8
    "routing-rule-list": {
      "description": "Maps the path received in requests to given zope path. Rules are applied in the order they are given. This requires the path received from the outside world (typically: frontend) to have its root correspond to Zope's root (for frontend: 'path' parameter must be empty), with the customary VirtualHostMonster construct (for frontend: 'type' must be 'zope').",
      "type": "array",
9 10 11 12 13 14
      "default": [
        [
          "/",
          "/"
        ]
      ],
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
      "items": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": [
          {
            "title": "External path",
            "description": "Path as received from the outside world, based on VirtualHostRoot element.",
            "type": "string"
          },
          {
            "title": "Internal path",
            "description": "Zope path, based on Zope root object, the external path should correspond to. '%(site-id)s' is replaced by the site-id value, and '%%' replaced by '%'.",
            "type": "string"
          }
        ]
      }
    },
33
    "tcpv4port": {
34
      "$ref": "./schemas-definitions.json#/tcpv4port"
35 36
    }
  },
37
  "properties": {
38
    "sla-dict": {
39
      "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-\").",
40 41
      "additionalProperties": {
        "type": "array",
42 43 44
        "items": {
          "type": "string"
        },
45
        "uniqueItems": true
46 47 48
      },
      "type": "object"
    },
49
    "site-id": {
50
      "description": "ERP5Site object's id. An empty value disables automatic site creation.",
51 52 53
      "default": "erp5",
      "type": "string"
    },
54
    "bt5": {
55
      "description": "Business Template to install at automatic site creation. By default, all configurators are installed.",
56 57
      "type": "string"
    },
58 59 60 61
    "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"
    },
62
    "timezone": {
63
      "description": "Zope's timezone. Possible values are determined by host's libc, and typically come from a separate package (tzdata, ...)",
64 65 66
      "default": "UTC",
      "type": "string"
    },
67 68 69
    "deadlock-debugger-password": {
      "description": "Password for /manage_debug_threads",
      "type": "string"
70
    },
71 72 73 74 75 76 77 78 79
    "inituser-login": {
      "description": "Login of the initial/rescue user",
      "default": "zope",
      "type": "string"
    },
    "inituser-password": {
      "description": "Password of the initial/rescue user",
      "type": "string"
    },
80
    "developer-list": {
81
      "description": "List of logins which should get the Developper role (required to modify portal_components' content), defaulting to inituser-login's value",
82
      "items": {
83
        "pattern": "^\\S+$",
84 85 86 87 88
        "type": "string"
      },
      "uniqueItems": true,
      "type": "array"
    },
89
    "activity-timeout": {
90 91
      "description": "How long a CMFActivity-initiated transaction may last, in seconds",
      "default": null,
92 93 94 95
      "type": [
        "number",
        "null"
      ]
96
    },
97
    "publisher-timeout": {
98 99
      "description": "How long a publisher-initiated transaction may last, in seconds",
      "default": null,
100 101 102 103
      "type": [
        "number",
        "null"
      ]
104 105 106 107 108 109 110 111
    },
    "family-override": {
      "description": "Family-wide options, possibly overriding global options",
      "default": {},
      "patternProperties": {
        ".*": {
          "default": {},
          "properties": {
112 113 114 115 116
            "webdav": {
              "description": "Serve webdav queries, implies timerserver-interval=0 (disabled)",
              "default": false,
              "type": "boolean"
            },
117 118
            "activity-timeout": {
              "description": "Override global activity timeout",
119 120 121 122
              "type": [
                "number",
                "null"
              ]
123
            },
124 125
            "publisher-timeout": {
              "description": "Override global publisher timeout",
126 127 128 129
              "type": [
                "number",
                "null"
              ]
130 131 132 133 134 135 136
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
137
    "hostalias-dict": {
138
      "description": "Hostname-to-domain-name mapping",
139
      "default": {},
140 141 142
      "additionalProperties": {
        "description": "A hostname to which current entry will resolve",
        "type": "string"
143 144 145
      },
      "type": "object"
    },
146
    "hosts-dict": {
147
      "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)",
148 149
      "patternProperties": {
        ".*": {
150
          "description": "An IP or domain name to which current entry will resolve",
151 152 153 154 155
          "type": "string"
        }
      },
      "type": "object"
    },
156 157 158 159
    "frontend": {
      "description": "Front-end slave instance request parameters",
      "properties": {
        "software-url": {
160
          "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\"]}).",
161
          "default": "",
162 163
          "type": "string",
          "format": "uri"
164 165 166 167 168 169 170 171 172
        },
        "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",
173
          "type": "string"
174
        },
175 176 177 178 179 180 181 182 183 184
        "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"
        }
185 186 187
      },
      "type": "object"
    },
188 189 190
    "wsgi": {
      "description": "If set to true, Zope is run as a WSGI application, instead of using the Medusa HTTP server.",
      "type": "boolean",
191
      "default": true
192
    },
193 194
    "zope-partition-dict": {
      "description": "Zope layout definition",
195 196 197
      "default": {
        "1": {}
      },
198 199 200 201 202
      "patternProperties": {
        ".*": {
          "additionalProperties": false,
          "properties": {
            "family": {
203
              "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.",
204 205 206 207 208 209 210 211 212 213
              "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",
214
              "default": 4,
215 216 217 218 219
              "type": "integer"
            },
            "timerserver-interval": {
              "description": "Timerserver tick perdiod, in seconds, or 0 to disable",
              "default": 5,
220
              "type": "number"
221
            },
222 223 224 225
            "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"
            },
226 227 228 229 230 231
            "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
            },
232 233 234 235 236 237 238 239 240 241
            "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"
            },
242 243
            "large-file-threshold": {
              "description": "Requests bigger than this size get saved into a temporary file instead of being read completely into memory, in bytes",
244
              "default": "10MB",
245 246
              "type": "string"
            },
247
            "port-base": {
248 249 250 251 252 253 254 255 256
              "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
                }
              ]
257
            }
258 259 260 261 262 263 264 265
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "kumofs": {
      "description": "Persistent memcached service",
266 267 268 269 270 271 272 273 274 275 276 277
      "allOf": [
        {
          "$ref": "./instance-kumofs-schema.json"
        },
        {
          "properties": {
            "tcpv4-port": {
              "default": 2000
            }
          }
        }
      ],
278 279 280 281
      "type": "object"
    },
    "memcached": {
      "description": "Volatile memcached service",
282 283 284 285 286 287 288 289 290 291 292 293
      "allOf": [
        {
          "$ref": "./instance-kumofs-schema.json"
        },
        {
          "properties": {
            "tcpv4-port": {
              "default": 2010
            }
          }
        }
      ],
294 295
      "type": "object"
    },
296 297 298
    "cloudooo-url": {
      "description": "Format conversion service URL",
      "pattern": "^https?://",
299 300
      "type": "string",
      "format": "uri"
301
    },
302 303 304 305 306
    "cloudooo-retry-count": {
      "description": "Define retry count for cloudooo in network error case in test",
      "type": "integer",
      "default": 2
    },
307 308
    "smtp": {
      "description": "Mail queuing and relay service",
309 310 311 312 313 314 315 316 317 318 319 320
      "allOf": [
        {
          "$ref": "./instance-smtp-schema.json"
        },
        {
          "properties": {
            "tcpv4-port": {
              "default": 2010
            }
          }
        }
      ],
321 322
      "type": "object"
    },
323 324
    "mariadb": {
      "description": "Relational database service",
325 326 327 328 329 330 331 332 333 334 335 336
      "allOf": [
        {
          "$ref": "./instance-mariadb-schema.json"
        },
        {
          "properties": {
            "tcpv4-port": {
              "default": 2099
            }
          }
        }
      ],
337 338
      "type": "object"
    },
339 340 341 342
    "zodb-zeo": {
      "description": "Common settings ZEO servers",
      "properties": {
        "tcpv4-port": {
343 344 345 346 347 348 349 350
          "allOf": [
            {
              "$ref": "#/definitions/tcpv4port"
            },
            {
              "description": "Start allocating ports at this value, going upward"
            }
          ]
351 352 353 354
        },
        "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",
355
          "type": "string"
356
        },
357 358 359
        "tidstorage-repozo-path": {
          "description": "Directory for backup timestamp and tidstorage status files.",
          "default": "~/srv/backup/tidstorage",
360 361 362 363
          "type": "string"
        }
      },
      "type": "object"
364 365
    },
    "zodb": {
366
      "description": "Zope Object DataBase mountpoints. See https://github.com/zopefoundation/ZODB/blob/4/src/ZODB/component.xml for extra options.",
367
      "items": {
368 369 370
        "required": [
          "type"
        ],
371 372 373 374 375 376
        "properties": {
          "name": {
            "description": "Database name",
            "default": "main",
            "type": "string"
          },
377
          "mount-point": {
378 379 380 381 382
            "description": "Mount point",
            "default": "/",
            "type": "string"
          },
          "storage-dict": {
383
            "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).",
384 385 386 387 388 389 390
            "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"
              }
            },
391 392 393 394 395
            "patternProperties": {
              ".!$": {
                "$ref": "#/properties/zodb/items/patternProperties/.!$"
              }
            },
396
            "additionalProperties": {
397
              "$ref": "#/properties/zodb/items/additionalProperties"
398
            },
399
            "type": "object"
400 401 402
          },
          "type": true,
          "server": true
403
        },
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426
        "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', ...",
427
                "$ref": "../neoppod/instance-neo-input-schema.json#/definitions/neo-cluster"
428 429 430 431
              }
            }
          }
        ],
432 433 434 435 436 437 438 439 440 441 442
        "patternProperties": {
          ".!$": {
            "description": "Override with the value of the first item whose zope id matches against the pattern.",
            "items": {
              "items": [
                {
                  "description": "Override pattern (Python regular expression).",
                  "type": "string"
                },
                {
                  "description": "Override value (parameter for maching nodes).",
443 444 445 446
                  "type": [
                    "integer",
                    "string"
                  ]
447 448 449 450 451 452 453
                }
              ],
              "type": "array"
            },
            "type": "array"
          }
        },
454
        "additionalProperties": {
455 456 457 458
          "type": [
            "integer",
            "string"
          ]
459
        },
460 461 462
        "type": "object"
      },
      "type": "array"
463 464
    },
    "jupyter": {
465
      "description": "Jupyter subinstance parameters",
466 467
      "properties": {
        "enable": {
468
          "description": "Whether to enable creation of associated Jupyter subinstance",
469 470 471 472 473 474 475 476 477 478
          "default": false,
          "type": "boolean"
        },
        "zope-family": {
          "description": "Zope family to connect Jupyter to by default",
          "default": "<first instantiated Zope family>",
          "type": "string"
        }
      },
      "type": "object"
479
    },
480 481 482 483 484 485 486 487 488 489
    "wcfs": {
      "description": "Parameters for wendelin.core filesystem",
      "properties": {
	"enable": {
	  "description": "Whether to enable WCFS filesystem and use it to access ZBigArray/ZBigFile data. In WCFS mode wendelin.core clients (Zope/ERP5 processes) share in-RAM cache for in-ZODB data without duplicating it for every client. This cache sharing does not affect correctness as isolation property is continued to be provided to every client.",
	  "default": false,
	  "type": "boolean"
	}
      }
    },
490 491
    "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.",
492
      "default": "",
493
      "type": "string"
494 495 496 497 498 499 500 501 502 503 504 505 506
    },
    "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": {
507
        "$ref": "../caucase/instance-caucase-input-schema.json"
508 509
      },
      "type": "object"
510
    },
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
    "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"
531 532 533 534
    },
    "balancer": {
      "description": "HTTP(S) load balancer proxy parameters",
      "properties": {
535 536 537 538 539 540 541 542 543 544 545 546 547 548
        "path-routing-list": {
          "$ref": "#/definitions/routing-rule-list",
          "title": "Global path routing rules"
        },
        "family-path-routing-dict": {
          "type": "object",
          "title": "Family-specific path routing rules",
          "description": "Applied, only for the eponymous family, before global path routing rules.",
          "patternProperties": {
            ".+": {
              "$ref": "#/definitions/routing-rule-list"
            }
          }
        },
549 550 551
        "ssl": {
          "description": "HTTPS certificate generation parameters",
          "properties": {
552 553 554 555 556 557 558 559 560 561
            "frontend-caucase-url-list": {
              "title": "Frontend Caucase URL List",
              "description": "List of URLs of caucase service of frontend groups to authenticate access from them.",
              "type": "array",
              "items": {
                "type": "string",
                "format": "uri"
              },
              "uniqueItems": true
            },
562
            "caucase-url": {
563 564
              "title": "Caucase URL",
              "description": "URL of caucase service to use. If not set, global setting will be used.",
565 566
              "type": "string",
              "format": "uri"
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
            },
            "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"
584
    }
585 586
  }
}