deploy-slurm-cluster
Skill484 starsChanged 3 months agoMIT-0View on GitHub
Install cert-manager, AWS LB Controller (Pod Identity), MariaDB, Slurm operator, and Slurm cluster on HyperPod EKS using install.sh, including subnet tagging and NLB configuration for SSH access
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NVIDIA/deepopstheir own version, first seen Jul 14, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- NVIDIA/deepops★ 1.5ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectures/sagemaker-hyperpod-eks/slinky-slurm/AGENTS.mdAGENTS.md
- architectures/sagemaker-hyperpod-eks/terraform-modules/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bash-testingSkill
- build-slurm-imageSkill
- deploy-infrastructureSkill
- deployment-preflightSkill
- validate-deploymentSkill
- hyperpod-devops-agent-solutionSkill
- hyperpod-incident-rcaSkill
- hyperpod-incident-triageSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to deploy the Slurm cluster on a HyperPod EKS cluster.
- Distinctive: line 76
Create IAM policy/role for LB Controller (Pod Identity), install chart
- Very specific: line 106
If --skip-setup is specified, verifies slurm-values.yaml exists.
- Very specific: line 273
After install.sh completes, verify with:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deploy Slurm Cluster
Overview
Use this skill to deploy the Slurm cluster on a HyperPod EKS cluster. This is Phase 3 of the slinky-slurm deployment workflow and represents the final step to get a running Slurm cluster with SSH access.
The install.sh script orchestrates:
- Running
setup.sh(unless--skip-setup) - Installing cert-manager (v1.19.2)
- Tagging public subnets for internet-facing NLBs
- Installing the AWS Load Balancer Controller (chart v1.11.0) with Pod Identity
- Applying FSx Lustre PV/PVC
- Installing MariaDB operator and instance
- Installing the Slurm operator (Slinky)
- Installing the Slurm cluster via Helm
- Configuring NLB for SSH login access
- Waiting for the NLB endpoint
Prerequisites
- Phase 1 complete: HyperPod EKS infrastructure deployed (
deploy.sh) - env_vars.sh exists: Generated by
deploy.sh, providesEKS_CLUSTER_NAMEandVPC_ID(required for LB Controller and subnet tagging) - EBS CSI driver installed: With a
gp3StorageClass (required for MariaDB and Slurm persistent volumes). See the HyperPod EBS CSI docs. - kubectl configured: Context points to the correct EKS cluster
- Helm installed:
helmcommand available - curl installed: Used for public IP detection and IAM policy download
- slurm-values.yaml: Generated by
setup.sh(or pass flags to letinstall.shrunsetup.shautomatically)
See the deployment-preflight skill for detailed prerequisite validation.
Steps
Step 1: Choose how to run install.sh
Full install (runs setup.sh internally):
# Build image via CodeBuild + install cluster (g5 via CloudFormation)
bash install.sh --instance-type ml.g5.8xlarge --infra cfn
# Build image locally + install cluster (p5 via Terraform)
bash install.sh --instance-type ml.p5.48xlarge --instance-count 2 --infra tf --local-build
# Skip image build (image already in ECR) + install cluster
bash install.sh --instance-type ml.g5.8xlarge --infra cfn --skip-buildSkip setup (slurm-values.yaml already exists):
# Use previously generated slurm-values.yaml
bash install.sh --skip-setupWARNING: --skip-setup requires that slurm-values.yaml already exists
in the project directory. The script will fail if it's missing.
Step 2: Wait for completion
install.sh will:
- Install cert-manager and wait for webhook readiness
- Tag public subnets with
kubernetes.io/role/elb=1 - Create IAM policy/role for LB Controller (Pod Identity), install chart
- Apply FSx Lustre PV/PVC
- Install MariaDB (waits up to 5 minutes for readiness)
- Install Slurm operator
- Install Slurm cluster
- Configure NLB (waits up to 5 minutes for endpoint)
- Print the SSH command
Total time: approximately 5-10 minutes after setup.sh completes.
Step 3: Connect to the login node
# The SSH command is printed at the end of install.sh
ssh -i ~/.ssh/id_ed25519_slurm root@<NLB_HOSTNAME>What install.sh Does Internally
Phase A: Setup (unless --skip-setup)
Calls setup.sh with pass-through flags:
bash setup.sh ${SETUP_ARGS}All --instance-type, --instance-count, --infra, --repo-name, --tag, --local-build,
--skip-build, and --region flags are passed through to setup.sh.
If --skip-setup is specified, verifies slurm-values.yaml exists.
Phase B: Source env_vars.sh
Sources env_vars.sh (generated by deploy.sh) to get EKS_CLUSTER_NAME
and VPC_ID. Both are required — the script exits with an error if
either is missing.
Phase C: cert-manager Installation
- Adds the jetstack Helm repo
- Installs
cert-managerchart (v1.19.2) incert-managernamespace - Waits for the cert-manager webhook deployment to be Available (120s timeout)
# What the script runs:
helm install cert-manager jetstack/cert-manager \
--version=1.19.2 --namespace=cert-manager --create-namespace \
--set crds.enabled=true --wait
kubectl wait --for=condition=Available \
deployment/cert-manager-webhook -n cert-manager --timeout=120sThe webhook wait prevents race conditions with components that create Certificate resources at install time (e.g., the Slurm operator).
Phase D: Public Subnet Tagging
Tags all public subnets in the VPC with kubernetes.io/role/elb=1. The AWS
LB Controller requires this tag to discover subnets for internet-facing
NLBs. The HyperPod CFN template does not add this tag.
# What the script runs:
PUBLIC_SUBNET_IDS=$(aws ec2 describe-subnets \
--filters "Name=vpc-id,Values=${VPC_ID}" \
"Name=map-public-ip-on-launch,Values=true" \
--query "Subnets[].SubnetId" --output text)
for SUBNET_ID in ${PUBLIC_SUBNET_IDS}; do
aws ec2 create-tags --resources "${SUBNET_ID}" \
--tags "Key=kubernetes.io/role/elb,Value=1"
donePhase E: AWS Load Balancer Controller Installation
Uses Pod Identity (not IRSA/eksctl) for IAM:
- Creates IAM policy
AWSLoadBalancerControllerIAMPolicy_slinky(from upstream v2.11.0 policy JSON) - Creates IAM role
AmazonEKS_LB_Controller_Role_slinkywithpods.eks.amazonaws.comtrust policy - Attaches the policy to the role
- Creates a Pod Identity association for the
aws-load-balancer-controllerservice account inkube-system - Installs the
aws-load-balancer-controllerHelm chart (v1.11.0) - Waits for the LB Controller deployment to be Available (120s timeout)
# What the script runs (simplified):
helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
--version=1.11.0 --namespace=kube-system \
--set clusterName="${EKS_CLUSTER_NAME}" \
--set region="${AWS_REGION}" \
--set vpcId="${VPC_ID}" --waitPhase F: FSx Lustre PV/PVC
Applies the pre-generated lustre-pvc-slurm.yaml (rendered from
lustre-pvc-slurm.yaml.template by setup.sh) which creates a static
PersistentVolume and PersistentVolumeClaim pointing to the FSx filesystem
provisioned by the HyperPod CFN stack.
# What the script runs:
kubectl create namespace slurm
kubectl apply -f lustre-pvc-slurm.yamlPhase G: MariaDB Installation
- Adds the mariadb-operator Helm repo
- Installs
mariadb-operatorchart (v25.10.4) inmariadbnamespace - Applies
mariadb.yaml(MariaDB custom resource inslurmnamespace) - Waits for MariaDB to be Ready (up to 300s timeout)
# What the script runs:
helm install mariadb-operator mariadb-operator/mariadb-operator \
--version=25.10.4 --namespace=mariadb --create-namespace \
--set crds.enabled=true --wait
kubectl apply -f mariadb.yaml
kubectl wait --for=condition=Ready mariadb/mariadb -n slurm --timeout=300sPhase H: Slurm Operator Installation
- Deletes stale CRDs if upgrading from an older version
- Installs
slurm-operatorOCI chart (v1.0.1) inslinkynamespace
# What the script runs:
helm install slurm-operator \
oci://ghcr.io/slinkyproject/charts/slurm-operator \
--version=1.0.1 --namespace=slinky --create-namespace \
--set crds.enabled=true --waitPhase I: Slurm Cluster Installation
Installs the slurm OCI chart (v1.0.1) with the generated values file:
# What the script runs:
helm install slurm \
oci://ghcr.io/slinkyproject/charts/slurm \
--values=slurm-values.yaml \
--version=1.0.1 --namespace=slurmPhase J: NLB Configuration
- Waits for the
slurm-login-slinkyservice to exist - Gets the caller's public IP via
curl https://checkip.amazonaws.com - Renders
slurm-login-service-patch.yamlfrom the template (substitutes${ip_address}for NLB source range restriction) - Patches the service with NLB annotations
- Polls for the NLB hostname (up to 60 iterations, 5s apart = 5 minutes)
# What the script runs:
IP_ADDRESS=$(curl -s https://checkip.amazonaws.com)
sed "s|\${ip_address}|${IP_ADDRESS}|g" \
slurm-login-service-patch.yaml.template \
> slurm-login-service-patch.yaml
kubectl patch service slurm-login-slinky -n slurm \
--patch-file slurm-login-service-patch.yamlCommand Reference
Usage: install.sh [OPTIONS]
Optional:
--skip-setup Use previously generated slurm-values.yaml
--region <region> AWS region (default: AWS CLI configured or us-west-2)
--help Show help
Options passed through to setup.sh:
--instance-type <type> SageMaker instance type (e.g., ml.g5.8xlarge, ml.p5.48xlarge)
--instance-count <N> Number of compute node instances (default: 4)
--infra <cfn|tf> Infrastructure method for CodeBuild stack
--repo-name <name> ECR repository name
--tag <tag> Image tag
--local-build Build image locally instead of CodeBuild
--skip-build Skip image build (use existing image in ECR)Verification
After install.sh completes, verify with:
# Check cert-manager is running
kubectl -n cert-manager get pods
# Check LB Controller is running
kubectl -n kube-system get pods -l app.kubernetes.io/name=aws-load-balancer-controller
# Check all Slurm pods are Running
kubectl -n slurm get pods
kubectl -n slinky get pods
kubectl -n mariadb get pods
# Check FSx PVC is bound
kubectl get pvc fsx-claim -n slurm
# Check the login service has an NLB endpoint
kubectl get svc slurm-login-slinky -n slurm
# SSH into the login node
ssh -i ~/.ssh/id_ed25519_slurm root@<NLB_HOSTNAME>
# On the login node, verify Slurm
sinfo # Shows nodes and partitions
squeue # Shows job queue (should be empty)See the validate-deployment skill for comprehensive post-deployment
validation.
Troubleshooting
| Symptom | Cause | Fix |
| cert-manager webhook timeout | CRDs not installed or resource constraints | Check: kubectl -n cert-manager get pods; verify --set crds.enabled=true |
LB Controller unable to resolve at least one subnet | Public subnets missing kubernetes.io/role/elb=1 tag | Run the subnet tagging step in install.sh or tag manually |
| Pod Identity association fails | EKS Pod Identity addon not enabled | Enable via: aws eks create-addon --cluster-name <name> --addon-name eks-pod-identity-agent |
| MariaDB wait times out | EBS CSI driver not installed or gp3 StorageClass missing | Check: kubectl get sc gp3; see HyperPod EBS CSI docs |
| Slurm operator install fails | OCI registry unreachable | Verify: helm show chart oci://ghcr.io/slinkyproject/charts/slurm-operator --version 1.0.1 |
slurm-values.yaml not found with --skip-setup | Values file not generated | Run setup.sh first, or remove --skip-setup |
EKS_CLUSTER_NAME not set | env_vars.sh missing or not sourced | Run deploy.sh first, or manually create env_vars.sh |
| NLB hostname not available | NLB provisioning still in progress | Wait 2-3 minutes and check: kubectl get svc slurm-login-slinky -n slurm |
| SSH connection refused | NLB not fully provisioned or SSH key mismatch | Wait for NLB DNS to propagate; verify key: ssh -i ~/.ssh/id_ed25519_slurm -v root@<hostname> |
| Helm install says "already installed" | Idempotent check -- previous install exists | To reinstall: helm uninstall slurm -n slurm then re-run |
| CRD conflicts during upgrade | Stale CRDs from older Slinky version | Script handles this (deletes stale CRDs automatically) |
curl: checkip.amazonaws.com fails | No internet access from the machine | Manually set IP and render the patch template |
References
install.sh-- Main cluster installation scriptdestroy.sh-- Reverse teardown (LB Controller + Pod Identity + IAM, cert-manager, FSx PVC, MariaDB, Slurm)setup.sh-- Called internally for image build and values generationmariadb.yaml-- MariaDB custom resource definitionlustre-pvc-slurm.yaml.template-- FSx Lustre PV/PVC templateslurm-values.yaml.template-- Helm values templateslurm-login-service-patch.yaml.template-- NLB service patch templatelib/deploy_helpers.sh--resolve_helm_profile()(used bysetup.sh)- HyperPod EBS CSI docs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

