-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
86 lines (80 loc) · 2.2 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# encoding: utf-8
# This file originally created at http://rove.io/d263278ce64e8e9276a19b575cc09d69
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "opscode_ubuntu-13.10_chef-provisionerless"
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.10_chef-provisionerless.box"
config.ssh.forward_agent = true
config.omnibus.chef_version = :latest
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.network :forwarded_port, guest: 5432, host: 5433
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :apt
chef.add_recipe 'sqlite'
chef.add_recipe 'postgresql::server'
chef.add_recipe 'python'
chef.add_recipe 'vim'
chef.add_recipe 'ruby_build'
chef.add_recipe 'rbenv::user'
chef.add_recipe 'git'
chef.json = {
:postgresql => {
:config => {
:listen_addresses => "*",
:port => "5432"
},
:pg_hba => [
{
:type => "local",
:db => "postgres",
:user => "postgres",
:addr => nil,
:method => "trust"
},
{
:type => "host",
:db => "all",
:user => "all",
:addr => "0.0.0.0/0",
:method => "md5"
},
{
:type => "host",
:db => "all",
:user => "all",
:addr => "::1/0",
:method => "md5"
}
],
:password => {
:postgres => "password"
}
},
:rbenv => {
:user_installs => [
{
:user => "vagrant",
:rubies => [
"2.1.1"
],
:global => "2.1.1",
gems: {
"2.1.1" => [
{ name: "bundler" },
{ name: "rails" }
]
}
}
]
},
:git => {
:prefix => "/usr/local"
}
}
end
end