-
Notifications
You must be signed in to change notification settings - Fork 1
/
configschema.json
454 lines (454 loc) · 15.6 KB
/
configschema.json
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
{
"$schema": "http://json-schema.org/schema#",
"$id": "http://github.com/tapis-project/tapisflask/schemas/configschema.json",
"type": "object",
"additionalProperties": true,
"required":[
"service_name",
"version",
"log_level",
"rabbitmq_uri",
"global_tenant_object",
"global_site_object",
"spawner_host_id",
"nfs_base_path"
],
"properties": {
"python_framework_type": {
"type": "string",
"default": "fastapi",
"description": "The framework this service will use. e.g. Flask, Django, FastApi, etc."
},
"kubernetes_namespace": {
"type": "string",
"description": "The namespace to find traefik config and pods. Relevant to health so that it can modify config in realtime."
},
"kubernetes_deploy_namespace": {
"type": "string",
"description": "The namespace for kubernetes to create workers and pods in. Only relevant to spawner and health."
},
"rabbitmq_uri": {
"type": "string",
"description": "URI for rabbitMQ."
},
"pvc_storage_class_name": {
"type": "string",
"description": "Which kubernetes storage class to use when creating default persistent volume claims."
},
"default_pod_cpu_limit": {
"type": "integer",
"description": "Default CPU allocation pod is allowed to use. In millicpus (m). 1000 = 1 cpu.",
"default": 2000
},
"default_pod_cpu_request": {
"type": "integer",
"description": "Default CPU allocation pod requests at startup. In millicpus (m). 1000 = 1 cpu.",
"default": 250
},
"maximum_pod_cpu_val":{
"type": "integer",
"description": "Maximum CPU allocation pod is allowed to have as limit or request. In millicpus (m). 1000 = 1 cpu.",
"default": 6000
},
"minimum_pod_cpu_val":{
"type": "integer",
"description": "Minimum CPU allocation pod is allowed to have as limit or request. In millicpus (m). 1000 = 1 cpu.",
"default": 250
},
"default_pod_mem_limit": {
"type": "integer",
"description": "Default memory allocation pod is allowed to use. In megabytes (Mi).",
"default": 3072
},
"default_pod_mem_request": {
"type": "integer",
"description": "Default memory allocation pod requests at startup. In megabytes (Mi)",
"default": 256
},
"maximum_pod_mem_val":{
"type": "integer",
"description": "Maximum memory allocation pod is allowed to have as limit or request. In megabytes (Mi)",
"default": 12288
},
"minimum_pod_mem_val":{
"type": "integer",
"description": "Minimum memory allocation pod is allowed to have as limit or request. In megabytes (Mi)",
"default": 256
},
"maximum_pod_gpu_val":{
"type": "integer",
"description": "Maximum GPU allocation pod is allowed to have in resources.gpus.",
"default": 1
},
"postgres_engine_echo_for_debug": {
"type": "boolean",
"description": "Whether or not to echo postgres engine queries for debugging.",
"default": false
},
"compute_queues": {
"type": "array",
"description": "List of node objects available to the spawner using this config.",
"required": ["queue_name"],
"additionalProperties": false,
"items": {
"type": "object",
"properties": {
"queue_name": {
"type": "string",
"description": "Name of the queue being made available."
},
"default": {
"type": "boolean",
"description": "Whether or not this is the default queue to use."
},
"node_selector": {
"type": "string",
"description": "Kubernetes spec.nodeSelector required to access node. [A-z][0-9]-_ comma seperated. e.g. 'gpu,v100', 'region,us-west', 'name_id,my_node_id'"
},
"description": {
"type": "string",
"description": "Description to be displayed in the UI."
},
"cpu_info": {
"type": "string",
"description": "CPU information of the node. e.g. 'Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz'",
"default": "Unknown - Not defined in config.yml"
},
"cpu_architecture": {
"type": "string",
"description": "Architecture of the node. e.g. 'x86_64' or 'arm64'",
"default": "Unknown - Not defined in config.yml"
},
"max_memory": {
"type": "integer",
"description": "Maximum memory (RAM) allowed for this queue in GB."
},
"default_memory_limit": {
"type": "integer",
"description": "Default memory (RAM) limit for this queue in GB."
},
"default_memory_request": {
"type": "integer",
"description": "Default memory (RAM) request for this queue in GB."
},
"min_memory": {
"type": "integer",
"description": "Minimum memory (RAM) allowed for this queue in GB.",
"default": 256
},
"max_cpus": {
"type": "integer",
"description": "Maximum CPU value allowed for this queue."
},
"default_cpu_limit": {
"type": "integer",
"description": "Default CPU limit for pods on this queue."
},
"default_cpu_request": {
"type": "integer",
"description": "Default CPU request for pods on this queue."
},
"min_cpus": {
"type": "integer",
"description": "Minimum CPU value allowed for this queue.",
"default": 250
},
"tolerations": {
"type": "array",
"description": "Kubernetes spec.tolerations required to tolerate the node.",
"required": ["key"],
"additionalProperties": false,
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key of the toleration."
},
"operator": {
"type": "string",
"description": "Operator of the toleration."
},
"value": {
"type": "string",
"description": "Value of the toleration."
},
"effect": {
"type": "string",
"description": "Effect of the toleration."
}
}
}
},
"gpu_resources": {
"type": "array",
"description": "List of GPU resources available to the spawner using this config.",
"required": ["device_name", "activation_resource"],
"additionalProperties": false,
"items": {
"type": "object",
"properties": {
"gpu_name": {
"type": "string",
"description": "Colloquial name for the GPU device. e.g. 'NVIDIA Tesla V100-SXM2-16GB' or 'NVIDIA Tesla T4'"
},
"description": {
"type": "string",
"description": "Description to be displayed in the UI for the device."
},
"brand": {
"type": "string",
"description": "Brand of the GPU device. e.g. 'NVIDIA' or 'AMD'"
},
"vram": {
"type": "integer",
"description": "Amount of VRAM on the device in GB."
},
"activation_resource": {
"type": "string",
"description": "Activation resource for the GPU device. What you put in K8 'spec.containers[X].resources.requests' to activate this GPU. e.g. 'nvidia.com/gpu' or 'nvidia.com/gpu.shared"
},
"default_gpu_request": {
"type": "integer",
"description": "Default int a user can request for this device.",
"default": 1
},
"max_gpu_request": {
"type": "integer",
"description": "Maximum gpus a user can request for this device. Time-sliced GPUs should say 1 unless they work different, if so, contact admin.",
"default": 1
}
}
}
}
}
}
},
"spawner_host_id": {
"type": "integer",
"description": "Unique host_id for worker host. Each host should have at least one spawner and health check worker."
},
"test_abaco_service_password": {
"type": "string",
"description": "Abaco service password is required to run tests as it's able to generate tokens."
},
"image_allow_list": {
"type": "array",
"description": "Docker images that users are allowed to use.",
"items": {
"type": "string"
}
},
"nfs_base_path": {
"type": "string",
"description": "Base path for nfs system root_dir. Should be /{base_path}/{tenant}/, tenant is added at runtime."
},
"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.",
"default": 43200
},
"log_ex_limit": {
"type": "integer",
"description": "Ceiling for custom log_ex able to be set for a tenant."
},
"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
},
"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"
]
}
]
}
}
}