-
Notifications
You must be signed in to change notification settings - Fork 10
/
Vagrantfile
43 lines (41 loc) · 1.57 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
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "node1" do |node1|
node1.vm.hostname = "node1"
node1.vm.provider "virtualbox" do |vb|
vb.name = "Swarm_node1";
disk = './node1secondDisk.vdi'
vb.memory = "1024"
unless File.exist?(disk)
vb.customize ['createhd', '--filename', disk, '--variant', 'Fixed', '--size', 8 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'IDE', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', disk]
end
end
config.vm.define "node2" do |node2|
node2.vm.hostname = "node2"
node2.vm.provider "virtualbox" do |vb|
disk = './node2secondDisk.vdi'
vb.name = "Swarm_node2";
vb.memory = "1024"
unless File.exist?(disk)
vb.customize ['createhd', '--filename', disk, '--variant', 'Fixed', '--size', 8 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'IDE', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', disk]
end
end
config.vm.define "node3" do |node3|
node3.vm.hostname = "node3"
node3.vm.provider "virtualbox" do |vb|
disk = './node3secondDisk.vdi'
vb.name = "Swarm_node3";
vb.memory = "1024"
unless File.exist?(disk)
vb.customize ['createhd', '--filename', disk, '--variant', 'Fixed', '--size', 8 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'IDE', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', disk]
end
end
end