-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathVagrantfile
151 lines (125 loc) · 6.87 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "dc" do |cfg|
cfg.vm.box = "windows_2012_r2"
cfg.vm.hostname = "dc"
# use the plaintext WinRM transport and force it to use basic authentication.
# NB this is needed because the default negotiate transport stops working
# after the domain controller is installed.
# see https://groups.google.com/forum/#!topic/vagrant-up/sZantuCM0q4
cfg.winrm.transport = :plaintext
cfg.winrm.basic_auth_only = true
cfg.vm.communicator = "winrm"
cfg.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
cfg.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
cfg.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
cfg.vm.network :private_network, ip: "192.168.38.2", gateway: "192.168.38.1"
cfg.vm.provision "shell", path: "scripts/fix-second-network.ps1", privileged: false, args: "192.168.38.2"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provider "vmware_fusion" do |v, override|
v.memory = 768
v.cpus = 1
v.gui = true
end
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 768]
vb.customize ["modifyvm", :id, "--cpus", 1]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
config.vm.define "adfs2", autostart: false do |cfg|
cfg.vm.box = "windows_2012_r2"
cfg.vm.hostname = "adfs2"
cfg.vm.communicator = "winrm"
cfg.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
cfg.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
cfg.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
cfg.vm.network :private_network, ip: "192.168.38.3", gateway: "192.168.38.1", dns: "192.168.38.2"
cfg.vm.provision "shell", path: "scripts/fix-second-network.ps1", privileged: false, args: "-ip 192.168.38.3 -dns 192.168.38.2"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 768]
vb.customize ["modifyvm", :id, "--cpus", 1]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
config.vm.define "web", autostart: false do |cfg|
cfg.vm.box = "windows_2012_r2"
cfg.vm.hostname = "web"
cfg.vm.communicator = "winrm"
cfg.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
cfg.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
cfg.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
cfg.vm.network :forwarded_port, guest: 80, host: 8080, id: "http", auto_correct: true
cfg.vm.network :private_network, ip: "192.168.38.4", gateway: "192.168.38.1", dns: "192.168.38.2"
cfg.vm.provision "shell", path: "scripts/fix-second-network.ps1", privileged: false, args: "-ip 192.168.38.4 -dns 192.168.38.2"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "shell", path: "scripts/increase-tcp-num-connections.ps1", privileged: false
cfg.vm.provision "shell", path: "scripts/install-chocolatey.ps1", privileged: false
cfg.vm.provision "shell", path: "scripts/install-git.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 2048]
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
config.vm.define "ps", autostart: false do |cfg|
cfg.vm.box = "windows_2012_r2"
cfg.vm.hostname = "ps"
cfg.vm.communicator = "winrm"
cfg.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
cfg.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
cfg.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
cfg.vm.network :private_network, ip: "192.168.38.9", gateway: "192.168.38.1"
cfg.vm.provision "shell", path: "scripts/fix-second-network.ps1", privileged: false, args: "-ip 192.168.38.9 -dns 192.168.38.2"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 768]
vb.customize ["modifyvm", :id, "--cpus", 1]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
config.vm.define "ts", autostart: false do |cfg|
cfg.vm.box = "windows_2012_r2"
cfg.vm.hostname = "ts"
cfg.vm.communicator = "winrm"
cfg.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
cfg.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
cfg.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
cfg.vm.network :private_network, ip: "192.168.38.15", gateway: "192.168.38.1"
cfg.vm.provision "shell", path: "scripts/fix-second-network.ps1", privileged: false, args: "-ip 192.168.38.15 -dns 192.168.38.2"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false
cfg.vm.provision "reload"
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 768]
vb.customize ["modifyvm", :id, "--cpus", 1]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
end