Skip to content

Instantly share code, notes, and snippets.

@philsturgeon
Created December 2, 2012 02:34
Show Gist options
  • Save philsturgeon/4186666 to your computer and use it in GitHub Desktop.
Save philsturgeon/4186666 to your computer and use it in GitHub Desktop.
override_attributes ({
"api" => {
"docroot" => "/vagrant/www/api/public"
},
})
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Operating System
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :hostonly, "198.18.0.101"
# Set the default project share to use nfs
config.vm.share_folder("v-web", "/vagrant/www", "./www", :nfs => true)
config.vm.share_folder("v-workers", "/var/workers", "./workers", :nfs => true)
# Your organization name for hosted Chef
orgname = "kapture"
# Set the Chef node ID based on environment variable NODE, if set. Otherwise default to vagrant-$USER
node = ENV['NODE']
node ||= "vagrant-#{ENV['USER']}"
config.vm.provision :chef_client do |chef|
chef.chef_server_url = "https://api.opscode.com/organizations/#{orgname}"
chef.validation_key_path = "chef/.chef/#{orgname}-validator.pem"
chef.validation_client_name = "#{orgname}-validator"
chef.encrypted_data_bag_secret_key_path = "chef/.chef/encrypted_data_bag_secret"
chef.node_name = "#{node}"
chef.provisioning_path = "/etc/chef"
#chef.log_level = :debug
chef.log_level = :info
chef.environment = "dev"
chef.add_role("admin")
chef.add_role("api")
chef.add_role("db_master")
chef.add_role("frontend")
chef.add_role("queue")
chef.add_role("workers")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment