Skip to content

roocs/slurm-playbook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slurm-playbook

Ansible playbook for Slurm

Single server installation

Create an inventory file, copying structure of:

cp inventories/vagrant-single.yml custom.yml

Run the playbook:

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i custom.yml playbook.yml
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i custom.yml playbook.yml

Cluster installation

Create an inventory file, copying structure of:

cp inventories/vagrant-cluster.yml custom.yml

Run the playbook:

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i custom.yml playbook.yml

Note about Vagrant build

!WARNING!: on a Vagrant cluster, you might need to edit the /etc/hosts files on each server.

The playbook attempts to do this for you.

Note about Slurm (and associated) RPMs

The RPMs are prepared by STFC colleagues, hosted inside the STFC firewall at:

http://yumit.esc.rl.ac.uk/raltools/7/RPMS/

We copy them to our public server at:

http://gws-access.jasmin.ac.uk/public/cedaproc/rpms

Test Slurm is working

You can test slurm is working on the master or worker nodes, using:

squeue # to view the queue

sbatch /root/hostname.sh # to run a job
sbatch /root/hostname.sh ; sbatch /root/hostname.sh  # to run a couple more jobs

squeue # to see if they are running/completing

Test with vagrant file

Vagrant with cluster

Vagrant with cluster

Use the Vagrantfile to setup up a cluster:

$ vagrant up
$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u vagrant --private-key=~/.vagrant.d/insecure_private_key -i inventories/vagrant-cluster.yml playbook.yml
$ vagrant ssh slurmserver

Vagrant with single node

Use the Vagrantfile to setup up a single node on slurmserver:

$ vagrant up slurmserver
$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u vagrant --private-key=~/.vagrant.d/insecure_private_key -i inventories/vagrant-single.yml playbook.yml
$ vagrant ssh slurmserver

Vagrant with single node

Use the Vagrantfile to setup up a single node on slurmserver:

$ vagrant up slurmserver
$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u vagrant --private-key=~/.vagrant.d/insecure_private_key -i inventories/vagrant-single.yml playbook.yml
$ vagrant ssh slurmserver

Firewall changes required

If the firewall is not automatically opened in iptables then you will need these rules:

  1. On the master node:
# Slurm ports
-A INPUT                                       -p tcp -m multiport --dports 6817,6818      -j ACCEPT
  1. On the worker nodes:
# Slurm ports
-A INPUT                                       -p tcp -m multiport --dports 6817,6818      -j ACCEPT

About

Ansible playbook for Slurm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jinja 79.1%
  • Makefile 15.6%
  • Shell 5.3%