forked from OSC/ood-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
40 lines (37 loc) · 2.09 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
# -*- 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.vm.define "ood", primary: true, autostart: true do |ood|
ood.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
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-6.noarch.rpm
yum install -y ondemand
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: "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.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