| name | deployment-preflight |
| description | Validate all prerequisites (CLI tools, AWS credentials, environment variables, kubectl context) before running slinky-slurm deployment scripts |
Deployment Preflight Checks
Overview
Use this skill before running any slinky-slurm deployment script (deploy.sh,
setup.sh, install.sh). It validates that all prerequisites are met and
helps diagnose common configuration issues that would cause deployment failures.
The slinky-slurm project deploys Slurm on Amazon SageMaker HyperPod EKS via
the Slinky Project (SchedMD). The deployment workflow has three phases:
- Infrastructure (
deploy.sh) -- provisions HyperPod EKS via CFN or TF
- Image + Values (
setup.sh) -- builds the Slurmd container image and
generates Helm values
- Cluster Install (
install.sh) -- deploys MariaDB, Slurm operator,
and Slurm cluster via Helm
Each phase has different prerequisites. This skill covers all of them.
Prerequisites by Phase
Phase 1: Infrastructure Deployment (deploy.sh)
Required CLI tools:
command -v aws
command -v jq
command -v terraform
Required state:
Environment variables: None required -- deploy.sh accepts all config
via command-line flags.
Phase 2: Image Build + Values (setup.sh)
Required CLI tools:
command -v aws
command -v sed
command -v docker
command -v jq
command -v zip
command -v terraform
command -v zip
Required state:
Phase 3: Cluster Installation (install.sh)
Required CLI tools:
command -v aws
command -v kubectl
command -v helm
command -v curl
command -v sed
Required state:
Steps: Full Preflight Validation
Run these checks before starting a deployment:
Step 1: Verify CLI tools
for tool in aws kubectl helm jq docker curl sed; do
if command -v "$tool" &>/dev/null; then
echo " $tool: OK ($(command -v "$tool"))"
else
echo " $tool: MISSING"
fi
done
Step 2: Verify AWS credentials
aws sts get-caller-identity
Step 3: Verify region and AZ
AWS_REGION="us-west-2"
aws ec2 describe-availability-zones \
--region "${AWS_REGION}" \
--filters "Name=opt-in-status,Values=opt-in-not-required" \
--query "AvailabilityZones[?ZoneType=='availability-zone'].ZoneId | sort(@) | [:5]" \
--output text
Step 4: Verify kubectl context (Phase 3 only)
kubectl cluster-info
kubectl get nodes
Step 5: Verify ECR image exists (if using --skip-build)
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws ecr describe-images \
--repository-name dlc-slurmd \
--image-ids imageTag=25.11.1-ubuntu24.04 \
--region "${AWS_REGION}"
Step 6: Verify Helm access (Phase 3 only)
helm repo add mariadb-operator \
https://mariadb-operator.github.io/mariadb-operator
helm repo update
helm show chart oci://ghcr.io/slinkyproject/charts/slurm-operator --version 1.0.1
Verification
All preflight checks pass when:
- Every required CLI tool is found in PATH
aws sts get-caller-identity returns valid JSON
- The target AZ ID appears in the region's AZ list
kubectl get nodes shows Ready nodes (Phase 3)
- ECR image exists (when using
--skip-build)
Troubleshooting
| Symptom | Cause | Fix |
|---|
aws sts get-caller-identity fails | Expired or missing credentials | Run aws configure or refresh SSO: aws sso login |
| AZ ID not in list | Wrong region or non-standard AZ | Use --az-id with a valid ID from the resolved list |
kubectl get nodes shows no nodes | Wrong kubectl context | Run aws eks update-kubeconfig --name $EKS_CLUSTER_NAME --region $AWS_REGION |
kubectl get nodes shows NotReady | HyperPod nodes still provisioning | Wait 5-10 minutes after deploy.sh completes |
| Docker login fails for DLC ECR | Region mismatch or expired token | DLC registry is always in us-east-1: aws ecr get-login-password --region us-east-1 |
helm repo add fails | Network/proxy issue | Check internet connectivity and proxy settings |
jq: command not found | jq not installed | brew install jq (macOS) or apt install jq (Linux) |
terraform: command not found | terraform not installed | Install from https://developer.hashicorp.com/terraform/install |
References
deploy.sh -- Infrastructure deployment script (lines 124-146: prerequisite checks)
setup.sh -- Image build and values generation (lines 114-127: argument validation)
install.sh -- Cluster installation (lines 61-89: argument parsing)
lib/deploy_helpers.sh -- check_command() function (lines 79-85)
lib/deploy_helpers.sh -- validate_az_id() function (lines 94-103)