Ansible playbook for Slurm
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
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
!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.
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
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
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
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
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
If the firewall is not automatically opened in iptables then you will need these rules:
- On the master node:
# Slurm ports
-A INPUT -p tcp -m multiport --dports 6817,6818 -j ACCEPT
- On the worker nodes:
# Slurm ports
-A INPUT -p tcp -m multiport --dports 6817,6818 -j ACCEPT