awslabs/awsome-distributed-ai/deploy-slurm-cluster

Claude Code and agent skill by awslabs/awsome-distributed-ai

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

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

Install

npx vskill@latest install awslabs/awsome-distributed-ai/deploy-slurm-cluster

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as awslabs/awsome-distributed-ai/deploy-slurm-cluster.

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:

  1. Running setup.sh (unless --skip-setup)
  2. Installing cert-manager (v1.19.2)
  3. Tagging public subnets for internet-facing NLBs
  4. Installing the AWS Load Balancer Controller (chart v1.11.0) with Pod Identity
  5. Applying FSx Lustre PV/PVC
  6. Installing MariaDB operator and instance
  7. Installing the Slurm operator (Slinky)
  8. Installing the Slurm cluster via Helm
  9. Configuring NLB for SSH login access
  10. Waiting for the NLB endpoint

Prerequisites

  • Phase 1 complete: HyperPod EKS infrastructure deployed (deploy.sh)
  • env_vars.sh exists: Generated by deploy.sh, provides EKS_CLUSTER_NAME

and VPC_ID (required for LB Controller and subnet tagging)

  • EBS CSI driver installed: With a gp3 StorageClass (required for

MariaDB and Slurm persistent volumes). See the HyperPod EBS CSI docs.

  • kubectl configured: Context points to the correct EKS cluster
  • Helm installed: helm command available
  • curl installed: Used for public IP detection and IAM policy download
  • slurm-values.yaml: Generated by setup.sh (or pass flags to let

install.sh run setup.sh automatically)

See the deployment-preflight skill for detailed prerequisite validation.

Steps

Step 1: Choose how to run install.sh

Full install (runs setup.sh internally):

bash
# 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-build

Skip setup (slurm-values.yaml already exists):

bash
# Use previously generated slurm-values.yaml
bash install.sh --skip-setup

WARNING: --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:

  1. Install cert-manager and wait for webhook readiness
  2. Tag public subnets with kubernetes.io/role/elb=1
  3. Create IAM policy/role for LB Controller (Pod Identity), install chart
  4. Apply FSx Lustre PV/PVC
  5. Install MariaDB (waits up to 5 minutes for readiness)
  6. Install Slurm operator
  7. Install Slurm cluster
  8. Configure NLB (waits up to 5 minutes for endpoint)
  9. Print the SSH command

Total time: approximately 5-10 minutes after setup.sh completes.

Step 3: Connect to the login node
bash
# 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
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
  1. Adds the jetstack Helm repo
  2. Installs cert-manager chart (v1.19.2) in cert-manager namespace
  3. Waits for the cert-manager webhook deployment to be Available (120s

timeout)

bash
# 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=120s

The 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.

bash
# 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"
done
Phase E: AWS Load Balancer Controller Installation

Uses Pod Identity (not IRSA/eksctl) for IAM:

  1. Creates IAM policy AWSLoadBalancerControllerIAMPolicy_slinky (from

upstream v2.11.0 policy JSON)

  1. Creates IAM role AmazonEKS_LB_Controller_Role_slinky with

pods.eks.amazonaws.com trust policy

  1. Attaches the policy to the role
  2. Creates a Pod Identity association for the

aws-load-balancer-controller service account in kube-system

  1. Installs the aws-load-balancer-controller Helm chart (v1.11.0)
  2. Waits for the LB Controller deployment to be Available (120s timeout)
bash
# 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}" --wait
Phase 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.

bash
# What the script runs:
kubectl create namespace slurm
kubectl apply -f lustre-pvc-slurm.yaml
Phase G: MariaDB Installation
  1. Adds the mariadb-operator Helm repo
  2. Installs mariadb-operator chart (v25.10.4) in mariadb namespace
  3. Applies mariadb.yaml (MariaDB custom resource in slurm namespace)
  4. Waits for MariaDB to be Ready (up to 300s timeout)
bash
# 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=300s
Phase H: Slurm Operator Installation
  1. Deletes stale CRDs if upgrading from an older version
  2. Installs slurm-operator OCI chart (v1.0.1) in slinky namespace
bash
# 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 --wait
Phase I: Slurm Cluster Installation

Installs the slurm OCI chart (v1.0.1) with the generated values file:

bash
# What the script runs:
helm install slurm \
oci://ghcr.io/slinkyproject/charts/slurm \
--values=slurm-values.yaml \
--version=1.0.1 --namespace=slurm
Phase J: NLB Configuration
  1. Waits for the slurm-login-slinky service to exist
  2. Gets the caller's public IP via curl https://checkip.amazonaws.com
  3. Renders slurm-login-service-patch.yaml from the template (substitutes

${ip_address} for NLB source range restriction)

  1. Patches the service with NLB annotations
  2. Polls for the NLB hostname (up to 60 iterations, 5s apart = 5 minutes)
bash
# 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.yaml

Command 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:

bash
# 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

SymptomCauseFix
cert-manager webhook timeoutCRDs not installed or resource constraintsCheck: kubectl -n cert-manager get pods; verify --set crds.enabled=true
LB Controller unable to resolve at least one subnetPublic subnets missing kubernetes.io/role/elb=1 tagRun the subnet tagging step in install.sh or tag manually
Pod Identity association failsEKS Pod Identity addon not enabledEnable via: aws eks create-addon --cluster-name <name> --addon-name eks-pod-identity-agent
MariaDB wait times outEBS CSI driver not installed or gp3 StorageClass missingCheck: kubectl get sc gp3; see HyperPod EBS CSI docs
Slurm operator install failsOCI registry unreachableVerify: helm show chart oci://ghcr.io/slinkyproject/charts/slurm-operator --version 1.0.1
slurm-values.yaml not found with --skip-setupValues file not generatedRun setup.sh first, or remove --skip-setup
EKS_CLUSTER_NAME not setenv_vars.sh missing or not sourcedRun deploy.sh first, or manually create env_vars.sh
NLB hostname not availableNLB provisioning still in progressWait 2-3 minutes and check: kubectl get svc slurm-login-slinky -n slurm
SSH connection refusedNLB not fully provisioned or SSH key mismatchWait 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 existsTo reinstall: helm uninstall slurm -n slurm then re-run
CRD conflicts during upgradeStale CRDs from older Slinky versionScript handles this (deletes stale CRDs automatically)
curl: checkip.amazonaws.com failsNo internet access from the machineManually set IP and render the patch template

References

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
480
Repository forks
207
7-day trend score
31

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/awslabs/awsome-distributed-ai/deploy-slurm-cluster/badge)](https://verified-skill.com/skills/awslabs/awsome-distributed-ai/deploy-slurm-cluster)

Something wrong with this skill or its page? Tell us.