-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
84 lines (72 loc) · 2.38 KB
/
Vagrantfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
slurm_conf = %q(
# vim:ft=bash
ClusterName=tester
SlurmUser=slurm
SlurmctldHost=localhost
SlurmctldPidFile=/var/run/slurmctld.pid
SlurmctldDebug=3
SlurmctldLogFile=/var/log/slurmctld.log
StateSaveLocation=/var/spool/slurm/ctld
ReturnToService=1
SlurmdPidFile=/var/run/slurmd.pid
SlurmdSpoolDir=/var/spool/slurm/d
SlurmdDebug=3
SlurmdLogFile=/var/log/slurmd.log
AuthType=auth/munge
MpiDefault=none
ProctrackType=proctrack/pgid
SwitchType=switch/none
TaskPlugin=task/affinity
FastSchedule=2 # version prior to 20.04
SchedulerType=sched/builtin
SelectType=select/cons_res
SelectTypeParameters=CR_CPU
JobAcctGatherType=jobacct_gather/none
JobCompType=jobcomp/none
AccountingStorageType=accounting_storage/none
NodeName=localhost Sockets=1 CoresPerSocket=8 ThreadsPerCore=2 State=UNKNOWN
PartitionName=debug Nodes=localhost Default=YES MaxTime=INFINITE State=UP
).gsub(/^ */,'')
plugin = '/etc/slurm/spank/singularity-exec.so'
wrapper = '/etc/slurm/spank/slurm-singularity-wrapper.sh'
bind = '/etc/slurm,/var/run/munge,/var/spool/slurm'
singularity_conf = %Q(required #{plugin} default= script=#{wrapper} bind=#{bind} args="")
config.vm.box_check_update = false
config.vm.synced_folder ".", "/vagrant", type: "rsync"
# Copy test container into the box
#
%w(
/tmp/debian10.sif
/tmp/centos7.sif
/tmp/centos_stream8.sif
).each do |file|
name = File.basename file
config.vm.provision "file", source: "#{file}", destination: "/tmp/#{name}"
end
##
# Enterprise Linux 8
#
config.vm.define "el8" do |config|
config.vm.hostname = "el8"
config.vm.box = "almalinux/8"
config.vm.provider :libvirt do |libvirt|
libvirt.memory = 2048
libvirt.cpus = 2
end
config.vm.provision "shell" do |s|
s.privileged = true,
s.inline = %q(
dnf install -y epel-release
dnf config-manager --set-enabled powertools
dnf install -y munge slurm-slurmctld slurm-slurmd apptainer \
rpm-build rpmdevtools slurm-devel make gcc gcc-c++ libstdc++-static
echo 123456789123456781234567812345678 > /etc/munge/munge.key
chown munge:munge /etc/munge/munge.key
chmod 600 /etc/munge/munge.key
)
end
end
end