yacron2 clustering demo
=======================

A ready-to-run three-node yacron2 cluster with mutual-TLS peer attestation and
leader election. Brought up by ../../docker-compose-cluster.yml:

    docker compose -f docker-compose-cluster.yml up --build

Files
-----
  jobs.yaml      The shared job set, mounted IDENTICALLY into all three nodes.
                 One job per clusterPolicy (EveryNode / Leader / PreferLeader)
                 plus a manual-only job. The job-set id is a fingerprint of this
                 file, so it must be identical on every node for them to agree.
  node-a.yaml    Per-node `cluster` section (mounted as cluster.yaml on the node)
  node-b.yaml      — TLS identity, peer list, and node name. These differ per
  node-c.yaml      node but do NOT change the job-set id.
  gen-certs.sh   Generates a throwaway cluster CA + per-node certs (SAN = service
                 name) into the shared `cluster-certs` volume on first start.

Dashboards: yacron-a http://localhost:8080/ , yacron-b :8081 , yacron-c :8082 .
Scroll to the "cluster" panel on any dashboard to watch attestation and
leadership. The compose file's header comments list the things to try (failing
the leader, losing quorum, drift, per-policy behaviour, and the opt-in
`distribution: spread` mode that fans leader-gated jobs out across the nodes).

These certificates are for local experimentation only. For real deployments
provision per-node certs from your own PKI; see the wiki page
"Clustering and Leader Election".
