Skip to content

Instantly share code, notes, and snippets.

@tag-dmasse
Created May 31, 2013 20:59
Show Gist options
  • Save tag-dmasse/5687953 to your computer and use it in GitHub Desktop.
Save tag-dmasse/5687953 to your computer and use it in GitHub Desktop.
Sample vagrant configuration with sample chef recipe for a custom app.
include_recipe "apache2"
web_app "example.com" do
allow_override "All"
docroot "/vagrant/"
server_aliases ["www.example.com"]
server_name "example.com"
end
Vagrant.configure("2") do |config|
config.vm.box = "raring"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
config.vm.provision :shell, :inline => "sudo echo '`cat /etc/timezone`' > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata > /dev/null 2>&1"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apache2"
chef.add_recipe "myapp"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment