-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
132 lines (123 loc) · 3.6 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# Use Ubuntu 14.04 Trusty Tahr 64-bit as our operating system
config.vm.box = "ubuntu/trusty64"
# Configurate the virtual machine to use 4GB of RAM
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
# Forward the Rails server default port to the host
config.vm.network :forwarded_port, guest: 3000, host: 3000
# postgresql
config.vm.network :forwarded_port, guest: 5432, host: 5432
# mongodb
config.vm.network :forwarded_port, guest: 27017, host: 27017
config.vm.network :forwarded_port, guest: 28017, host: 28017
# redis
config.vm.network :forwarded_port, guest: 6379, host: 6379
# rabbitmq
config.vm.network :forwarded_port, guest: 5672, host: 5672
config.vm.network :forwarded_port, guest: 15671, host: 15671
config.vm.network :forwarded_port, guest: 25672, host: 25672
# synced folders
config.vm.synced_folder "workspace/", "/vagrant/workspace"
# Chef solo config
config.vm.provision "chef_solo" do |chef|
chef.node_name = "dudebox"
chef.version = '12.10.40'
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "nodejs"
chef.add_recipe "ruby_build"
# chef.add_recipe "rbenv::user"
# chef.add_recipe "rbenv::vagrant"
chef.add_recipe "rvm::system"
chef.add_recipe "vim"
chef.add_recipe "redis2::default_instance"
chef.add_recipe "postgresql::server"
chef.add_recipe "postgresql::client"
chef.add_recipe "mongodb::default"
chef.add_recipe "rabbitmq::default"
chef.add_recipe "rabbitmq::mgmt_console"
chef.add_recipe "golang::default"
chef.add_recipe "java::default"
chef.add_recipe "maven::default"
chef.add_recipe "build-essential::default"
chef.add_recipe "git::default"
# Install Ruby 2.2.1 and Bundler
chef.json = {
rbenv: {
user_installs: [{
user: 'vagrant',
rubies: ["2.2.1"],
global: "2.2.1",
gems: {
"2.2.1" => [
{ name: "bundler" }
]
}
}]
},
go: {
version: '1.4.2'
},
rabbitmq: {
web_console_ssl: true,
web_console_ssl_port: 15671
},
java: {
oracle: {
accept_oracle_download_terms: true
},
install_flavor: "oracle",
jdk_version: 8
},
postgresql: {
version: '9.3',
config: {
log_rotation_age: "1d",
log_rotation_size: "10MB",
log_filename: "postgresql-%Y-%m-%d_%H%M%S.log",
listen_addresses: '0.0.0.0'
},
pg_hba: [
{
type: 'local',
db: 'all',
user: 'postgres',
addr: nil,
method: 'ident'
},
{
type: 'local',
db: 'all',
user: 'all',
addr: nil,
method: 'ident'
},
{
type: 'local',
db: 'all',
user: 'all',
addr: nil,
method: 'peer'
},
{
comment: '# allow outside connections from all hosts using md5 passwords',
type: 'host',
db: 'all',
user: 'all',
addr: '0.0.0.0/0',
method: 'md5'
}
],
password: {
postgres: 'test123!'
}
}
}
end
end