-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathapp.conf
More file actions
515 lines (472 loc) · 16 KB
/
app.conf
File metadata and controls
515 lines (472 loc) · 16 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
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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# All application specific configuration and defaults should reside here
app {
# The service description namespace
description {
# The name of the service
name = "delta"
# The environment in which the service runs
env = "dev"
}
http {
# The default interface to bind to
interface = 127.0.0.1
# The default port to bind to
port = 8080
# The default base uri; the last path segment is considered the API version
base-uri = "http://localhost:8080/v1"
# The timeout when applying the toStrictEntity directive
strict-entity-timeout = 10 seconds
}
# Primary store settings
database {
# Access to database for regular read access (fetch and listing operations)
read = ${app.defaults.database.access}
# Access to database for write access
write = ${app.defaults.database.access}
# Access to database for streaming access (indexing / SSEs)
streaming = ${app.defaults.database.access}
name = ${app.defaults.database.name}
username = ${app.defaults.database.username}
password = ${app.defaults.database.password}
# when true it creates the tables on service boot
tables-autocreate = false
# This will change batch inserts from insert into foo (col1, col2, col3) values (1,2,3) into insert into foo (col1, col2, col3) values (1,2,3), (4,5,6)
# this provides 2-3x performance improvement
rewrite-batch-inserts = true
# Cache for the underlying Postgres partitions
cache {
# The max number of tokens in the partition cache
max-size = 1000
# The duration after an entry in the cache expires
expire-after = 10 minutes
}
# Threshold from which a query is considered slow and will be logged
slow-query-threshold = 2 seconds
}
# Query configuration for view indexing operations
elem-query {
# Type of behaviour to adopt when all elements have been indexed
# - delay: wait for a fixed delay before querying the primary store again
# - passivation: based on the `project-last-update` feature. When selected:
# - for active projects, waits for the fixed delay before retrying
# - for inactive projects, waits for `project-last-update` to notify updates
# of the project to resume, decreasing significantly the number of queries to
# the primary store
type = "delay"
# The maximum number of elements to retrieve in a single query
batch-size = 30
# Fixed delay to wait before attempting to fetch new elements when the current ones have
# already been processed
delay = 2s
}
# Allows to compute incrementally the last update instant and ordering value for each project
# Split in two parts:
# - a write one running on a single node to compute and save in the database the new values
# - a read one running on all nodes, which retrieves those values and notify back indexing routines
# a project is active again
project-last-update {
# Configuration for the write part
batch {
# the maximum batching size, corresponding to the maximum number of elements being aggregated
# at the same time before pushing the update.
max-elements = 100
# the maximum amount of time before pushing the update
max-interval = 1 second
}
# Configuration for the read part
query {
# Maximum number of rows to read back
batch-size = 30
# How much time before attempting to get new updates
refresh-strategy = 1 second
}
# Only projects with a last update instant contained in this interval
inactive-interval = 10 minutes
}
# Database export configuration
export {
# how many rows to get per call
batch-size = 30
# Limit number of events per files (this default value should give ~1GB files)
limit-per-file = 32000
# Max number of concurrent exports
permits = 1
# Target directory for exports
target = "/tmp"
}
# Fusion configuration
fusion {
# The base url for Fusion
base = "http://localhost:8081"
# Allows to return a redirection when fetching a resource with the `Accept` header
# set to `text/html`
enable-redirects = false
# base to use to reconstruct resource identifiers in the proxy pass
resolve-base = "http://localhost:8081"
}
# Json-LD Api configuration
json-ld-api {
# Set the Jena parser to perform extra checks:
# * URIs - whether IRs confirm to all the rules of the URI scheme
# * Literals: whether the lexical form conforms to the rules for the datatype.
# * Triples and quads: check slots have a valid kind of RDF term (parsers usually make this a syntax error anyway).
extra-checks: true
# Set the Jena parser to strict mode
# This mode do the extra-checks described above and reject relative iris/uris
strict: false
# Define the error handler for the Jena parser
# * strict: Both errors and warnings will raise exceptions
# * default: Errors will raise exceptions and warning will result in logs
# * no-warning: Erros will raise exceptions and warning will result in logs
error-handling: "strict"
}
jws {
# JWS configuration to sign and verify JWS payloads.
# Those are used for delegation operations
type = "disabled"
#type: enabled
#private-key = TO_OVERWRITE
ttl = 3 hours
}
# Identities configuration
identities {
# The max number of tokens in the groups cache
max-size = 500
# The duration after which the cache expires
expire-after = 3 minutes
}
# Acls configuration
acls {
# the acls event log configuration
event-log = ${app.defaults.event-log}
# configuration to provision acls at startup
provisioning {
enabled = false
#path = "/path-to-acl"
}
}
# Permissions configuration
permissions {
# the permissions event-log configuration
event-log = ${app.defaults.event-log}
# the minimum set of permissions
minimum = [
"acls/read",
"acls/write",
"permissions/read",
"permissions/write",
"realms/read",
"realms/write",
"events/read",
"projects/read",
"projects/write",
"projects/create",
"projects/delete",
"organizations/read",
"organizations/write",
"organizations/create",
"resources/read",
"resources/write",
"resolvers/write",
"views/query",
"views/write",
"schemas/write",
"schemas/run",
"files/write",
"storages/write",
"version/read",
"quotas/read",
"supervision/read",
"typehierarchy/write"
"export/run"
]
# permissions applied to the creator of the project
owner-permissions = [
"acls/read",
"acls/write",
"projects/read",
"projects/write",
"projects/create",
"projects/delete",
"organizations/read",
"organizations/write",
"organizations/create",
"resources/read",
"resources/write",
"resolvers/write",
"views/query",
"views/write",
"schemas/write",
"files/write",
"storages/write",
"version/read",
"quotas/read"
]
}
# Realms configuration
realms {
# the realms event-log configuration
event-log = ${app.defaults.event-log}
# the realms pagination config
pagination = ${app.defaults.pagination}
# To provision realms at startup
# Only the name and the OpenId config url are mandatory
provisioning {
enabled = false
realms {
# my-realm = {
# name = "My realm name"
# open-id-config = "https://.../path/.well-known/openid-configuration"
# logo = "https://bbp.epfl.ch/path/favicon.png"
# accepted-audiences = ["audience1", "audience2"]
#}
}
}
}
# Organizations configuration
organizations {
# the organizations event-log configuration
event-log = ${app.defaults.event-log}
# the organizations pagination config
pagination = ${app.defaults.pagination}
}
# Projects configuration
projects {
# the projects event-log configuration
event-log = ${app.defaults.event-log}
# the projects pagination config
pagination = ${app.defaults.pagination}
# The project deletion configuration
deletion {
# To make it effective
enabled = false
# Gives a delay for project deletion tasks to be taken into account,
# especially for views deprecation events to be acknowledged by coordinators
propagation-delay = 30 seconds
# The retry strategy to apply when it fails
retry-strategy = {
retry = "exponential"
initial-delay = 30 seconds
max-delay = 1 hour
max-retries = 20
}
}
}
# Quotas for projects
quotas {
# flag to enable or disable project quotas
enabled = false
# maximum number of resources per project. This field is optional
resources = 1000
# maximum number of events per project. This field is optional
events = 2000
# custom quotas for certain projects
custom {
# "myorg/myproject" {
# resources = 2000
# events = 4000
# }
}
}
# Resolvers configuration
resolvers {
# the resolvers event-log configuration
event-log = ${app.defaults.event-log}
defaults = {
# the name of the default resolver
name = "Default resolver"
# the description of the default resolver
description = "Resolver created with the project"
}
}
# Resources configuration
resources {
# the resources event-log configuration
event-log = ${app.defaults.event-log}
# Reject payloads which contain nexus metadata fields (any field beginning with _)
decoding-option = "strict"
# Defines exceptions for schema enforcement
schema-enforcement {
type-whitelist = []
allow-no-types = false
}
# Do not create a new revision of a resource when the update does not introduce a change
skip-update-no-change = true
}
# Schemas configuration
schemas {
# the schemas event-log configuration
event-log = ${app.defaults.event-log}
cache {
# The max number of schemas in cache
max-size = 50
# The duration after an entry in the cache expires
expire-after = 5 minutes
}
}
# Type hierarchy configuration
type-hierarchy {
# the type hierarchy event-log configuration
event-log = ${app.defaults.event-log}
}
# SSE configuration
sse {
# the SSE query configuration
query = ${app.defaults.query}
}
# projection configuration
projections {
cluster {
# Number of nodes in the cluster
size = 1
# Index of the current Delta instance in the cluster
node-index = 0
}
batch {
# the maximum batching size, corresponding to the maximum number of elements
# processed before saving the progress.
max-elements = 30
# the maximum batching duration.
max-interval = 5 seconds
}
retry = ${app.defaults.constant-retry-strategy}
supervision-check-interval = 3 seconds
# how often the failed elem deletion projection will be awoken
delete-expired-every = 5 minutes
# the time after which stored projection errors will be deleted
failed-elem-ttl = 14 days
# the time after which tombstones will be deleted
tombstone-ttl = 7 days
# the time after which stored restarts will be deleted
restart-ttl = 1 hour
query = ${app.defaults.query}
}
defaults {
http-client-compression {
# the retry strategy for the http client
retry = ${app.defaults.constant-retry-strategy}
# the strategy to decide if it is worth retrying when an Http error occurs.
# allowed strategies are 'always', 'never' or 'onServerError'.
is-worth-retrying = "onServerError"
# Flag to decide whether or not to support compression
compression = true
}
http-client-no-compression {
# the retry strategy for the http client
retry = ${app.defaults.constant-retry-strategy}
# the strategy to decide if it is worth retrying when an Http error occurs.
# allowed strategies are 'always', 'never' or 'onServerError'.
is-worth-retrying = "onServerError"
# Flag to decide whether or not to support compression
compression = false
}
# default query configuration
query {
batch-size = 30
refresh-strategy = 3s
}
# default event log configuration
event-log {
query-config = ${app.defaults.query}
max-duration = 14 seconds
}
# Default database configuration
database {
access {
# the database host
host = 127.0.0.1
# the database port
port = 5432
# the pool size
pool-size = 10
}
name = "postgres"
username = "postgres"
password = "postgres"
}
# default pagination configuration
pagination {
# the default number of results if none is specified
default-size = 30
# the maximum number of results if none is specified
size-limit = 1000
# the maximum start index for a page
from-limit = 10000
}
# default indexing configuration
indexing {
# default prefix to use when creating indices
prefix = "delta"
# set to false to disable all indexing
enable = true
}
# default retry strategy, possible value formats are defined at the following config path:
# - ${app.defaults.never-retry-strategy}
# - ${app.defaults.once-retry-strategy}
# - ${app.defaults.constant-retry-strategy}
# - ${app.defaults.exponential-retry-strategy}
retry-strategy = ${app.defaults.never-retry-strategy}
# never retry
never-retry-strategy {
retry = "never"
}
# retry once with a delay
once-retry-stategy {
retry = "once"
delay = 2 seconds
}
# retry with a constant delay until the max-retries value has been met
constant-retry-strategy {
retry = "constant"
delay = 5 seconds
max-retries = 5
}
# retry with an exponential delay until the max-retries value has been met
exponential-retry-strategy {
retry = "exponential"
initial-delay = 500 milliseconds
max-delay = 20 seconds
max-retries = 20
}
}
# monitoring config
monitoring {
# tracing settings
trace {
# Interval at which sampled finished spans will be flushed to SpanReporters.
tick-interval = 10 seconds
# Decides whether to include the stack trace of a Throwable as the "error.stacktrace" Span tag when a Span is marked
# as failed.
include-error-stacktrace = yes
# Configures a sampler that decides which Spans should be sent to Span reporters. The possible values are:
# - always: report all traces.
# - never: don't report any trace.
# - random: randomly decide using the probability defined in the random-sampler.probability setting.
# - adaptive: keeps dynamic samplers for each operation while trying to achieve a set throughput goal.
# - A FQCN of a kamon.trace.Sampler implementation to be used instead. The implementation must have a default
# constructor that will be used by Kamon when creating the instance.
#
sampler = "adaptive"
}
# jaeger settings
jaeger {
enabled = false
host = "localhost"
port = 14268
# Protocol used to send data to Jaeger. The available options are:
# - http: Sends spans using jaeger.thrift over HTTP. Aimed to used with a Jaeger Collector.
# - https: Sends spans using jaeger.thrift over HTTPS. Aimed to used with a Jaeger Collector.
# - udp: Sends spans using jaeger.thrift compact over UDP. Aimed to used with a Jaeger Agent.
protocol = http
# for http and https, this is the full url to be used
http-url = ${app.monitoring.jaeger.protocol}"://"${app.monitoring.jaeger.host}":"${app.monitoring.jaeger.port}"/api/traces"
# Enable or disable including tags from kamon.environment as labels
include-environment-tags = no
}
}
# Service account configuration for internal operations
service-account {
subject: "delta"
realm: "internal"
}
}