QUANT-NET Controller
The QUANT-NET Controller provides the centralized controller functions for the control plane.
quantnet_controller
Run a QUANT-NET Controller instance
Usage
quantnet_controller [OPTIONS]
Options
- --mq-broker-host <mq_broker_host>
Specify the message queue broker host
- --mq-broker-port <mq_broker_port>
Specify the message queue broker port
- --mq-mongo-host <mq_mongo_host>
Specify a MongoDB host (if mongo configured)
- --mq-mongo-port <mq_mongo_port>
Specify a MongoDB port (if mongo configured)
- --plugin-path <plugin_path>
Specify a path containing controller plugins
- --schema-path <schema_path>
Specify a path containing additional schema files
Configuration File
The controller makes use of an INI configuration file. The search path for the controller configuration file includes:
$QUANTNET_HOME/etc/quantnet.cfg
/opt/quantnet/etc/quantnet.cfg
$VIRTUAL_ENV/etc/quantnet.cfg
Example:
[common]
logdir = /var/log/quantnet
loglevel = INFO
[database]
default = mongodb://localhost:27017
[plugins]
path=/opt/quant-net-tutorials
[schemas]
path=/opt/quant-net-tutorials/schema
[scheduling]
name=BatchScheduler
[routing]
name=PathFinder
[monitoring]
name=Monitor
The configuration file may contain multiple sections as documented below.
[common]
- logdir
- Type:
string
- Default:
/var/log/quantnet
A directory to store log files.
- loglevel
- Type:
string
- Default:
INFO
The log level to configure.
INFO,WARN,CRITICAL,ERROR,DEBUG
[database]
- default
- Type:
string
- Default:
-
The database URI. Example:
mongodb://localhost:27017
- schema
- Type:
string
The database schema name. [postgresql specific]
[mq]
- host
- Type:
string
The message queue broker host.
- port
- Type:
string
The message queue broker port.
[experiment_definition]
- def_file_path
- Type:
string
The path to an experiment definition Python source file.
[plugins]
- path
- Type:
string
The path to a directory containing loadable controller plugins.
[schemas]
- path
- Type:
string
The path to a directory containing YAML schemas conforming to the Message Bus spec.
[scheduling]
- name
- Type:
string
The name of a Scheduling module to make active in the Controller.
[routing]
- name
- Type:
string
The name of a Routing module to make active in the Controller.
[monitoring]
- name
- Type:
string
The name of a Monitoring module to make active in the Controller.
Logging File
A Python logging module logger.conf may be included in the QUANT-NET configuration path.
Example:
[loggers]
keys=root,gmqtt
[handlers]
keys=console
[formatters]
keys=simple
[logger_root]
level=INFO
handlers=console
[logger_gmqtt]
level=CRITICAL
handlers=console
qualname=gmqtt
propagate=0
[handler_console]
class=StreamHandler
level=DEBUG
formatter=simple
args=(sys.stdout,)
[formatter_simple]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
Development Install
After downloading the source tree, pull requirements and install package in edit mode:
pip3 install -e .
Local Development Environment
See the Quick Start guide.