]> git.openstreetmap.org Git - nominatim.git/blob - Vagrantfile
Merge pull request #2856 from t-tomek/patch-1
[nominatim.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 Vagrant.configure("2") do |config|
5   # Apache webserver
6   config.vm.network "forwarded_port", guest: 80, host: 8089
7   config.vm.network "forwarded_port", guest: 8088, host: 8088
8
9   # If true, then any SSH connections made will enable agent forwarding.
10   config.ssh.forward_agent = true
11
12   # Never sync the current directory to /vagrant.
13   config.vm.synced_folder ".", "/vagrant", disabled: true
14
15   checkout = "yes"
16   if ENV['CHECKOUT'] != 'y' then
17     checkout = "no"
18   end
19
20   config.vm.provider "hyperv" do |hv, override|
21     hv.memory = 2048
22     hv.linked_clone = true
23     if ENV['CHECKOUT'] != 'y' then
24       override.vm.synced_folder ".", "/home/vagrant/Nominatim", type: "smb", smb_host: ENV['SMB_HOST'] || ENV['COMPUTERNAME']
25     end
26   end
27
28   config.vm.provider "virtualbox" do |vb, override|
29     vb.gui = false
30     vb.memory = 2048
31     vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant","0"]
32     if ENV['CHECKOUT'] != 'y' then
33       override.vm.synced_folder ".", "/home/vagrant/Nominatim"
34     end
35   end
36
37   config.vm.provider "libvirt" do |lv, override|
38     lv.memory = 2048
39     lv.nested = true
40     if ENV['CHECKOUT'] != 'y' then
41       override.vm.synced_folder ".", "/home/vagrant/Nominatim", type: 'nfs'
42     end
43   end
44
45   config.vm.define "ubuntu22", primary: true do |sub|
46       sub.vm.box = "generic/ubuntu2204"
47       sub.vm.provision :shell do |s|
48         s.path = "vagrant/Install-on-Ubuntu-22.sh"
49         s.privileged = false
50         s.args = [checkout]
51       end
52   end
53
54   config.vm.define "ubuntu22-apache" do |sub|
55       sub.vm.box = "generic/ubuntu2204"
56       sub.vm.provision :shell do |s|
57         s.path = "vagrant/Install-on-Ubuntu-22.sh"
58         s.privileged = false
59         s.args = [checkout, "install-apache"]
60       end
61   end
62
63   config.vm.define "ubuntu22-nginx" do |sub|
64       sub.vm.box = "generic/ubuntu2204"
65       sub.vm.provision :shell do |s|
66         s.path = "vagrant/Install-on-Ubuntu-22.sh"
67         s.privileged = false
68         s.args = [checkout, "install-nginx"]
69       end
70   end
71
72   config.vm.define "ubuntu20" do |sub|
73       sub.vm.box = "generic/ubuntu2004"
74       sub.vm.provision :shell do |s|
75         s.path = "vagrant/Install-on-Ubuntu-20.sh"
76         s.privileged = false
77         s.args = [checkout]
78       end
79   end
80
81   config.vm.define "ubuntu20-apache" do |sub|
82       sub.vm.box = "generic/ubuntu2004"
83       sub.vm.provision :shell do |s|
84         s.path = "vagrant/Install-on-Ubuntu-20.sh"
85         s.privileged = false
86         s.args = [checkout, "install-apache"]
87       end
88   end
89
90   config.vm.define "ubuntu20-nginx" do |sub|
91       sub.vm.box = "generic/ubuntu2004"
92       sub.vm.provision :shell do |s|
93         s.path = "vagrant/Install-on-Ubuntu-20.sh"
94         s.privileged = false
95         s.args = [checkout, "install-nginx"]
96       end
97   end
98
99   config.vm.define "ubuntu18" do |sub|
100       sub.vm.box = "generic/ubuntu1804"
101       sub.vm.provision :shell do |s|
102         s.path = "vagrant/Install-on-Ubuntu-18.sh"
103         s.privileged = false
104         s.args = [checkout]
105       end
106   end
107
108   config.vm.define "ubuntu18-apache" do |sub|
109       sub.vm.box = "generic/ubuntu1804"
110       sub.vm.provision :shell do |s|
111         s.path = "vagrant/Install-on-Ubuntu-18.sh"
112         s.privileged = false
113         s.args = [checkout, "install-apache"]
114       end
115   end
116
117   config.vm.define "ubuntu18-nginx" do |sub|
118       sub.vm.box = "generic/ubuntu1804"
119       sub.vm.provision :shell do |s|
120         s.path = "vagrant/Install-on-Ubuntu-18.sh"
121         s.privileged = false
122         s.args = [checkout, "install-nginx"]
123       end
124   end
125
126 end