Files
moebiusbandandClaude Opus 5 668a5bf877 fix(config): update example configurations to match implementation
The shipped examples had drifted from the code that parses them:

- configs/cluster.json was still in the pre-v3 format: no top-level "name",
  "numberOfNodes" instead of the required "nodes" node-list expression, plain
  numbers instead of MetricValue objects for flopRateScalar/flopRateSimd/
  memoryBandwidth, unit strings instead of unit objects, "aggregation": null,
  and hwthread 72 missing from the core topology. It neither validated against
  cluster.schema.json nor decoded into schema.Cluster. Rewritten in the current
  format and extended with the accelerator metrics the GPU subclusters need.
- archive.retention.location is not a field of taskmanager.Retention. That
  decode is not strict, so the key was silently dropped and a "move" policy ran
  with an empty target path. Replaced with target-kind/target-path.
- "ui-file" pointed at ui-config.json while the shipped file is uiConfig.json,
  so ccConfig logged a load error and the UI fell back to defaults.
- Added the options introduced since the examples were written: checkpoint
  file-format/interval/max-wal-size, api-subjects concurrency, db-config,
  nodestate-retention, archive retention/compression, smoothing-window and the
  resample policy/algo defaults.

The config written by -init had no metric-store section, so a server started
right after -init aborted with "missing metricstore configuration".

internal/configexample guards all of this: it resolves "-file" references the
way ccConfig does, strict-decodes every section into the struct that actually
parses it, and validates the cluster configs against the cc-lib schema.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 16:02:32 +02:00

115 lines
3.3 KiB
JSON

{
"main": {
"addr": "0.0.0.0:8088",
"short-running-jobs-duration": 300,
"emission-constant": 317,
"enable-job-taggers": true,
"db-config": {
"cache-size-mb": 16384,
"soft-heap-limit-mb": 131072,
"max-open-connections": 8,
"max-idle-connections": 8,
"max-idle-time-minutes": 30
},
"nodestate-retention": {
"policy": "move",
"age": 168,
"target-kind": "file",
"target-path": "./var/nodestate-archive"
},
"resampling": {
"default-policy": "medium",
"default-algo": "average"
},
"api-subjects": {
"subject-job-event": "cc.job.event",
"subject-node-state": "cc.node.state",
"job-concurrency": 8,
"node-concurrency": 2
}
},
"nats": {
"address": "nats://0.0.0.0:4222",
"username": "root",
"password": "root"
},
"auth": {
"jwts": {
"max-age": "2000h",
"public-key": "kzfYrYy+TzpanWZHJ5qSdMj5uKUWgq74BWhQG6copP0=",
"private-key": "dtPC/6dWJFKZK7KZ78CvWuynylOmjBFyMsUWArwmodOTN9itjL5POlqdZkcnmpJ0yPm4pRaCrvgFaFAbpyik/Q=="
},
"oidc": {
"provider": "http://localhost:8080/realms/clustercockpit",
"client-id": "cc-backend",
"client-secret": "cc-backend-dev-secret",
"sync-user-on-login": true,
"update-user-on-login": true,
"role-mapping": {
"cc-admin": "admin"
}
},
"ldap": {
"url": "ldap://127.0.0.1:389",
"user-base": "ou=users,dc=example,dc=com",
"search-dn": "cn=admin,dc=example,dc=com",
"user-bind": "uid={username},ou=users,dc=example,dc=com",
"user-filter": "(objectclass=posixAccount)",
"username-attr": "cn",
"uid-attr": "uid",
"sync-password": "mashup",
"sync-interval": "2h",
"sync-user-on-login": true,
"update-user-on-login": true,
"role-filters": {
"admin": "(memberOf=cn=cc-admin,ou=groups,dc=example,dc=com)",
"support": "(memberOf=cn=cc-support,ou=groups,dc=example,dc=com)"
}
}
},
"cron": {
"commit-job-worker": "1m",
"duration-worker": "5m",
"footprint-worker": "10m"
},
"archive": {
"kind": "file",
"path": "./var/job-archive",
"compression": 7,
"retention": {
"policy": "move",
"format": "parquet",
"age": 365,
"include-db": true,
"target-kind": "file",
"target-path": "./var/job-archive-retention"
}
},
"metric-store-external": [
{
"scope": "fritz",
"url": "http://0.0.0.0:8084",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw"
},
{
"scope": "alex",
"url": "http://0.0.0.0:8084",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw"
}
],
"metric-store": {
"retention-in-memory": "24h",
"memory-cap": 100,
"num-workers": 10,
"checkpoints": {
"file-format": "wal",
"directory": "./var/checkpoints"
},
"checkpoint-interval": "12h",
"cleanup": {
"mode": "archive",
"directory": "./var/metric-archive"
}
}
}