]> git.openstreetmap.org Git - nominatim.git/blob - Vagrantfile
Merge pull request #1957 from lonvia/docs-separate-out-deployment
[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 "virtualbox" do |vb, override|
21     vb.gui = false
22     vb.memory = 2048
23     vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant","0"]
24     if ENV['CHECKOUT'] != 'y' then
25       override.vm.synced_folder ".", "/home/vagrant/Nominatim"
26     end
27   end
28
29   config.vm.provider "libvirt" do |lv, override|
30     lv.memory = 2048
31     lv.nested = true
32     if ENV['CHECKOUT'] != 'y' then
33       override.vm.synced_folder ".", "/home/vagrant/Nominatim", type: 'nfs'
34     end
35   end
36
37   config.vm.define "ubuntu", primary: true do |sub|
38       sub.vm.box = "generic/ubuntu2004"
39       sub.vm.provision :shell do |s|
40         s.path = "vagrant/Install-on-Ubuntu-20.sh"
41         s.privileged = false
42         s.args = [checkout]
43       end
44   end
45
46   config.vm.define "ubuntu-apache" do |sub|
47       sub.vm.box = "generic/ubuntu2004"
48       sub.vm.provision :shell do |s|
49         s.path = "vagrant/Install-on-Ubuntu-20.sh"
50         s.privileged = false
51         s.args = [checkout, "install-apache"]
52       end
53   end
54
55   config.vm.define "ubuntu-nginx" do |sub|
56       sub.vm.box = "generic/ubuntu2004"
57       sub.vm.provision :shell do |s|
58         s.path = "vagrant/Install-on-Ubuntu-20.sh"
59         s.privileged = false
60         s.args = [checkout, "install-nginx"]
61       end
62   end
63
64   config.vm.define "ubuntu18" do |sub|
65       sub.vm.box = "generic/ubuntu1804"
66       sub.vm.provision :shell do |s|
67         s.path = "vagrant/Install-on-Ubuntu-18.sh"
68         s.privileged = false
69         s.args = [checkout]
70       end
71   end
72
73   config.vm.define "ubuntu18-apache" do |sub|
74       sub.vm.box = "generic/ubuntu1804"
75       sub.vm.provision :shell do |s|
76         s.path = "vagrant/Install-on-Ubuntu-18.sh"
77         s.privileged = false
78         s.args = [checkout, "install-apache"]
79       end
80   end
81
82   config.vm.define "ubuntu18-nginx" do |sub|
83       sub.vm.box = "generic/ubuntu1804"
84       sub.vm.provision :shell do |s|
85         s.path = "vagrant/Install-on-Ubuntu-18.sh"
86         s.privileged = false
87         s.args = [checkout, "install-nginx"]
88       end
89   end
90
91   config.vm.define "centos7" do |sub|
92       sub.vm.box = "centos/7"
93       sub.vm.provision :shell do |s|
94         s.path = "vagrant/Install-on-Centos-7.sh"
95         s.privileged = false
96         s.args = [checkout]
97       end
98   end
99
100   config.vm.define "centos" do |sub|
101       sub.vm.box = "generic/centos8"
102       sub.vm.provision :shell do |s|
103         s.path = "vagrant/Install-on-Centos-8.sh"
104         s.privileged = false
105         s.args = [checkout]
106       end
107   end
108
109
110 end