This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
180 lines (135 loc) · 6.97 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# -*- 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|
config.vm.define "admin" , primary: true do |admin|
admin.vm.box = "centos-7-1511-x86_64"
admin.vm.box_url = "https://dl.dropboxusercontent.com/s/filvjntyct1wuxe/centos-7-1511-x86_64.box"
admin.vm.provider :vmware_fusion do |v, override|
override.vm.box = "centos-7-1511-x86_64-vmware"
override.vm.box_url = "https://dl.dropboxusercontent.com/s/h5g5kqjrzq5dn53/centos-7-1511-x86_64-vmware.box"
#override.vm.box = "OEL7_2-x86_64-vmware"
#override.vm.box_url = "https://dl.dropboxusercontent.com/s/ymr62ku2vjjdhup/OEL7_2-x86_64-vmware.box"
end
admin.vm.hostname = "admin.example.com"
admin.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
admin.vm.synced_folder "/Users/edwin/software", "/software", :mount_options => ["dmode=777","fmode=777"]
admin.vm.network :private_network, ip: "10.10.10.10"
admin.vm.provider :vmware_fusion do |vb|
vb.vmx["numvcpus"] = "2"
vb.vmx["memsize"] = "2048"
end
admin.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--name", "admin"]
vb.customize ["modifyvm", :id, "--cpus" , 2]
end
admin.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppetlabs/code/hiera.yaml;rm -rf /etc/puppetlabs/code/modules;ln -sf /vagrant/puppet/modules /etc/puppetlabs/code/modules"
# in order to enable this shared folder, execute first the following in the host machine: mkdir log_puppet_weblogic && chmod a+rwx log_puppet_weblogic
#admin.vm.synced_folder "./log_puppet_weblogic", "/tmp/log_puppet_weblogic", :mount_options => ["dmode=777","fmode=777"]
admin.vm.provision :puppet do |puppet|
puppet.environment_path = "puppet/environments"
puppet.environment = "development"
puppet.manifests_path = "puppet/environments/development/manifests"
puppet.manifest_file = "site.pp"
puppet.options = [
'--verbose',
'--report',
'--trace',
# '--debug',
# '--parser future',
'--strict_variables',
'--hiera_config /vagrant/puppet/hiera.yaml'
]
puppet.facter = {
"environment" => "development",
"vm_type" => "vagrant",
}
end
end
config.vm.define "node1" do |node1|
node1.vm.box = "centos-7-1511-x86_64"
node1.vm.box_url = "https://dl.dropboxusercontent.com/s/filvjntyct1wuxe/centos-7-1511-x86_64.box"
node1.vm.provider :vmware_fusion do |v, override|
override.vm.box = "centos-7-1511-x86_64-vmware"
override.vm.box_url = "https://dl.dropboxusercontent.com/s/h5g5kqjrzq5dn53/centos-7-1511-x86_64-vmware.box"
#override.vm.box = "OEL7_2-x86_64-vmware"
#override.vm.box_url = "https://dl.dropboxusercontent.com/s/ymr62ku2vjjdhup/OEL7_2-x86_64-vmware.box"
end
node1.vm.hostname = "node1.example.com"
node1.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
node1.vm.synced_folder "/Users/edwin/software", "/software"
node1.vm.network :private_network, ip: "10.10.10.100"
node1.vm.provider :vmware_fusion do |vb|
vb.vmx["numvcpus"] = "1"
vb.vmx["memsize"] = "1532"
end
node1.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1532"]
vb.customize ["modifyvm", :id, "--name", "node1"]
end
node1.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppetlabs/code/hiera.yaml;rm -rf /etc/puppetlabs/code/modules;ln -sf /vagrant/puppet/modules /etc/puppetlabs/code/modules"
node1.vm.provision :puppet do |puppet|
puppet.environment_path = "puppet/environments"
puppet.environment = "development"
puppet.manifests_path = "puppet/environments/development/manifests"
puppet.manifest_file = "node.pp"
puppet.options = [
'--verbose',
'--report',
'--trace',
# '--debug',
# '--parser future',
'--strict_variables',
'--hiera_config /vagrant/puppet/hiera.yaml'
]
puppet.facter = {
"environment" => "development",
"vm_type" => "vagrant",
}
end
end
config.vm.define "node2" do |node2|
node2.vm.box = "centos-7-1511-x86_64"
node2.vm.box_url = "https://dl.dropboxusercontent.com/s/filvjntyct1wuxe/centos-7-1511-x86_64.box"
node2.vm.provider :vmware_fusion do |v, override|
override.vm.box = "centos-7-1511-x86_64-vmware"
override.vm.box_url = "https://dl.dropboxusercontent.com/s/h5g5kqjrzq5dn53/centos-7-1511-x86_64-vmware.box"
#override.vm.box = "OEL7_2-x86_64-vmware"
#override.vm.box_url = "https://dl.dropboxusercontent.com/s/ymr62ku2vjjdhup/OEL7_2-x86_64-vmware.box"
end
node2.vm.hostname = "node2.example.com"
node2.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
node2.vm.synced_folder "/Users/edwin/software", "/software"
node2.vm.network :private_network, ip: "10.10.10.200", auto_correct: true
node2.vm.provider :vmware_fusion do |vb|
vb.vmx["numvcpus"] = "1"
vb.vmx["memsize"] = "1532"
end
node2.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1532"]
vb.customize ["modifyvm", :id, "--name", "node2"]
end
node2.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppetlabs/code/hiera.yaml;rm -rf /etc/puppetlabs/code/modules;ln -sf /vagrant/puppet/modules /etc/puppetlabs/code/modules"
node2.vm.provision :puppet do |puppet|
puppet.environment_path = "puppet/environments"
puppet.environment = "development"
puppet.manifests_path = "puppet/environments/development/manifests"
puppet.manifest_file = "node.pp"
puppet.options = [
'--verbose',
'--report',
'--trace',
# '--debug',
# '--parser future',
'--strict_variables',
'--hiera_config /vagrant/puppet/hiera.yaml'
]
puppet.facter = {
"environment" => "development",
"vm_type" => "vagrant",
}
end
end
end