Configuration
Categories:
Configuration is provided as a flat JSON file. The default path is ./config.json in the working directory; an alternative path can be specified with the -config flag.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
server | string | yes | — | IP address or hostname of the NATS server |
port | integer | yes | — | Port of the NATS server |
requestSubject | string | yes | — | NATS subject to subscribe to for incoming control requests. All cc-node-controller instances in a cluster can share the same subject; each daemon only processes messages directed at its own hostname. |
user | string | no | — | Username for NATS basic authentication |
password | string | no | — | Password for NATS basic authentication |
credsFile | string | no | — | Path to a NATS credentials file (for NKey/JWT-based authentication) |
nkeySeedFile | string | no | — | Path to an NKey seed file |
outstandingMessagesInQueue | integer | no | 1000 | Size of the internal channel buffer for incoming NATS messages |
Minimal Example
{
"server": "127.0.0.1",
"port": 4222,
"requestSubject": "cc-control"
}
Full Example
{
"server": "nats.example.org",
"port": 4222,
"requestSubject": "clustercockpit.control",
"user": "ccnc-user",
"password": "s3cr3t",
"outstandingMessagesInQueue": 500
}
Authentication
cc-node-controller supports three NATS authentication methods. Only one should be configured at a time:
Basic authentication (user + password):
{
"server": "nats.example.org",
"port": 4222,
"requestSubject": "cc-control",
"user": "ccnc-user",
"password": "s3cr3t"
}
Credentials file (NKey + JWT, generated by nsc):
{
"server": "nats.example.org",
"port": 4222,
"requestSubject": "cc-control",
"credsFile": "/etc/cc-node-controller/nats.creds"
}
NKey seed file:
{
"server": "nats.example.org",
"port": 4222,
"requestSubject": "cc-control",
"nkeySeedFile": "/etc/cc-node-controller/nkey.seed"
}
Request Subject and Multi-Cluster Setup
All cc-node-controller instances in a cluster can share the same requestSubject. Each daemon filters incoming messages by hostname and silently ignores messages intended for other nodes.
For multi-cluster deployments, use a different requestSubject per cluster, or use NATS subject namespacing (e.g. cc-control.fritz, cc-control.alex). The cc-energy-manager controller section uses a %c placeholder in its requestSubject to inject the cluster name automatically — the value here must match the expanded form for the respective cluster.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.