-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathVagrantfile
52 lines (39 loc) · 1.52 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.hostname = "dakait-dev"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
#
ppaRepos = [
]
# The postgres/gis family of products is not in the list intentionally since they
# are explicitly installed in one of the scripts
packageList = [
"git",
"build-essential",
"openjdk-7-jdk"
];
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
pkg_cmd = ""
pkg_cmd << "apt-get update -qq; apt-get install -q -y python-software-properties; "
if ppaRepos.length > 0
ppaRepos.each { |repo| pkg_cmd << "add-apt-repository -y " << repo << " ; " }
pkg_cmd << "apt-get update -qq; "
end
# install packages we need
pkg_cmd << "apt-get install -q -y " + packageList.join(" ") << " ; "
# get the latest version of leiningen and setup it up
pkg_cmd << "wget -O /usr/bin/lein https://raw.github.com/technomancy/leiningen/stable/bin/lein ; "
pkg_cmd << "chmod +x /usr/bin/lein ; "
config.vm.provision :shell, :inline => pkg_cmd
end
end