4 # Config Github Settings
5 github_username = "fideloper"
6 github_repo = "Vaprobash"
7 github_branch = "1.0.0"
8 github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
10 # Server Configuration
12 hostname = "vaprobash.dev"
14 # Set a local private network IP address.
15 # See http://en.wikipedia.org/wiki/Private_network for explanation
16 # You can use the following IP ranges:
17 # 10.0.0.1 - 10.255.255.254
18 # 172.16.0.1 - 172.31.255.254
19 # 192.168.0.1 - 192.168.255.254
20 server_ip = "192.168.22.10"
21 server_memory = "384" # MB
22 server_swap = "768" # Options: false | int (MB) - Guideline: Between one or two times the server_memory
23 server_timezone = "UTC"
25 # Database Configuration
26 mysql_root_password = "root" # We'll assume user "root"
27 mysql_version = "5.5" # Options: 5.5 | 5.6
28 mysql_enable_remote = "false" # remote access enabled when true
29 pgsql_root_password = "root" # We'll assume user "root"
31 # Languages and Packages
32 ruby_version = "latest" # Choose what ruby version should be installed (will also be the default version)
33 ruby_gems = [ # List any Ruby Gems that you want to install
39 # To install HHVM instead of PHP, set this to "true"
43 composer_packages = [ # List any global Composer packages that you want to install
44 #"phpunit/phpunit:4.0.*",
45 #"codeception/codeception=*",
46 #"phpspec/phpspec:2.0.*@dev",
47 #"squizlabs/php_codesniffer:1.5.*",
50 # Default web server document root
51 # Symfony's public directory is assumed "web"
52 # Laravel's public directory is assumed "public"
53 public_folder = "/vagrant"
55 laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
56 laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
57 symfony_root_folder = "/vagrant/symfony" # Where to install Symfony.
59 nodejs_version = "latest" # By default "latest" will equal the latest stable version
60 nodejs_packages = [ # List any global NodeJS packages that you want to install
67 Vagrant.configure("2") do |config|
69 # Set server to Ubuntu 14.04
70 config.vm.box = "ubuntu/trusty64"
72 # Create a hostname, don't forget to put it to the `hosts` file
73 # This will point to the server's default virtual host
74 # TO DO: Make this work with virtualhost along-side xip.io URL
75 config.vm.hostname = hostname
78 config.vm.network :private_network, ip: server_ip
80 # Use NFS for the shared folder
81 config.vm.synced_folder ".", "/vagrant",
84 :mount_options => ['nolock,vers=3,udp,noatime']
87 config.vm.provider :virtualbox do |vb|
90 vb.customize ["modifyvm", :id, "--memory", server_memory]
92 # Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
93 # If the clock gets more than 15 minutes out of sync (due to your laptop going
94 # to sleep for instance, then some 3rd party services will reject requests.
95 vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
97 # Prevent VMs running on Ubuntu to lose internet connection
98 # vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
99 # vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
103 # If using VMWare Fusion
104 config.vm.provider "vmware_fusion" do |vb, override|
105 override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
108 vb.vmx["memsize"] = server_memory
112 # If using Vagrant-Cachier
113 # http://fgrehm.viewdocs.io/vagrant-cachier
114 if Vagrant.has_plugin?("vagrant-cachier")
115 # Configure cached packages to be shared between instances of the same base box.
116 # Usage docs: http://fgrehm.viewdocs.io/vagrant-cachier/usage
117 config.cache.scope = :box
119 config.cache.synced_folder_opts = {
121 mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
129 # Provision Base Packages
130 config.vm.provision "shell", path: "#{github_url}/scripts/base.sh", args: [github_url, server_swap]
133 config.vm.provision "shell", path: "#{github_url}/scripts/php.sh", args: [server_timezone, hhvm]
135 # Enable MSSQL for PHP
136 # config.vm.provision "shell", path: "#{github_url}/scripts/mssql.sh"
139 # config.vm.provision "shell", path: "#{github_url}/scripts/vim.sh", args: github_url
146 # Provision Apache Base
147 config.vm.provision "shell", path: "#{github_url}/scripts/apache.sh", args: [server_ip, public_folder, hostname, github_url]
149 # Provision Nginx Base
150 # config.vm.provision "shell", path: "#{github_url}/scripts/nginx.sh", args: [server_ip, public_folder, hostname, github_url]
158 config.vm.provision "shell", path: "#{github_url}/scripts/mysql.sh", args: [mysql_root_password, mysql_version, mysql_enable_remote]
160 # Provision PostgreSQL
161 # config.vm.provision "shell", path: "#{github_url}/scripts/pgsql.sh", args: pgsql_root_password
164 # config.vm.provision "shell", path: "#{github_url}/scripts/sqlite.sh"
166 # Provision RethinkDB
167 # config.vm.provision "shell", path: "#{github_url}/scripts/rethinkdb.sh", args: pgsql_root_password
169 # Provision Couchbase
170 # config.vm.provision "shell", path: "#{github_url}/scripts/couchbase.sh"
173 # config.vm.provision "shell", path: "#{github_url}/scripts/couchdb.sh"
176 # config.vm.provision "shell", path: "#{github_url}/scripts/mongodb.sh"
179 # config.vm.provision "shell", path: "#{github_url}/scripts/mariadb.sh", args: [mysql_root_password, mysql_enable_remote]
185 # Install Elasticsearch
186 # config.vm.provision "shell", path: "#{github_url}/scripts/elasticsearch.sh"
188 # Install SphinxSearch
189 # config.vm.provision "shell", path: "#{github_url}/scripts/sphinxsearch.sh"
192 # Search Server Administration (web-based)
196 # Admin for: Elasticsearch
197 # Works on: Apache2, Nginx
198 # config.vm.provision "shell", path: "#{github_url}/scripts/elastichq.sh"
206 # config.vm.provision "shell", path: "#{github_url}/scripts/memcached.sh"
208 # Provision Redis (without journaling and persistence)
209 # config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh"
211 # Provision Redis (with journaling and persistence)
212 # config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh", args: "persistent"
213 # NOTE: It is safe to run this to add persistence even if originally provisioned without persistence
221 # config.vm.provision "shell", path: "#{github_url}/scripts/beanstalkd.sh"
223 # Install Heroku Toolbelt
224 # config.vm.provision "shell", path: "https://toolbelt.heroku.com/install-ubuntu.sh"
226 # Install Supervisord
227 # config.vm.provision "shell", path: "#{github_url}/scripts/supervisord.sh"
230 # Additional Languages
234 # config.vm.provision "shell", path: "#{github_url}/scripts/nodejs.sh", privileged: false, args: nodejs_packages.unshift(nodejs_version, github_url)
236 # Install Ruby Version Manager (RVM)
237 # config.vm.provision "shell", path: "#{github_url}/scripts/rvm.sh", privileged: false, args: ruby_gems.unshift(ruby_version)
240 # Frameworks and Tooling
244 # config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: composer_packages.join(" ")
247 # config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version]
250 # config.vm.provision "shell", path: "#{github_url}/scripts/symfony.sh", privileged: false, args: [server_ip, symfony_root_folder, public_folder]
253 # config.vm.provision "shell", path: "#{github_url}/scripts/screen.sh"
255 # Install Mailcatcher
256 config.vm.provision "shell", path: "#{github_url}/scripts/mailcatcher.sh"
259 # config.vm.provision "shell", path: "#{github_url}/scripts/git-ftp.sh", privileged: false
263 # Any local scripts you may want to run post-provisioning.
264 # Add these to the same directory as the Vagrantfile.
266 config.vm.provision "shell", path: "./util/vagrant_provision.sh"
267 config.vm.synced_folder "./", "/vagrant/", :owner=> 'www-data', :group=>'vagrant', :mount_options => ['dmode=775', 'fmode=775']