Skip to content

Instantly share code, notes, and snippets.

@deepakprasanna
Created November 21, 2012 21:34
Show Gist options
  • Save deepakprasanna/4127939 to your computer and use it in GitHub Desktop.
Save deepakprasanna/4127939 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.forward_port 80, 8080
config.vm.customize [
"modifyvm", :id,
"--name", "LAMP VM",
"--memory", "2048"
]
config.vm.network :bridged
config.vm.host_name = "lamp-vm"
#config.vm.share_folder("v-root", "/home/vagrant/apps", ".", :nfs => true)
orgname = "thoughtster"
node = "vagrant-deepak"
#Vagrant base boxes are packaged with chef 10.14.2
#I am doing this to get rid of the error with 10.14.2 -> http://tickets.opscode.com/browse/CHEF-3443
config.vm.provision :shell, :inline => "gem install chef"
config.vm.provision :chef_client do |chef|
chef.chef_server_url = "http://api.opscode.com/organizations/#{orgname}"
chef.validation_key_path = "#{ENV['HOME']}/.chef/#{orgname}-validator.pem"
chef.validation_client_name = "#{orgname}-validator"
chef.encrypted_data_bag_secret_key_path = "#{ENV['HOME']}/.chef/encrypted_data_bag_secret"
chef.node_name = node
chef.client_key_path = "/vagrant/#{node}.pem"
chef.log_level = :debug
chef.add_role("base")
chef.add_role("db_master")
chef.add_role("webserver")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment