This repository has been archived by the owner on Dec 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathVagrantfile
71 lines (65 loc) · 2.41 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# From host, you can access PARTAKE via http://192.168.33.10:9000/
config.vm.network :forwarded_port, guest: 9000, host: 9000
config.vm.network :private_network, ip: "192.168.33.10"
config.vm.provision :chef_solo do |chef|
chef.add_recipe "apt-get-update"
chef.add_recipe "postgresql::server"
chef.add_recipe "postgresql::client"
chef.add_recipe "java"
chef.add_recipe "play"
chef.add_recipe "init-db"
chef.add_recipe "motd-tail"
chef.cookbooks_path = ["./cookbooks", "./site-cookbooks"]
host_ivy_dir = Dir::pwd + '/.ivy2'
chef.json = {
:postgresql => {
:version => "9.1",
:config => {
:listen_addresses => "localhost"
},
:password => {
:postgres => "postgres"
}
},
:java => {
:jdk_version => "7"
},
:play => {
:version => "2.1.5",
:install_dir => "/home/vagrant",
:host_ivy_dir => host_ivy_dir
},
:"motd-tail" => {
:additional_text => <<-EOL
--------------------------------------------------------
[PARTAKE] development environment
--------------------------------------------------------
Welcome to your development environment.
To start your service in development mode, please exec
'~/play-2.0.4/play start' in '/vagrant' directory.
--------------------------------------------------------
Eclipse project has already been generated. When you
update dependency, kick '~/eclipsify.sh' instead of
'play eclipsify' command.
--------------------------------------------------------
EOL
}
}
end
config.vm.provider :virtualbox do |vb|
# Play! needs much memory, so we have to provide 2 GiB at least.
# When you reduce this, please modify -Xmx parameter in /home/vagrant/play-2.0.4/framework/build
vb.customize ["modifyvm", :id, "--memory", "2048"]
# see https://github.com/mitchellh/vagrant/issues/516
vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
end
end