-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
196 lines (149 loc) · 6.77 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#!/usr/bin/env ruby
Vagrant::Config.run do |config|
config.vm.define :f18_dev_1 do |vm_config|
ip_addr = "55.55.55.100"
host_name = "f18-dev-1.knowhow-erp.local"
variant= "unity"
build_harbour = true
build_f18 = true
build_xtuple = false
user = "vagrant"
ubuntu_archive_url = "http://archive.bring.out.ba/ubuntu/"
vm_config.vm.customize ["modifyvm", :id, "--memory", 1024]
vm_config.vm.customize ["modifyvm", :id, "--name", host_name]
vm_config.vm.box = "precise-desktop-i386"
vm_config.vm.network(:hostonly, ip_addr)
vm_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks_knowhow"
chef.add_recipe "master"
chef.add_recipe "F18_3rd"
chef.add_recipe "hosts"
chef.json.merge!({
:F18_3rd => { :install_harbour => (not build_harbour) },
:master => { :variant => variant, :ubuntu_archive_url => ubuntu_archive_url, :build_xtuple => build_xtuple, :build_harbour => build_harbour, :build_f18 => build_f18 },
:hosts => { :hostname => host_name, :ip_addr => ip_addr }
})
end
end
config.vm.define :f18_dev_2 do |vm_config|
ip_addr = "55.55.55.101"
host_name = "f18-dev-2.knowhow-erp.local"
build_xtuple = false
build_harbour = false
build_f18 = false
variant = "lxde"
user = "vagrant"
ubuntu_archive_url = "http://archive.bring.out.ba/ubuntu/"
vm_config.vm.customize ["modifyvm", :id, "--memory", 512]
vm_config.vm.customize ["modifyvm", :id, "--name", host_name]
vm_config.vm.box = "precise-desktop-lxde"
vm_config.vm.network(:hostonly, ip_addr)
vm_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks_knowhow"
chef.add_recipe "F18_3rd"
#chef.add_recipe "master"
chef.add_recipe "hosts"
chef.json.merge!({
:F18_3rd => { :install_harbour => (not build_harbour) },
:master => { :variant => variant, :ubuntu_archive_url => ubuntu_archive_url, :build_xtuple => build_xtuple, :build_harbour => build_harbour, :build_f18 => build_f18 },
:hosts => { :hostname => host_name, :ip_addr => ip_addr }
})
end
end
config.vm.define :fmk_dev_1 do |vm_config|
ip_addr = "55.55.55.102"
host_name = "fmk-dev-1.knowhow-erp.local"
build_fmk = true
role = "fmk"
user = "vagrant"
ubuntu_archive_url = "http://archive.bring.out.ba/ubuntu/"
vm_config.vm.customize ["modifyvm", :id, "--memory", 1024]
vm_config.vm.customize ["modifyvm", :id, "--name", host_name]
vm_config.vm.box = "precise-desktop-lxde"
vm_config.vm.network(:hostonly, ip_addr)
vm_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks_knowhow"
chef.add_recipe "fmk"
chef.add_recipe "hosts"
chef.json.merge!({
:F18_3rd => { :install_harbour => false },
:fmk => { :user => user, :role => role, :ubuntu_archive_url => ubuntu_archive_url, :build_fmk => build_fmk },
:hosts => { :hostname => host_name, :ip_addr => ip_addr }
})
end
end
config.vm.define :fmk_pos_1 do |vm_config|
ip_addr = "55.55.55.201"
host_name = "fmk-pos-1.knowhow-erp.local"
build_fmk = false
role = "tops"
sql_site = "10"
admin = "vagrant"
user = "bringout"
fiscal_type = "tremol"
fiscal_version = "224"
ubuntu_archive_url = "http://archive.bring.out.ba/ubuntu/"
vm_config.vm.customize ["modifyvm", :id, "--memory", 512]
vm_config.vm.customize ["modifyvm", :id, "--name", host_name]
vm_config.vm.box = "precise-desktop-lubuntu"
vm_config.vm.network(:hostonly, ip_addr)
vm_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks_knowhow"
chef.add_recipe "ubuntu"
chef.add_recipe "lxde"
chef.add_recipe "hosts"
chef.add_recipe "F18_3rd"
chef.add_recipe "fmk"
chef.add_recipe "fiscal_wine::tremol"
chef.json.merge!({
:ubuntu => {
:user => user, :admin => admin, :ubuntu_archive_url => ubuntu_archive_url,
:sudo => { :users => ["vagrant"], :groups => ["adm"] }
},
:lxde => {},
:F18 => { :user => user },
:F18_3rd => { :install_harbour => false },
:fmk => { :user => user, :role => role, :ubuntu_archive_url => ubuntu_archive_url, :build_fmk => build_fmk, :sql_site => sql_site },
:fiscal_wine => { :user => user, :type => fiscal_type, :version => fiscal_version},
:hosts => { :hostname => host_name, :ip_addr => ip_addr }
})
end
end
config.vm.define :fmk_pos_2 do |vm_config|
ip_addr = "55.55.55.202"
host_name = "fmk-pos-2.knowhow-erp.local"
build_fmk = false
role = "tops"
sql_site = "50"
admin = "vagrant"
user = "bringout"
fiscal_type = "tremol"
fiscal_version = "224"
ubuntu_archive_url = "http://archive.bring.out.ba/ubuntu/"
vm_config.vm.customize ["modifyvm", :id, "--memory", 512]
vm_config.vm.customize ["modifyvm", :id, "--name", host_name]
vm_config.vm.box = "precise-desktop-lubuntu"
vm_config.vm.network(:hostonly, ip_addr)
vm_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks_knowhow"
chef.add_recipe "ubuntu"
chef.add_recipe "lxde"
chef.add_recipe "hosts"
chef.add_recipe "F18_3rd"
chef.add_recipe "fmk"
chef.add_recipe "fiscal_wine::tremol"
chef.json.merge!({
:ubuntu => {
:user => user, :admin => admin, :ubuntu_archive_url => ubuntu_archive_url,
:sudo => { :users => ["vagrant"], :groups => ["adm"] }
},
:lxde => {},
:F18 => { :user => user },
:F18_3rd => { :install_harbour => false },
:fmk => { :user => user, :role => role, :ubuntu_archive_url => ubuntu_archive_url, :build_fmk => build_fmk, :sql_site => sql_site },
:fiscal_wine => { :user => user, :type => fiscal_type, :version => fiscal_version},
:hosts => { :hostname => host_name, :ip_addr => ip_addr }
})
end
end
end