-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
52 lines (49 loc) · 1.67 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
$provisioner = <<-EOF
bash /tmp/provision.sh
EOF
Vagrant.configure("2") do |config|
config.vm.define "master" do |this|
this.vm.provider :hyperv do |hv|
hv.memory = 2048
hv.cpus = 2
hv.linked_clone = true
end
# this.vm.provider :hyperv do |hv|
# hv.memory = 2048
# hv.cpus = 2
# hv.linked_clone = true
# end
this.vm.box = "centos/7"
this.vm.network "private_network"
this.vm.hostname = "master"
this.vm.provision "file", source: "./provision.sh", destination: "/tmp/"
this.vm.provision "shell", inline: "bash /tmp/provision.sh master"
this.vm.provision "file", source: "./routes.sh", destination: "/tmp/"
this.vm.provision "shell", inline: "bash /tmp/routes.sh master"
end
config.vm.define "worker" do |this|
this.vm.provider :hyperv do |hv|
hv.memory = 2048
hv.cpus = 2
hv.linked_clone = true
end
# this.vm.provider :virtualbox do |hv|
# hv.memory = 2048
# hv.cpus = 2
# hv.linked_clone = true
# end
this.vm.box = "centos/7"
this.vm.network "private_network"
this.vm.hostname = "worker"
this.vm.provision "file", source: "./provision.sh", destination: "/tmp/"
this.vm.provision "shell", inline: "bash /tmp/provision.sh worker"
this.vm.provision "file", source: "./routes.sh", destination: "/tmp/"
this.vm.provision "shell", inline: "bash /tmp/routes.sh worker"
end
end