forked from umayr/kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
95 lines (84 loc) · 2.97 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
# -*- 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.synced_folder '../garcon', '/var/www/api', owner: 'root', group: 'root'
config.vm.synced_folder '../potato', '/var/www/scrapper', owner: 'root', group: 'root'
config.vm.hostname = "#{`hostname`[0..-2]}-web"
config.vm.post_up_message = "
Welcome to Hungrilla Virtual Environment.
This gorilla is hungry for some code!!
.\"\`\".
.-./ _=_ \\.-.
{ (,(oYo),) }}
{{ | \" |} }
{ { \\(---)/ }}
{{ }'-=-'{ } }
{ { }._:_.{ }}
{{ } -:- { } }
{_{ }\`===\`{ _}
((((\\) (/))))
"
config.vm.network :forwarded_port, guest: 80, host: 2000
config.vm.network :forwarded_port, guest: 3000, host: 2010
config.vm.network :forwarded_port, guest: 3306, host: 3307
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :apt
chef.add_recipe 'vim'
chef.add_recipe 'nginx'
chef.add_recipe 'git'
chef.add_recipe 'nodejs'
chef.add_recipe 'mysql'
chef.json = {
:nodejs => {
:version => '0.12.2',
:install_method => 'binary',
:npm_packages => [
{
:name => 'grunt-cli'
},
{
:name => 'bower'
},
{
:name => 'nodemon'
},
{
:name => 'jscs'
}
]
},
:nginx => {
:dir => "/etc/nginx",
:log_dir => "/var/log/nginx",
:binary => "/usr/sbin/nginx",
:user => "www-data",
:init_style => "runit",
:pid => "/var/run/nginx.pid",
:worker_connections => "1024"
},
:git => {
:prefix => "/usr/local"
},
:mysql => {
:initial_root_password => "password",
:server_repl_password => "password",
:server_debian_password => "password",
:service_name => "mysql",
:basedir => "/usr",
:data_dir => "/var/lib/mysql",
:root_group => "root",
:mysqladmin_bin => "/usr/bin/mysqladmin",
:mysql_bin => "/usr/bin/mysql",
:conf_dir => "/etc/mysql-default",
:confd_dir => "/etc/mysql-default/conf.d",
:socket => "/var/run/mysql-default/mysqld.sock",
:pid_file => "/var/run/mysql-default/mysqld.pid",
:grants_path => "/etc/mysql-default/grants.sql"
}
}
end
end