Commit dd59039f authored by Victor Penso's avatar Victor Penso
Browse files

Split role into components

parent 3e8dcf3d
name 'munged'
description 'MUNGE authentication service'
run_list( 'recipe[base]' )
default_attributes(
##
# CONFIGURATION FILES
#
file: {
##
# Shared secret
#
'/etc/munge/munge.key' => {
content: '030340d651edb16efabf24a8c080d4b7',
action: [ :nothing ],
notifies: [ :restart, 'systemd_unit[munge.service]' ]
}
},
##
# PACKAGES
#
yum_package: {
'munge': { notifies: [ :create, 'file[/etc/munge/munge.key]' ] },
},
##
# SYSTEM SERVICES
#
systemd_unit: {
'munge.service': { action: [:enable,:start] }
}
)
name 'slurm'
description 'SLURM Generic Configuration'
run_list(
'recipe[base]',
'role[munged]'
)
default_attributes(
##
# Groups
#
group: {
##
# Group to operate SLURM services
#
slurm: {}
},
##
# USERS
#
user: {
##
# User to operate the SLURM services
#
slurm: {
home: '/var/lib/slurm',
group: 'slurm',
shell: '/bin/bash',
comment: 'SLURM workload manager'
},
##
# Slurm cluster users
#
spock: {
uid: 1111,
home: '/network/spock',
shell: '/bin/bash'
},
sulu: {
uid: 1112,
home: '/network/sulu',
shell: '/bin/bash'
},
kirk: {
uid: 1113,
home: '/network/kirk',
shell: '/bin/bash'
},
uhura: {
uid: 1114,
home: '/network/uhura',
shell: '/bin/bash'
}
},
##
# DIRECTORIES
#
directory: {
##
# For the Slurm services
#
'/var/log/slurm': { owner: 'slurm' },
##
# Create directories used for NFS export
#
'/etc/slurm': {},
'/network': {}
},
##
# CONFIGURATION FILES
#
file: {
##
# Site specific package repository
#
'/etc/yum.repos.d/site-local.repo': {
content: '
[site-local]
name=site-local
baseurl=http://lxrepo01.devops.test/repo
enabled=1
gpgcheck=0
'
},
},
##
# PACKAGES
#
yum_package: {
'slurm': {},
'slurm-munge': {}
}
)
name 'slurmctld' name 'slurmctld'
description 'Slurm Cluster Controller deployment' description 'Slurm Cluster Controller deployment'
run_list( 'recipe[base]' ) run_list(
'recipe[base]',
'role[slurm]'
)
default_attributes( default_attributes(
##
# Groups
#
group: {
slurm: {}
},
##
# USERS
#
user: {
##
# User to operate the Slurm services
#
slurm: {
home: '/var/lib/slurm',
group: 'slurm',
shell: '/bin/bash',
comment: 'SLURM workload manager'
},
##
# Slurm cluster users
#
spock: {
uid: 1111,
home: '/network/spock',
shell: '/bin/bash'
},
sulu: {
uid: 1112,
home: '/network/sulu',
shell: '/bin/bash'
},
kirk: {
uid: 1113,
home: '/network/kirk',
shell: '/bin/bash'
},
uhura: {
uid: 1114,
home: '/network/uhura',
shell: '/bin/bash'
}
},
## ##
# DIRECTORIES # DIRECTORIES
...@@ -57,12 +16,7 @@ default_attributes( ...@@ -57,12 +16,7 @@ default_attributes(
# #
'/var/lib/slurm/ctld': { owner: 'slurm', recursive: true }, '/var/lib/slurm/ctld': { owner: 'slurm', recursive: true },
'/var/spool/slurm/ctld': { owner: 'slurm', recursive: true }, '/var/spool/slurm/ctld': { owner: 'slurm', recursive: true },
'/var/log/slurm': { owner: 'slurm' },
##
# Create directories used for NFS export
#
'/etc/slurm': {},
'/network': {},
## ##
# User directories on shared storage # User directories on shared storage
# #
...@@ -76,18 +30,6 @@ default_attributes( ...@@ -76,18 +30,6 @@ default_attributes(
# CONFIGURATION FILES # CONFIGURATION FILES
# #
file: { file: {
##
# Site specific package repository
#
'/etc/yum.repos.d/site-local.repo': {
content: '
[site-local]
name=site-local
baseurl=http://lxrepo01.devops.test/repo
enabled=1
gpgcheck=0
'
},
## ##
# NFS shares configuration # NFS shares configuration
# #
...@@ -96,14 +38,6 @@ default_attributes( ...@@ -96,14 +38,6 @@ default_attributes(
notifies: [ :restart, 'systemd_unit[nfs-server.service]' ] notifies: [ :restart, 'systemd_unit[nfs-server.service]' ]
}, },
## ##
# Slurm shared secret
#
'/etc/munge/munge.key' => {
content: '030340d651edb16efabf24a8c080d4b7',
action: [ :nothing ],
notifies: [ :restart, 'systemd_unit[munge.service]' ]
},
##
# slurmctld firewall configuration # slurmctld firewall configuration
# #
'/etc/firewalld/services/slurmctld.xml': { '/etc/firewalld/services/slurmctld.xml': {
...@@ -143,10 +77,7 @@ default_attributes( ...@@ -143,10 +77,7 @@ default_attributes(
# #
yum_package: { yum_package: {
'nfs-utils': {}, 'nfs-utils': {},
'munge': { notifies: [ :create, 'file[/etc/munge/munge.key]' ] }, 'slurm-slurmdbd': {}
'slurm': {},
'slurm-slurmdbd': {},
'slurm-munge': {}
}, },
## ##
...@@ -154,7 +85,6 @@ default_attributes( ...@@ -154,7 +85,6 @@ default_attributes(
# #
systemd_unit: { systemd_unit: {
'nfs-server.service': { action: [:enable,:start] }, 'nfs-server.service': { action: [:enable,:start] },
'munge.service': { action: [:enable,:start] },
'slurmctld.service': { action: [:enable] }, 'slurmctld.service': { action: [:enable] },
'slurmdbd.service': { action: [:enable]} 'slurmdbd.service': { action: [:enable]}
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment