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 0
/
Vagrantfile
90 lines (72 loc) · 2.32 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.hostname = "dev.box"
config.vm.network :private_network, ip: "192.168.164.123"
# Shares
config.vm.synced_folder "~/Workspace", "/var/workspace", :nfs => true, :nfs_version => 3
# Vitualbox settings
config.vm.provider "virtualbox" do |v|
v.name = "Dev.Box"
v.customize [
"modifyvm", :id,
"--memory", 2048,
"--cpus", 2
]
end
# Provisiong
config.vm.provision :shell, :path => "bootstrap.sh"
# DNS Server, see https://github.com/BerlinVagrant/vagrant-dns
# config.dns.tld = "dev.box"
# config.dns.patterns = [/^.*dev.box$/]
# Chef provisioning
config.vm.provision :chef_solo do |chef|
# This path will be expanded relative to the project directory
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
chef.data_bags_path = "data_bags"
# Merge project list from json file
chef.json = {}
chef.json.merge!(JSON.parse(File.read("dev-config.json")))
# Enable apt-get package
chef.add_recipe "apt"
# Setup databases
chef.add_recipe "mysql"
chef.add_recipe "mysql::server"
chef.add_recipe "database::mysql"
chef.add_recipe "couchdb"
# Setup apache
chef.add_recipe "apache2"
chef.add_recipe "apache2::mod_php5"
chef.add_recipe "apache2::mod_rewrite"
chef.add_recipe "apache2::mod_expires"
chef.add_recipe "apache2::mod_headers"
# Setup varnish
chef.add_recipe "varnish"
# Setup php
chef.add_recipe "php"
chef.add_recipe "php::module_gd"
chef.add_recipe "php::module_curl"
chef.add_recipe "php::module_mysql"
chef.add_recipe "php::module_memcache"
chef.add_recipe "php::module_sqlite3"
chef.add_recipe "php::module_apc"
# Tools
chef.add_recipe "imagemagick"
chef.add_recipe "phantomjs"
chef.add_recipe "memcached"
chef.add_recipe "openssl"
chef.add_recipe "redis"
chef.add_recipe "php-ioncube::install"
# Shell
# chef.add_recipe "chef-prezto"
# Nodejs
chef.add_recipe "nodejs-cookbook::install_from_package"
# Add projects
chef.add_recipe "projects"
chef.add_recipe "projects::module_mcrypt"
# Jenkins
# chef.add_recipe "jenkins::server"
end
end