myxce/src/configs/resources.yaml
Rongsong Shen a14785108c docs(admin-config-tool): commit spec docs and example configs
design.md, research.md (new), brief.md and requirements.md (updated
during spec authoring: Req 1.6 resolved/superseded by bundling, Req
5.5 added, Req 4.3/4.4 extended for limits.yaml) had been sitting
uncommitted since before implementation began -- the entire 18-task
implementation was built against these documents without them ever
landing in git.

src/configs/*.yaml + schema/*.schema.json: the example config
directory and bundled JSON schemas most of the test suite reads as
"real repo fixtures" (test_config_build.py, test_mapping.py,
test_validation.py, etc.) were likewise never committed -- those
tests would silently skip (skipif guards) rather than run for anyone
else checking out this branch.
2026-07-22 10:11:08 +00:00

199 lines
4 KiB
YAML

---
resources:
# built-in: job slot count (consumed by running jobs, decreases as slots fill)
- name: slots
type: numeric
order: decrease
consumable: true
description: "job slot count (built-in)"
# built-in: dynamic memory load index reported by workers
- name: mem
type: numeric
interval: 60
consumable: false
order: decrease
description: "available memory in MB (built-in dynamic load index)"
# built-in host attributes, registered per-worker by
# controller/worker.c add_hostattrs_resvals()
- name: type
type: string
description: "host OS/arch type (built-in host attribute)"
- name: model
type: string
description: "host hardware model (built-in host attribute)"
- name: cpuf
type: numeric
description: "CPU speed factor (built-in host attribute)"
- name: maxcpus
type: numeric
description: "max CPU count (built-in host attribute)"
- name: maxmem
type: numeric
description: "max memory in MB (built-in host attribute)"
- name: maxswap
type: numeric
description: "max swap in MB (built-in host attribute)"
- name: maxtmp
type: numeric
description: "max tmp disk space in MB (built-in host attribute)"
- name: ndisks
type: numeric
description: "disk count (built-in host attribute)"
# dynamic hostbased resource, external load index
- name: dynres1
type: numeric
interval: 60
order: decrease
consumable: true
release: true
description: "user defined dynamic resource"
resourcemap:
- location:
- default
# dynamic share resource, 2 instances
- name: dynres2
type: numeric
interval: 60
consumable: false
order: decrease
description: "user defined dynamic resource"
resourcemap:
- location:
- host1
- host2
- location:
- host5
- host6
# static share resource, all host share 100 res.
- name: staticres4
type: numeric
interval: 0
consumable: true
order: decrease
resourcemap:
- location:
- all
value: 100
# static share resource, host1 and host2 share the 100 res.
- name: staticres1
type: numeric
interval: 0
consumable: true
order: decrease
resourcemap:
- value: 100
location:
- host1
- host2
# static share resource, each of host1 and host2 shares the 100 res.
- name: staticres2
type: numeric
interval: 0
consumable: false
order: decrease
resourcemap:
- value: 100
location:
- host1
- value: 100
location:
- host2
# static hostbased resource.
- name: staticres3
type: numeric
interval: 0
consumable: true
order: decrease
resourcemap:
- value: 100
location:
- default
- name: res1
type: numeric
interval: 0
consumable: true
order: decrease
resourcemap:
- location:
- all
value: 100
- name: sres1
type: numeric
interval: 0
consumable: true
order: decrease
# boolean resource
- name: bigmem
type: boolean
order: na
resourcemap:
- value: true
location:
- host1
- value: true
location:
- host2
- value: true
location:
- host3
# dynamic string resource
- name: strres1
type: string
interval: 60
consumable: false
order: na
description: "string resources"
resourcemap:
- location:
- default
# static string resource
- name: strres2
type: string
description: "string resources"
resourcemap:
- value: v1
location:
- host1
- value: v2
location:
- host2
- value: v3
location:
- host3
- name: host_quota
description: quota on each host
type: numeric
order: decrease
consumable: true
interval: 0
resourcemap:
- value: 10
location:
- default
- name: gstring
description: string resource
type: string