]> git.openstreetmap.org Git - nominatim.git/blob - Vagrantfile
Merge remote-tracking branch 'upstream/master'
[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', nfs_udp: false
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 end