forked from ajdecon/ansible-simple-slurm-cluster
/
cluster.yml
50 lines (46 loc) · 1.23 KB
/
cluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
# This Ansible playbook sets up a relatively basic HPC-style compute cluster
# using the SLURM resource manager. It also sets up a basic NFS share of /home
# to the compute nodes, configures Ganglia and syslog forwarding to make it
# easier to monitor, and installs some common packages for HPC.
#
# Note that the file config.yml is used to define some variables which
# configure the roles' behavior. The roles should be written in such a way that
# you can run with all the defaults, and leave config.yml empty.
# Run roles common to all hosts in cluster
- hosts: cluster
user: root
vars_files:
- config.yml
roles:
- "epel7"
# - "arctur-repo"
- "sethostname"
- "etchosts"
- "slurm"
- "ganglia-gmond"
- "common-cluster-pkgs"
# Run roles specific to the cluster headnode
- hosts: head
user: root
vars_files:
- config.yml
roles:
- "slurmdbd"
- "nfs-server"
- "rsyslog-collector"
- "ganglia-gmetad"
- "elk-log-server"
- "lmod"
- role: "rsyslog-forwarder"
syslog_target: "localhost"
syslog_target_port: 5200
syslog_fwd_file: "elk-fwd.conf"
# Run roles specific to the cluster compute nodes
- hosts: compute
user: root
vars_files:
- config.yml
roles:
- "nfs-client"
- "rsyslog-forwarder"