Skip to content
Quickstart

Quickstart

Show the steps for

Create a cluster

sind mounts the working directory read-write into every node, and the Slurm jobs write their output there as root. Work in a scratch directory, not in your home directory:

mkdir sind-demo && cd sind-demo

The simplest command creates a cluster named default with one controller and one worker:

sind create cluster
  1. Start the web UI, and open the URL that it prints in your browser:

    sind ui
  2. Press New cluster…. The New cluster page proposes a free name, such as hpc, and starts from Quick test: a controller and two workers. Set the name to default and set workers to 1.

  3. Under Your files, press Change… and set Directory to the full path of your sind-demo directory, such as ~/sind-demo, where the steps below write the job script. Otherwise the nodes mount ~/sind/default at /data.

  4. Press Create default when the status at the top of the plan says Ready.

The New cluster page: the starts, the name and realm, the nodes by what they are for, and the plan with the nodes, what they take of this host and the command that sind ui will run The New cluster page: the starts, the name and realm, the nodes by what they are for, and the plan with the nodes, what they take of this host and the command that sind ui will run

The Runs block of the plan shows the command that it starts. sind ui also saves the config of the cluster, so you can run the same command from a terminal.

This is equivalent to using this configuration:

kind: Cluster
name: default
nodes:
  - role: controller
  - role: worker

sind will:

  1. Set up mesh infrastructure (network, DNS, SSH) if not already present
  2. Create a cluster network and volumes
  3. Generate munge keys and Slurm configuration
  4. Start all node containers
  5. Wait for all nodes to become ready

On a terminal, sind shows its progress while it works and leaves a line for each step it finished; where standard error is not a terminal, it prints nothing on success. See Progress Display. On a host that had neither the mesh nor the node image, the first cluster ends like this:

$ sind create cluster
✓ mesh  12s  4 ok  426 MiB at 35.5 MiB/s
✓ preflight  1.4s
✓ nodes  5.8s  2 ok
✓ mesh registration  0.3s
✓ slurm  4.6s  2 ok

Check cluster status

sind get clusters

Open Clusters in the rail, then the cluster. Ready for jobs at the top of the Summary tab says whether the cluster can run a job now, and gives the commands to submit one. Below it, the tab shows each node and its services, such as munge, sshd and slurmctld.

A cluster: its state, its nodes by role, the services that are down and what you can do with it A cluster: its state, its nodes by role, the services that are down and what you can do with it

The rest of this section shows the same with sind get.

NAME     NODES (S/C/D/A/W)  SLURM    STATUS
default  2 (0/1/0/0/1)      26.05.6  running

View individual nodes:

sind get nodes
CONTAINER                CLUSTER  ROLE        FQDN                          IP          STATUS
sind-default-controller  default  controller  controller.default.sind.sind  172.19.0.2  running
sind-default-worker-0    default  worker      worker-0.default.sind.sind    172.19.0.3  running

For detailed health information:

sind get cluster

Run Slurm commands

Open an interactive shell on the controller (or submitter, if configured):

sind enter

Or run one-shot commands without an interactive session:

sind exec -- sinfo
sind exec -- srun hostname

Submit a batch job

Create a batch script in your working directory:

cat > job.sh << 'EOF'
#!/bin/bash
#SBATCH --job-name=hello
echo "Hello from $(hostname)"
sleep 30
EOF

Submit and monitor:

sind exec -- sbatch job.sh
Submitted batch job <JOBID>

Check the job queue:

sind exec -- squeue

View the output after the job completes:

cat slurm-<JOBID>.out
Hello from worker-0

By default, sind create cluster bind-mounts the current directory as /data inside all nodes. Batch scripts and output files are shared across the cluster and accessible directly on your host.

SSH into a node

sind ssh controller
sind ssh worker-0

The web UI has no terminal. Open the cluster, then the Connect tab, and press Copy next to the command for the node. Run it in your terminal.

A cluster's Connect tab: the commands that open a shell, run a command, log in to a node or follow its log, and where your files are A cluster's Connect tab: the commands that open a shell, run a command, log in to a node or follow its log, and where your files are

Scale up

Add more workers to the running cluster:

sind create worker --count 3

On the page of the cluster, press Add workers…, set How many to 3, and press Add 3 workers.

The Add workers dialog: how many workers, their size and names, their memory beside that of the nodes that run against the Docker host, and the command it runs The Add workers dialog: how many workers, their size and names, their memory beside that of the nodes that run against the Docker host, and the command it runs

Tear down

Delete the cluster:

sind delete cluster default

On the page of the cluster, press Delete cluster…. Type the name of the cluster to confirm, and press Delete cluster default.

The Delete cluster dialog: what goes, what stays, and the name of the cluster to type to confirm The Delete cluster dialog: what goes, what stays, and the name of the cluster to type to confirm

Or delete all clusters at once:

sind delete cluster --all

When the last cluster is deleted, sind automatically cleans up the shared mesh infrastructure.

Going further

Named clusters with custom configuration

Pipe a configuration directly into sind create cluster --config -:

sind create cluster --config - << 'EOF'
kind: Cluster
name: dev
defaults:
  cpus: 2
  memory: 1g
nodes:
  - controller
  - submitter
  - worker: 3
EOF

Or use a configuration file:

sind create cluster --config cluster.yaml

Multiple clusters can run side by side — each gets its own network, volumes, and DNS namespace. See Cluster Configuration for all available options.

Last updated on