Skip to content

Add Slurm lexicon and EDA HPC cluster example - #3

Merged
lex00 merged 3 commits into
mainfrom
feat/slurm-lexicon
Mar 23, 2026
Merged

lex00 merged 3 commits into
mainfrom
feat/slurm-lexicon

Conversation

@lex00

@lex00 lex00 commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • lexicons/slurm/ — full chant lexicon for Slurm HPC job scheduler (Tier 1: 11/11, Tier 2: 14/14)
    • 6 lint rules (SLRC001-003, SLRS001, SLRC004, SLRC005), 15 post-synth checks (SLR010–SLR024)
    • 3 composites: GpuPartition, EDACluster, TrainingJob
    • Import parser for existing slurm.conf files
    • LSP completions + hover, 3 AI skills (slurm-generate-cluster, slurm-optimize-partition, slurm-generate-job)
    • 3 bundled examples: basic-cluster, gpu-cluster, multi-partition
    • 9 doc pages
    • 95 tests
  • examples/slurm-aws-hpc/ — production EDA HPC cluster on AWS
    • FSx for Lustre PERSISTENT_2 (1200 GiB), Aurora MySQL Serverless v2 for slurmdbd
    • EFA-enabled p4d.24xlarge spot fleet with ASG lifecycle hooks
    • EventBridge + Lambda for spot interruption handling (<30s drain + requeue)
    • SSM Automation post-provision document (munge key, scontrol reconfigure, sacctmgr setup)
    • EDA license tracking (eda_synth:50, eda_sim:200, calibre_drc:30) via native Slurm Licenses=
    • deploy.sh with pre-flight checks, CFN deployment, and automation polling
  • CI wiring — chant dev onboard slurm: prepack in chant.yml + publish.yml, Dockerfile.smoke, root workspace dep, test/integration.sh Slurm section

Test plan

  • bun test lexicons/slurm — 95 tests pass
  • chant dev check-lexicon lexicons/slurm — Tier 1: 11/11, Tier 2: 14/14
  • npm run build in examples/slurm-aws-hpc/ — produces dist/infra.json + dist/slurm.conf
  • chant lint src in examples/slurm-aws-hpc/ — no errors (5 acceptable WAW009/WAW001 warnings)
  • CI: bun run --cwd lexicons/slurm prepack runs cleanly

🤖 Generated with Claude Code

lex00 added 3 commits March 20, 2026 23:05
Slurm lexicon (Tier 1/2 fully passing — 11/11 required, 14/14 recommended):
- Conf resources: Cluster, Node, Partition, License → slurm.conf
- REST resources: Job, Reservation, QoS (Slurm 23.11 / v0.0.39 inline spec)
- Composites: GpuPartition, EDACluster, TrainingJob
- 6 lint rules: SLRC001-003, SLRS001, and two more
- 15 post-synth checks: SLR010-SLR024 (cluster required, partition nodes, GPU GRES
  type, auth/none, StateSaveLocation, cons_tres params, cons_res deprecated, DefMem
  conflict, GresTypes required, accounting enforce, proctrack safety, fairshare weight,
  default partition, node state, suspend/resume pair)
- Import parser + generator (slurm.conf → TypeScript)
- LSP completions + hover
- 3 AI skills (generate-job, generate-cluster, explain-fairshare)
- 3 initTemplates (default, gpu, multi-partition)
- 9 doc pages
- 95 tests passing

examples/slurm-aws-hpc: production EDA HPC cluster on AWS
- FSx for Lustre PERSISTENT_2 (200 MB/s/TiB) shared scratch at /scratch
- Aurora MySQL Serverless v2 for slurmdbd accounting
- EFA cluster placement group + p4d.24xlarge/p3.16xlarge spot fleet
- EventBridge Lambda for spot interruption drain + requeue (<30s in 2-min window)
- SSM Automation document for orchestrated bootstrap
- EDA partitions: synthesis (48h), sim (168h), gpu_eda (24h)
- License tracking: eda_synth:50, eda_sim:200, calibre_drc:30
- SuspendProgram/ResumeProgram hooks for ASG-based cloud bursting
Bug fixes:
- security.ts: self-referencing SG rule moved to separate EC2SecurityGroupIngress
  resource (CFN can't self-reference inline)
- database.ts: add explicit DBClusterIdentifier; fix DbInstance to use identifier
  string rather than ARN for DBClusterIdentifier
- monitoring.ts: RDS alarm dimension uses cluster identifier string, not ARN
- events.ts: escape \${instanceId} in Lambda ZipFile string so it's passed through
  as JS template literal syntax, not evaluated at build time
- automation.ts: remove CFN deployment steps (can't pass large templates as SSM
  params); document now handles only post-provision config (4 steps)
- config.ts: add dbClusterIdentifier so database.ts and monitoring.ts share one value

Scripts and operational files:
- scripts/deploy.sh: add pre-flight checks (aws, jq, credentials), explicit CFN
  deploy step, slurm.conf push to head node, post-provision automation polling
- scripts/teardown.sh: new — scales ASG to 0, deletes CFN stack, cleans SSM params
- .env.example: new — documents AWS_REGION and CLUSTER_NAME
- .gitignore: new — excludes dist/, .env, *.pem

Package.json: add build:aws, build:slurm, deploy, teardown scripts

README.md: comprehensive (matches cockroachdb example depth)
- ASCII architecture diagram
- Agent walkthrough prompt
- Phase-by-phase deployment guide (build → CFN → post-provision → validate)
- GPU fleet and spot interruption handling explained
- Teardown instructions and cost estimates
- Troubleshooting section for 5 common failure modes
- chant dev onboard: adds slurm prepack to chant.yml + publish.yml,
  Dockerfile.smoke prepack line, root package.json workspace dependency
- test/fixtures/slurm.ts: minimal Cluster/Node/Partition fixture
- test/integration.sh: Slurm section (test_lexicon + test_init)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant