Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- Vagrant.configure("2") do |config|
- # All Vagrant configuration is done here. The most common configuration
- # options are documented and commented below. For a complete reference,
- # please see the online documentation at vagrantup.com.
- # Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "precise64"
- config.vm.box_url = "http://files.vagrantup.com/precise64.box"
- src_dir = './src'
- doc_root = './src/public'
- app_name = 'my_app'
- config.vm.network :forwarded_port, guest: 80, host: 8080
- config.vm.synced_folder src_dir, "/web", :create => true, :owner => 'vagrant', :group => 'www-data', :mount_options => ['dmode=775,fmode=775']
- # plugins
- config.berkshelf.enabled = true
- config.omnibus.chef_version = :latest
- File.open('Berksfile', 'w').write <<-EOS
- cookbook 'apt'
- cookbook 'php5_ppa', git: "https://github.com/benharold/php5_ppa.git", branch: "ondrej"
- cookbook 'omusubi', git: "https://github.com/benharold/omusubi.git"
- cookbook 'user', git: "https://github.com/fnichol/chef-user"
- EOS
- # Chef solo provisioning
- config.vm.provision :chef_solo do |chef|
- chef.add_recipe "apt"
- chef.add_recipe "php5_ppa::from_ondrej"
- chef.add_recipe "omusubi"
- # http://fnichol.github.io/chef-user/
- chef.add_recipe "user::users"
- #nginx is included in the omusubi recipe
- #chef.add_recipe "nginx"
- versions = {};
- # if you would use php5.3 family with fast boot, comment out lines bellow.
- versions['php5'] = '5.5.*'
- versions['php5-mysql'] = '5.5.*'
- versions['php5-pgsql'] = '5.5.*'
- versions['php5-curl'] = '5.5.*'
- versions['php5-mcrypt'] = '5.5.*'
- versions['php5-cli'] = '5.5.*'
- versions['php5-fpm'] = '5.5.*'
- versions['php-pear'] = '5.5.*'
- versions['php5-imagick'] = '3.*'
- chef.json = {doc_root: doc_root, 'versions' => versions}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment