]> git.openstreetmap.org Git - nominatim.git/blob - Vagrantfile
Merge pull request #506 from mtmail/primary-vagrant-vm
[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
8   # If true, then any SSH connections made will enable agent forwarding.
9   config.ssh.forward_agent = true
10
11   checkout = "yes"
12   if ENV['CHECKOUT'] != 'y' then
13       config.vm.synced_folder ".", "/home/vagrant/Nominatim"
14       checkout = "no"
15   end
16
17   config.vm.define "ubuntu", primary: true do |sub|
18       sub.vm.box = "bento/ubuntu-16.04"
19       sub.vm.provision :shell do |s|
20         s.path = "vagrant/install-on-ubuntu-16.sh"
21         s.privileged = false
22         s.args = [checkout]
23       end
24   end
25
26   config.vm.define "centos" do |sub|
27       sub.vm.box = "bento/centos-7.2"
28       sub.vm.provision :shell do |s|
29         s.path = "vagrant/install-on-centos-7.sh"
30         s.privileged = false
31         s.args = [checkout]
32       end
33   end
34
35   # configure shared package cache if possible
36   #if Vagrant.has_plugin?("vagrant-cachier")
37   #  config.cache.enable :apt
38   #  config.cache.scope = :box
39   #end
40
41
42   config.vm.provider "virtualbox" do |vb|
43     vb.gui = false
44     vb.customize ["modifyvm", :id, "--memory", "2048"]
45   end
46
47
48   # config.vm.provider :digital_ocean do |provider, override|
49   #   override.ssh.private_key_path = '~/.ssh/id_rsa'
50   #   override.vm.box = 'digital_ocean'
51   #   override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
52
53   #   provider.token = ''
54   #   # provider.token = 'YOUR TOKEN'
55   #   provider.image = 'ubuntu-14-04-x64'
56   #   provider.region = 'nyc2'
57   #   provider.size = '512mb'
58   # end
59
60 end