-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnio.conf
648 lines (494 loc) · 16.1 KB
/
nio.conf
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
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# n.io project configuration
#
[user_defined]
# host and port to launch rest web server on
NIOHOST=0.0.0.0
NIOPORT=8181
# Path to project root, leave blank to auto detect - it will use the root
# specified when running the binary (passed with -r or --root)
PROJECT_ROOT=
INSTANCE_NAME=local
INSTANCE_ID=local
# Pubkeeper Client
PK_TOKEN=
PK_HOST=
PK_PORT=443
PK_SECURE=True
PK_CA_CHAIN=
# WebsocketBrew Variables
WS_HOST=
WS_PORT=443
WS_SECURE=True
# Pubkeeper Server
PKS_JWT_SECRET=
PKS_ADDR=
PKS_INTERFACE=
PKS_PORT=
# Redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
# Mongo
MONGO_HOST=127.0.0.1
MONGO_PORT=27017
# ZMQ / ZMQBrew Variables
# your IP address that other nodes can reach you on
IP=127.0.0.1
DIAGNOSTIC_URL_PREFIX=https://api.nio.works/v1/diagnostic
[environment]
# Location of custom extensions for auto-discovery
#
#blocks=blocks
#components=niocore.components
#services=nio.service
[components]
# discoverable components that should be disabled from project
#
disabled=SNMPAgent, PubkeeperServer
[service]
# specify block router class used by services
#
#block_router=nio.router.thread_pool_executor.ThreadedPoolExecutorRouter
# when launching nio, start auto-start services asynchronously
#
#async_start=true
# when starting a service, start blocks asynchronously
#
#blocks_async_start=false
# when stopping a service, stop blocks asynchronously
#
#blocks_async_stop=true
# clone signals when a block notifies to two blocks
#
#clone_signals=true
# block router verifies that objects processed by blocks are nio signals
#
#check_signal_type=true
# when using ThreadedPoolExecutorRouter max workers is the maximum number of
# threads that will run concurrently
#
#thread_pool_max_workers=50
# time to wait for a service's response when sending an IPC request
#
#ipc_request_time_to_live=2
# maximum time to give a service process to launch and configure
#
#configure_timeout=60
# interval at which to check if service is fully configured
# this setting allows not to wait for configure timeout to expire in case
# of failure by monitoring service at this defined interval
#
#configure_check_interval=1
# maximum time to give a service process to start
#
#start_timeout=10
# maximum time to give a service process to stop
#
#stop_timeout=10
# interval at which to check if service process has stopped on its own
#
#stop_check_interval=1
# maximum time to give a service to stop
#
#service_stop_timeout=5
# interval at which to check if parent process has terminated in which case
# service will terminate, 0 or less will disable this check while a positive
# number indicates how often this check is performed
#check_parent_timeout=0
# include router diagnostics
#
#router_diagnostics=true
# router diagnostics interval
#
#router_diagnostic_interval=3600
[discovery]
# when a block is not decorated with discoverable-like decorator,
# this will be its default discoverability
#block_default=True
# when a service is not decorated with discoverable-like decorator,
# this will be its default discoverability
#service_default=False
# when a component is not decorated with discoverable-like decorator,
# this will be its default discoverability
#component_default=False
# comma separated list of patterns for modules to exclude from block discovery
#
#block_module_exclusions=*.tests, *.tests.*
# comma separated list of patterns for modules to exclude from service discovery
#
#service_module_exclusions=*.tests, *.tests.*
[logging]
# dictionary of python logging configuration
#
conf=etc/logging.json
[providers]
# file provider python module
#
#type=niocore.configuration.providers.file.FileConfigurationProvider
# path to configuration file provider
#
#config_directory=etc
[pubkeeper_client]
# The JWT token issued to you by the pubkeeper server, used to authenticate
#
token=[[PK_TOKEN]]
# IP of the Pubkeeper Server
#
host=[[PK_HOST]]
# Port of the Pubkeeper Server
#
port=[[PK_PORT]]
# Certificate Authority Chain for Pubkeeper Server
# when using self assigned certificates, Using this
# option will force secure to true
#
ca_chain=[[PK_CA_CHAIN]]
# Assume wss, for secure connection to pubkeeper server
#
secure=[[PK_SECURE]]
# Validate certificate. Useful for testing self-assigned
# certificates without a ca_chain.
#
#validate=True
# Interval to keep heartbeat on the websocket channel. After 3 failed intervals
# the server will close the connection (default: 10)
#
#websocket_ping_interval=10
# List of all the brews you wish to use with the system
# should be a comma separated list of the classes
#
brews=pubkeeper.brew.local.brew.LocalBrew, pubkeeper.brew.websocket.brew.WebsocketBrew
[pubkeeper_server]
# Specifies whether this nio instance launches its own Pubkeeper Server
#
#standalone=False
# JWT Secret. Used to validate tokens clients give to authenticate
#
jwt_secret=[[PKS_JWT_SECRET]]
# Static address to use (default: 127.0.0.1)
#
ip_address=[[PKS_ADDR]]
# Interface, auto-detect the address of the provided interface
# and use it as the address to bind to. This is used only if
# the PKS_ADDR (ip_address) is not set (default: lo0)
#
interface=[[PKS_INTERFACE]]
# Port to run the server on (default: 9898)
#
port=[[PKS_PORT]]
# Maximum time to wait in seconds for Pubkeeper Server to start (note: relevant
# ony when in standalone mode)
#connect_timeout=2
# Interval to keep heartbeat on the websocket channel. After 3 failed intervals
# the server will close the connection (default: 10)
#
#websocket_ping_interval=10
[pubkeeper.brew.local.brew.LocalBrew]
# use localhost rather than unix domain socket
#
# use_localhost=False
[pubkeeper.brew.websocket.brew.WebsocketBrew]
# hostname/ip of the Websocket Server
#
ws_host=[[WS_HOST]]
# port of the Websocket Server
#
ws_port=[[WS_PORT]]
# Should we maintain a wss connection to websocket server
#
ws_secure=[[WS_SECURE]]
[pubkeeper.brew.zmq.brew.ZMQBrew]
# your public ip address that the master broker can talk to you on
#
ip_address=[[IP]]
# minimum port value that a new publisher can be assigned to
#
publisher_min_port=9010
# maximum port value that a new publisher can be assigned to
#
publisher_max_port=9199
# linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is disconnected
#
#linger=1000
# high water mark is a hard limit on the maximum number of outstanding messages ZMQ shall queue in memory
#
#hwm_size=100000
# sets the maximum number of sockets allowed on the context
#
#max_sockets=1023
# size of the ZMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one.
#
#max_io_thread_count=1
# ZMQ Encryption settings
# optional comma separated list of allowed ip addresses, if none specified,
# this extra layer of security is not enforced.
# This setting will only take effect if the key encryption is enabled with
# the settings below.
allowed_ip_addresses = [[ALLOWED_IP_ADDRESSES]]
# used for zmq strongest security model
# This is a setting that must be set on the publisher instance.
# Every subscriber's client public key should go in this directory.
# The public keys for each subscriber should be paired with the subscriber's
# secret that is set on that host's 'subscriber_client_secret_cert'
publisher_public_keys_dir = [[PUBLISHER_PUBLIC_KEYS_DIR]]
# publisher server-like certificates
# The instance containing publishers must set it's server secret key.
# All subscriber nodes only need to set the server's public key.
publisher_server_public_cert=[[PUBLISHER_SERVER_PUBLIC_CERT]]
publisher_server_secret_cert=[[PUBLISHER_SERVER_SECRET_CERT]]
# subscriber client-like certificates
# This subscriber's secret key. This will be paired with the public key
# that should be copied to the publisher instance's public keys folder
subscriber_client_secret_cert=[[SUBSCRIBER_CLIENT_SECRET_CERT]]
[persistence]
# directory to store core persistence files, which includes blocks, services
# plus any other data persisted through components
#configuration_data=etc/core_persistence
# directory to store service persistence files
#
#data=etc/services_persistence
# redis host ip address to connect to
redis_host=[[REDIS_HOST]]
# redis port to connect to
redis_port=[[REDIS_PORT]]
# redis key for core persistence
redis_core_id=[[INSTANCE_ID]]
# redis key for service persistence
redis_services_id=[[INSTANCE_ID]]
[scheduler]
# minimum amount of time allowed for a scheduled job
#
#min_interval=0.1
# interval at which the scheduler will check for jobs to be run
#
#resolution=0.1
[security]
# json configuration that defines users and their passwords - can point to a conf file
#
#users=etc/users.json
# json configuration that maps users to permissions - can point to a conf file
#
#permissions=etc/permissions.json
# JWT Key for cloud instances
#
jwt_key_b64=[[ JWT_KEY_64 ]]
# [security.oauth]
#
## json configuration that maps users to permissions - can point to a conf file
##
##permissions=etc/permissions.json
#
## identify client that is making responses - used to get an access token
##
##client_id=407408718192.apps.googleusercontent.com
#
## url for validating access token
##
##validate_url=https=/www.googleapis.com/oauth2/v2/tokeninfo?access_token=%s
[web]
# web server max thread pool size
#
#server_thread_pool=50
# include error traceback when reporting failed requests
#
#request_show_tracebacks=false
# cors allow origin
#
#cors_allow_origin=*
[management_publisher]
# pubsub topic to publish on
#
#topic=management
# specifies if INSTANCE_ID is appended to the topic
#
#add_instance_id=true
[diagnostic]
# Location of the diagnostic API
#
api_url_prefix=[[DIAGNOSTIC_URL_PREFIX]]
# report service diagnostics?
#
#service=true
# report signals diagnostics?
#
#signals=true
# enable a failure queue
#
#failure_queue=true
# size of the failure queue in messages queued
#
#failure_queue_len=10000
# specifies if INSTANCE_ID is appended to the topic specified in management_publisher
#
#add_instance_id=true
[rest]
# settings for the web server that will host the core REST API
#
# host and port to launch rest web server on
#
port=[[NIOPORT]]
host=[[NIOHOST]]
# if configured host is unavailable, interval at which network availability is checked and web server restarted
#
#network_retry_interval=30
# path to ssl certificate files
#
ssl_certificate:
ssl_private_key:
# optional certificate chain
ssl_certificate_chain:
[service_monitor]
# interval (in seconds) to check on services in "started"
#
#healthy_monitor_interval=30
# interval (in seconds) to check on services in "error"
#
#failed_monitor_interval=60
# interval (in seconds) to wait before restarting a service when service cannot be reached
# < 0 ==> restart is disabled
# 0 ==> restart upon error detection
# > 0 ==> interval to wait while service is unreachable before restarting it
#restart_service_interval=-1
[snmp]
# host and port to launch snmp agent on
#
#host=127.0.0.1
#port=161
# community security name and agent name mapping
#
#community_index=agent
#community_name=public
# host and port to launch snmp trap server on
#
#trap_host=127.0.0.1
#trap_port=162
# community agent name for traps
#
#trap_community_index=agent
# comma separated list of services to register status change traps for
#
#status_traps=error
# ZMQ based communication module - Legacy
[communication]
# is this the master broker or a slave node
#
master=[[MASTER_BROKER]]
# the ip address of the master broker
#
broker_ip_address=[[COMHOST]]
# your public ip address that the master broker can talk to you on
#
ip_address=[[IP]]
# optionally set ip_address dynamically by interface name
#
#ip_interface=
# minimum port value that a new publisher can be assigned to
#
publisher_min_port=9010
# maximum port value that a new publisher can be assigned to
#
publisher_max_port=9199
# Bind to all interfaces when launching the broker
#broker_bind_to_all=False
# matching algorithm to use for subscribers
#
#matching=nio.modules.communication.matching.default.DefaultMatching
# interval between publisher heartbeats
#
#publisher_heartbeat_interval=30
# maximum time to wait before considering a Publisher invalid
#
#publisher_heartbeat_timeout=100
# ports used by master broker for establishing new publishers and subscribers
#
broker_xpub_port=[[XPUB_PORT]]
broker_xsub_port=[[XSUB_PORT]]
# interval between broker heartbeats
#
#broker_heartbeat_interval=30
# maximum time to wait before a broker considers a client invalid
#
#broker_heartbeat_timeout=100
# interval at which to check if a handshake response has been obtained from broker
#
#broker_handshake_interval=0.1
# time to wait before a client gives up waiting for broker to acknowledge its presence
#
#broker_handshake_timeout=5
# rate (in milliseconds) at which broker checks for messages
#
#broker_poll_rate=100
# time to wait for removal of publishers and listeners to clean up during stop
#
#publishers_notification_timeout=5
# time to wait after publisher is marked for deletion and it's actual deletion - allows for listeners to unsubscribe before publisher deletion
#
#listeners_removal_timeout=2
# interval at which to retry removing listeners if some are still active after publisher deletion
#
#termination_retry_interval=0.1
# time to wait before retrying a networking connection after failure
#
#connect_interval=1
# time to wait when establishing a network connection
#
#connect_timeout=0
# linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is disconnected
#
#linger=1000
# high water mark is a hard limit on the maximum number of outstanding messages ZMQ shall queue in memory
#
#hwm_size=100000
# sets the maximum number of sockets allowed on the context
#
#max_sockets=1023
# size of the ZMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one.
#
#max_io_thread_count=1
# zmq setting timeout setting for initial client subscription
#
#zmq_port_reconnect_timeout=3
# maximum amount of time a sync-request will wait for expected replies
#
#sync_request_timeout=1
# poll interval to use for synchronizations
#
#sync_poll_interval=0.1
# maximum amount of time replier will wait for request confirmation
#
#sync_reply_timeout=1
# ZMQ Encryption settings
# optional comma separated list of allowed ip addresses, if none specified,
# this extra layer of security is not enforced.
# This setting will only take effect if the key encryption is enabled with
# the settings below.
#allowed_ip_addresses = [[ALLOWED_IP_ADDRESSES]]
# used for zmq strongest security model
# This is a setting that must be set on the broker instance.
# Every client's public key should go in this directory.
# The public keys for each client should be paired with the client's
# secret that is set on that host's CLIENT_SECRET_CERT
#broker_public_keys_dir = [[BROKER_PUBLIC_KEYS_DIR]]
# broker server-like certificates
# The broker instance must set it's server secret key.
# All slave nodes only need to set the server's public key.
#broker_server_public_cert=[[BROKER_SERVER_PUBLIC_CERT]]
#broker_server_secret_cert=[[BROKER_SERVER_SECRET_CERT]]
# broker client-like certificates
# This client's secret key. This will be paired with the public key
# that should be copied to the broker instance's public keys folder
#broker_client_secret_cert=[[BROKER_CLIENT_SECRET_CERT]]
# used for zmq strongest security model
# This is a setting that must be set on the publisher instance.
# Every subscriber's client public key should go in this directory.
# The public keys for each subscriber should be paired with the subscriber's
# secret that is set on that host's 'subscriber_client_secret_cert'
#publisher_public_keys_dir = [[PUBLISHER_PUBLIC_KEYS_DIR]]
# publisher server-like certificates
# The instance containing publishers must set it's server secret key.
# All subscriber nodes only need to set the server's public key.
#publisher_server_public_cert=[[PUBLISHER_SERVER_PUBLIC_CERT]]
#publisher_server_secret_cert=[[PUBLISHER_SERVER_SECRET_CERT]]
# subscriber client-like certificates
# This subscriber's secret key. This will be paired with the public key
# that should be copied to the publisher instance's public keys folder
#subscriber_client_secret_cert=[[SUBSCRIBER_CLIENT_SECRET_CERT]]