-
-
Save sneakybeaky/7ce35307bd73b0e9ef6d to your computer and use it in GitHub Desktop.
Vagrantfile showing issue with 1.1 & chef solo provisioner. Prior to 1.1 no cookbooks_path need be set. Uncomment line 37 to get working with 1.1 and mimic pre 1.1 behaviour.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run 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. | |
# Allocate 1.5Gb to the VM & 2 CPUs | |
config.vm.customize ["modifyvm", :id, | |
"--memory", 1536, | |
"--ioapic", "on", | |
"--cpus","2" | |
] | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise32" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
# Boot with a GUI so you can see the screen. (Default is headless) | |
# GUI mode means you will be prompted what to do when the host is shut down. | |
# Non GUI mode results in the power just being unplugged - not good for CQ | |
config.vm.boot_mode = :gui | |
# Forward a port from the guest to the host, which allows for outside | |
# computers to access the VM, whereas host only networking does not. | |
config.vm.forward_port 80, 8080 | |
config.vm.provision :chef_solo do |chef| | |
# Uncomment line to work around 1.1 compatibility issue with recipe_url | |
#chef.cookbooks_path = [[:vm, "cookbooks"]] | |
# Download cookbooks from a URL | |
if (!ENV["cookbooks_local"]) | |
chef.recipe_url = "http://static.content.akqa.net/static/content/vagrant/cq5/cookbooks.tar.gz" | |
end | |
chef.log_level = :debug | |
chef.add_recipe "apt" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment