-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
57 lines (52 loc) · 1.58 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
# encoding: utf-8
# This file originally created at http://rove.io/4de5cd67a3b44517bcc664332fa3c334
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "opscode-ubuntu-12.04_chef-11.4.0"
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.0.box"
config.ssh.forward_agent = true
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.network :private_network, ip: "192.168.33.10"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :apt
chef.add_recipe 'nodejs'
chef.add_recipe 'postgresql::server'
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"
}
}
}
end
config.vm.provision "shell", path: "provisionScript.sh"
end