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