forked from waltermoreira/abaco
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathconfigschema.json
More file actions
406 lines (406 loc) · 12.5 KB
/
configschema.json
File metadata and controls
406 lines (406 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
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
{
"$schema": "http://json-schema.org/schema#",
"$id": "http://github.com/tapis-project/tapisflask/schemas/configschema.json",
"type": "object",
"additionalProperties": false,
"required":[
"service_name",
"version",
"log_level",
"mongo_host",
"mongo_port",
"rabbit_uri",
"global_tenant_object",
"worker_socket_paths",
"spawner_host_id",
"worker_fifo_paths",
"web_encryption_key",
"spawner_max_cmd_length",
"spawner_max_workers_per_host",
"spawner_max_workers_per_actor"
],
"properties": {
"python_framework_type": {
"type": "string",
"default": "flask",
"description": "The framework this service will use. e.g. Flask, Django, FastApi, etc."
},
"kubernetes_namespace": {
"type": "string",
"description": "The namespace for kubernetes to create workers and execution pods. Only relevant to spawner and health. Meaning the config should be changed on each new namespace to match."
},
"container_backend": {
"type": "string",
"pattern": "kubernetes|docker",
"default": "docker",
"description": "Container backend to use when creating workers/execs."
},
"mongo_host": {
"type": "string",
"description": "The url for the mongo instance."
},
"mongo_port": {
"type": "integer",
"description": "The port to access the mongo instance."
},
"store_mongo_user": {
"type": "string",
"description": "The username for the mongo instance if authentication is active."
},
"store_mongo_password": {
"type": "string",
"description": "The password for the mongo instance if authentication is active."
},
"rabbit_uri": {
"type": "string",
"description": "URI for rabbitMQ."
},
"spawner_host_id": {
"type": "integer",
"description": "Unique host_id for worker host. Each host should have at least one spawner and health check worker."
},
"spawner_host_queues": {
"type": "array",
"description": "List of queues that spawners on this host will subscribe to."
},
"spawner_host_ip": {
"type": "string",
"description": "An addressable IP for the spawner's host. (Not currently used)"
},
"spawner_max_cmd_length": {
"type": "integer",
"description": "Maximum number of messages that the autoscaler should put on the default command channel.",
"default": 10
},
"spawner_max_workers_per_host": {
"type": "integer",
"description": "Maximum number of workers that are allowed to simultaneously be running on a given compute host."
},
"spawner_max_workers_per_actor": {
"type": "integer",
"description": "Maximum number of workers that a given actor can have at one time."
},
"spawner_docker_network": {
"type": "string",
"description": "Sets worker and spawner network. Otherwise uses default network for host",
"default": null
},
"spawner_abaco_conf_host_path": {
"type": "string",
"description": "Sets abaco conf host path if it is not set by environment variable"
},
"docker_dd": {
"type": "string",
"description": "url to use for docker daemon by spawners and workers."
},
"worker_init_count": {
"type": "integer",
"description": "Number of worker containers to initially start when an actor is created.",
"default": 1
},
"worker_autoscaling": {
"type": "boolean",
"description": "Set whether or not autoscaling is enabled."
},
"worker_max_run_time": {
"type": "integer",
"description": "Max length of time (secs) an actor is allowed to execute before being killed. (-1 = indefinite)",
"default": -1
},
"worker_mem_limit": {
"type": "integer",
"description": "Maximum amount of memory an Actor container can use. Like --memory flag for Docker. (-1 = unlimited)",
"default": -1
},
"worker_max_cpus": {
"type": "integer",
"description": "Maximum number of CPUs available to each actor. (Not a guarantee) (-1 = unlimited)",
"default": 1000000000
},
"worker_worker_ttl": {
"type": "integer",
"description": "Length of time (secs) to keep an idle worker alive. (-1 = indefinite)",
"default": -1
},
"worker_sync_max_idle_time": {
"type": "integer",
"description": "Length of time (secs) to keep an idle worker alive when actor has the 'sync' hint.",
"default":600
},
"worker_auto_remove": {
"type": "boolean",
"description": "Whether worker should be scheduled with 'auto_remove' flag. Limited to docker version > 1.25.",
"default":true
},
"worker_privileged_mounts": {
"type": "array",
"description": "The mounts for a 'privileged' actor containers."
},
"worker_leave_containers": {
"type": "boolean",
"description": "Whether to leave the actor containers or remove them. True is helpful for debugging.",
"default": false
},
"worker_socket_paths": {
"type": "string",
"description": "Where to mount worker sockets on host and in container for results. Formatted as host_path:container_path.",
"default": null
},
"worker_fifo_paths": {
"type": "string",
"description": "Where to mount worker fifos on host and in container for binary messages. Formatted as host_path:container_path.",
"default": null
},
"web_encryption_key": {
"type": "string",
"description": "Encryption key for encrypted configs. View dev docs for example on how to create the key."
},
"web_access_control": {
"type": "string",
"description": "Type of access control for web front end.",
"pattern": "jwt|none"
},
"web_user_role": {
"type": "string",
"description": "The role required for 'base level' access to the service. Only used with JWT access control."
},
"web_accept_nonce": {
"type": "boolean",
"description": "Enables use of nonce for auth with API. x-nonce param is only checked in absence of a JWT header."
},
"web_tenant_name": {
"type": "string",
"description": "The name of the tenant when not using JWT."
},
"web_show_traceback": {
"type": "boolean",
"description": "Whether the web apps return a stacktrace or a nice JSON object on an APIException.",
"default":false
},
"web_log_ex": {
"type": "integer",
"description": "Amount of time (secs) to store log data. (-1 = indefinite)",
"default": 43200
},
"web_max_log_length": {
"type": "integer",
"description": "Max length (bytes) to store an actors exec's logs. Truncated otherwise. Cannot exceed max mongo doc len.",
"default":1000000
},
"web_case": {
"type": "string",
"description": "Either to use camel or snake case. Changes return responses. Default is snake.",
"pattern": "camel|snake"
},
"web_max_content_length": {
"type": "integer",
"description": "Maximum content length (bytes) allow for raw (binary) data messages.",
"default": 500000000
},
"web_all_queues": {
"type": "array",
"description": "List of all allowable queues"
},
"global_tenant_object": {
"type": "object",
"description": "Object containing global parameters which tenants may overwrite at times.",
"additionalProperties": false,
"properties": {
"log_ex": {
"type": "integer",
"description": "Default amount of time, in seconds, before a log is deleted from Mongo DB."
},
"log_ex_limit": {
"type": "integer",
"description": "Ceiling for custom log_ex able to be set for a tenant."
},
"use_tas_uid": {
"type": "boolean",
"description": "Whether or not to use tas for authentication.",
"default": false
},
"actor_uid": {
"type": "integer",
"description": "If using uid and gid, what uid globally should be set as."
},
"actor_gid": {
"type": "integer",
"description": "If using uid and gid, what gid globally should be set as."
},
"default_token": {
"type": "boolean",
"description": "Default value for an actor's token attribute. Set globally.",
"default": false
},
"generate_clients": {
"type": "boolean",
"description": "Whether or not to generate clients when creating workers.",
"default": false
},
"actor_homedir":{
"type":"string",
"description": "Allows for specification regarding an actors homedir to use."
},
"global_mounts": {
"type": "array",
"description": "Global mounts.",
"items": {
"type": "string"
}
}
},
"oneOf": [
{
"properties": {
"use_tas_uid": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"use_tas_uid",
"log_ex",
"log_ex_limit"
]
},
{
"required": [
"actor_uid",
"actor_gid",
"log_ex",
"log_ex_limit"
]
},
{
"properties": {
"use_tas_uid": {
"type": "boolean",
"enum": [
false,
null
]
},
"actor_gid": {
"type":"integer",
"enum": [
null
]
},
"actor_uid": {
"type":"integer",
"enum": [
null
]
}
},
"required": [
"log_ex",
"log_ex_limit"
]
}
]
}
},
"patternProperties": {
"^.*_tenant_object": {
"type": "object",
"description": "Object containing tenant based properties.",
"additionalProperties": false,
"properties": {
"log_ex": {
"type": "integer",
"description": "Default amount of time, in seconds, before a log is deleted from Mongo DB."
},
"log_ex_limit": {
"type": "integer",
"description": "Ceiling for custom log_ex able to be set for a tenant."
},
"use_tas_uid": {
"type": "boolean",
"description": "Whether or not to use tas for authentication for tenant."
},
"actor_uid": {
"type": "integer",
"description": "If using uid and gid, what uid by tenant should be set as."
},
"actor_gid": {
"type": "integer",
"description": "If using uid and gid, what gid by tenant should be set as."
},
"default_token": {
"type": "boolean",
"description": "Default value for an actor's token attribute. Set per tenant."
},
"generate_clients": {
"type": "boolean",
"description": "Whether or not to generate clients when creating workers for this tenant."
},
"actor_homedir":{
"type":"string",
"description": "Allows for specification regarding an actors homedir to use for this tenant."
},
"global_mounts": {
"type": "array",
"description": "Global mounts for this tenant.",
"items": {
"type": "string"
}
}
},
"oneOf": [
{
"properties": {
"use_tas_uid": {
"type":"boolean",
"enum": [
true
]
}
},
"required": [
"use_tas_uid",
"log_ex",
"log_ex_limit"
]
},
{
"required": [
"actor_uid",
"actor_gid",
"log_ex",
"log_ex_limit"
]
},
{
"properties": {
"use_tas_uid": {
"type":"boolean",
"enum": [
false,
null
]
},
"actor_gid": {
"type":"integer",
"enum": [
null
]
},
"actor_uid": {
"type":"integer",
"enum": [
null
]
}
},
"required": [
"log_ex",
"log_ex_limit"
]
}
]
}
}
}