Slurm

For a very simple slurm install, we can grab it from the spack repository. This can be done as whatever user you are using for your spack tutorial.

We will run slurm as the 'slurm' user. That user can be created on the master node and all compute nodes. You can set the login shell to /usr/sbin/nologin.

root@nano:/var/spool# addgroup --system slurm
Adding group `slurm' (GID 133) ...
Done.
root@nano:/var/spool# adduser --system --no-create-home --shell /usr/sbin/nologin --disabled-login --group slurm
Adding system user `slurm' (UID 126) ...
Adding new user `slurm' (UID 126) with group `slurm' ...
Not creating home directory `/home/slurm'.

Make note of the GID and UID for the above, and use them to create the slurm user on the compute nodes.

Slurm requires munge, which can be installed with apt-get or aptitude. It needs to be installed on all the nodes.

Munge requires a key - we'll generate one on the master node:

root@nano:/var/spool# dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key
1024+0 records in
1024+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.0119527 s, 85.7 kB/s

And then copy to the compute nodes.

Then enable and start munge on all nodes. Test munge:

munge -n

munge -n | unmunge

munge -n | ssh nano01 unmunge  # should work for any node

Last updated