-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
76 lines (64 loc) · 2.35 KB
/
Vagrantfile
File metadata and controls
76 lines (64 loc) · 2.35 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.define "controller" do |controller|
controller.vm.box = "ubuntu/trusty64"
controller.vm.hostname = "controller"
controller.vm.network "private_network", ip: "10.1.0.11"
controller.vm.provision "ansible" do |ansible|
ansible.playbook = "controller.yml"
end
controller.vm.provider "virtualbox" do |vbox|
vbox.memory = 4096
end
end
config.vm.define "network" do |network|
network.vm.box = "ubuntu/trusty64"
network.vm.hostname = "network"
network.vm.network "private_network", ip: "10.1.0.12", bridge: "eth0"
network.vm.network "public_network", ip: "10.3.0.12"
network.vm.provision "ansible" do |ansible|
ansible.playbook = "network.yml"
end
network.vm.provider "virtualbox" do |vbox|
vbox.memory = 1024
end
end
config.vm.define "compute" do |compute|
compute.vm.box = "ubuntu/trusty64"
compute.vm.hostname = "compute"
compute.vm.network "private_network", ip: "10.1.0.13"
compute.vm.provision "ansible" do |ansible|
ansible.playbook = "compute.yml"
end
compute.vm.provider "virtualbox" do |vbox|
vbox.memory = 4096
vbox.cpus = 4
end
end
config.vm.define "storage" do |storage|
storage.vm.box = "ubuntu/trusty64"
storage.vm.hostname = "storage"
storage.vm.network "private_network", ip: "10.1.0.14"
storage.vm.provision "ansible" do |ansible|
ansible.playbook = "storage.yml"
end
storage.vm.provider "virtualbox" do |vbox|
vbox.customize ["createhd",
'--filename', "tmp/disk",
'--size', "2000" ]
vbox.customize ['storageattach', :id,
'--storagectl', 'SATAController',
'--port', 1,
'--device', 0,
'--type', 'hdd',
'--medium', "tmp/disk.vdi"]
end
end
end