-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathVagrantfile
48 lines (45 loc) · 2.5 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.synced_folder "ood-home", "/home/ood", type: "virtualbox", mount_options: ["uid=1001","gid=1001"]
config.vbguest.installer_options = { allow_kernel_upgrade: true }
config.vm.define "ood", primary: true, autostart: true do |ood|
ood.vm.network "forwarded_port", guest: 8080, host: 8080
ood.vm.network "forwarded_port", guest: 5556, host: 5556
ood.vm.network "private_network", ip: "10.0.0.100"
ood.vm.provision "shell", inline: <<-SHELL
yum install -y epel-release centos-release-scl lsof sudo
yum install -y https://yum.osc.edu/ondemand/latest/ondemand-release-web-latest-1-7.noarch.rpm
yum install -y ondemand ondemand-dex
SHELL
ood.vm.provision "shell", path: "../common/ood-setup.sh"
ood.vm.provision "shell", inline: "systemctl enable httpd24-httpd"
ood.vm.provision "shell", inline: "systemctl start httpd24-httpd"
ood.vm.provision "shell", inline: "systemctl enable ondemand-dex"
ood.vm.provision "shell", inline: "systemctl start ondemand-dex"
ood.vm.provision "shell", inline: "hostnamectl set-hostname ood"
ood.vm.provision "file", source: 'hosts', destination: '/tmp/hosts'
ood.vm.provision "file", source: '../common/example.yml', destination: '/tmp/example.yml'
ood.vm.provision "shell", inline: "cp -f /tmp/hosts /etc/hosts"
ood.vm.provision "shell", inline: "cp -f /tmp/example.yml /etc/ood/config/clusters.d/example.yml"
ood.vm.provision "shell", path: "../common/slurm-setup.sh"
end
config.vm.define "head", primary: false, autostart: true do |head|
head.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
head.vm.network "private_network", ip: "10.0.0.101"
head.vm.provision "shell", path: "../common/head-setup.sh"
head.vm.provision "shell", inline: "hostnamectl set-hostname head"
head.vm.provision "file", source: 'hosts', destination: '/tmp/hosts'
head.vm.provision "shell", inline: "cp -f /tmp/hosts /etc/hosts"
head.vm.provision "shell", path: "../common/slurm-setup.sh"
head.vm.provision "shell", inline: "systemctl enable slurmd"
head.vm.provision "shell", inline: "systemctl start slurmd"
head.vm.provision "shell", inline: "systemctl enable slurmctld"
head.vm.provision "shell", inline: "systemctl start slurmctld"
end
end