NEO repository has moved to lab.nexedi.com
[slapos.git] / software / erp5 / instance-erp5-input-schema.json
1 {
2   "$schema": "http://json-schema.org/draft-04/schema#",
3   "description": "Parameters to instantiate ERP5",
4   "additionalProperties": false,
5   "properties": {
6     "sla-dict": {
7       "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.",
8       "additionalProperties": {
9         "type": "array",
10         "items": { "type": "string" },
11         "uniqueItems": true
12       },
13       "type": "object"
14     },
15     "site-id": {
16       "description": "ERP5Site object's id",
17       "default": "erp5",
18       "type": "string"
19     },
20     "timezone": {
21       "description": "Zope's timezone. Possible values are determined by host's libc, and typically come from a separate package (tzdata, ...)",
22       "default": "UTC",
23       "type": "string"
24     },
25     "deadlock-debugger-password": {
26       "description": "Password for /manage_debug_threads",
27       "type": "string"
28     },
29     "inituser-login": {
30       "description": "Login of the initial/rescue user",
31       "default": "zope",
32       "type": "string"
33     },
34     "inituser-password": {
35       "description": "Password of the initial/rescue user",
36       "type": "string"
37     },
38     "developer-list": {
39       "description": "List of logins which should get the Developper role (required to modify portal_components' content), defaulting to inituser-login's value",
40       "items": {
41         "pattern": "/^\\S+$/",
42         "type": "string"
43       },
44       "uniqueItems": true,
45       "type": "array"
46     },
47     "hostalias-dict": {
48       "description": "Hostname-to-hostname mapping",
49       "default": {},
50       "additionalProperties": {
51         "description": "A hostname to which current entry will resolve",
52         "type": "string"
53       },
54       "type": "object"
55     },
56     "hosts-dict": {
57       "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)",
58       "patternProperties": {
59         ".*": {
60           "description": "An IP or domain name to which current entry will resolve",
61           "type": "string"
62         }
63       },
64       "type": "object"
65     },
66     "frontend": {
67       "description": "Front-end slave instance request parameters",
68       "properties": {
69         "software-url": {
70           "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\"]}).",
71           "default": "",
72           "type": "string"
73         },
74         "domain": {
75           "description": "The domain name to request front-end to respond as.",
76           "default": "",
77           "type": "string"
78         },
79         "software-type": {
80           "description": "Request a front-end slave instance of this software type.",
81           "default": "RootSoftwareInstance",
82           "type": ""
83         }
84       },
85       "type": "object"
86     },
87     "zope-partition-dict": {
88       "description": "Zope layout definition",
89       "default": {"1": {}},
90       "patternProperties": {
91         ".*": {
92           "additionalProperties": false,
93           "properties": {
94             "family": {
95               "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.",
96               "default": "default",
97               "type": "string"
98             },
99             "instance-count": {
100               "description": "Number of Zopes to setup on this partition",
101               "default": 1,
102               "type": "integer"
103             },
104             "thread-amount": {
105               "description": "Number of worker threads for each created Zope process",
106               "default": 4,
107               "type": "integer"
108             },
109             "timerserver-interval": {
110               "description": "Timerserver tick perdiod, in seconds, or 0 to disable",
111               "default": 5,
112               "type": "integer"
113             },
114             "webdav": {
115               "description": "Serve webdav queries, implies timerserver-interval=0 (disabled). Mixing webdav and non-webdav nodes in a single family will give unspecified results.",
116               "default": false,
117               "type": "boolean"
118             },
119             "longrequest-logger-interval": {
120               "description": "Period, in seconds, with which LongRequestLogger polls worker thread stack traces, or -1 to disable",
121               "default": -1,
122               "type": "integer"
123             },
124             "longrequest-logger-timeout": {
125               "description": "Transaction duration after which LongRequestLogger will start logging its stack trace, in seconds",
126               "default": 1,
127               "type": "integer"
128             },
129             "port-base": {
130               "allOf": [{
131                 "$ref": "#/definitions/tcpv4port"
132               }, {
133                 "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)",
134                 "default": 2200
135               }]
136             }
137           },
138           "type": "object"
139         }
140       },
141       "type": "object"
142     },
143     "kumofs": {
144       "description": "Persistent memcached service",
145       "additionalProperties": {
146         "$ref": "./instance-kumofs-schema.json#properties"
147       },
148       "type": "object"
149     },
150     "memcached": {
151       "description": "Volatile memcached service",
152       "additionalProperties": {
153         "$ref": "./instance-kumofs-schema.json#properties"
154       },
155       "type": "object"
156     },
157     "cloudooo": {
158       "description": "Format conversion service",
159       "additionalProperties": {
160         "$ref": "./instance-cloudooo-schema.json#properties"
161       },
162       "type": "object"
163     },
164     "mariadb": {
165       "description": "Relational database service",
166       "additionalProperties": {
167         "$ref": "./instance-mariadb-schema.json#properties"
168       },
169       "type": "object"
170     },
171     "zodb-zeo": {
172       "description": "Common settings ZEO servers",
173       "properties": {
174         "tcpv4-port": {
175           "allOf": [{
176             "$ref": "#/definitions/tcpv4port"
177           }, {
178             "description": "Start allocating ports at this value, going upward"
179           }]
180         },
181         "backup-periodicity": {
182           "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.",
183           "default": "daily",
184           "type": "string"
185         },
186         "tidstorage-repozo-path": {
187           "description": "Directory for backup timestamp and tidstorage status files.",
188           "default": "~/srv/backup/tidstorage",
189           "type": "string"
190         }
191       },
192       "type": "object"
193     },
194     "zodb": {
195       "description": "Zope Object DataBase mountpoints. See https://github.com/zopefoundation/ZODB/blob/3.10/src/ZODB/component.xml for extra options.",
196       "items": {
197         "required": ["type"],
198         "properties": {
199           "name": {
200             "description": "Database name",
201             "default": "main",
202             "type": "string"
203           },
204           "mount-point": {
205             "description": "Mount point",
206             "default": "/",
207             "type": "string"
208           },
209           "type": {
210             "description": "Storage type",
211             "enum": ["zeo", "neo"],
212             "type": "string"
213           },
214           "server": {
215             "description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB. For ZEO, the partition reference is 'zodb'. For NEO, they are 'neo-0', 'neo-1', ...",
216             "anyOf": [
217               {"$ref": "./instance-zeo-schema.json"},
218               {"$ref": "../neoppod/instance-neo-input-schema.json"}
219             ]
220           },
221           "storage-dict": {
222             "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).",
223             "properties": {
224               "ssl": {
225                 "description": "For external NEO. Pass false if you want to disable SSL or pass custom values for ca/cert/key.",
226                 "default": true,
227                 "type": "boolean"
228               }
229             },
230             "additionalProperties": {"type": "string"},
231             "type": "object"
232           }
233         },
234         "additionalProperties": {"type": "string"},
235         "type": "object"
236       },
237       "type": "array"
238     }
239   }
240 }