Created
November 21, 2012 08:06
-
-
Save alexw23/4123735 to your computer and use it in GitHub Desktop.
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
Vagrant::Config.run do |config| | |
config.vm.box = "precise64" | |
config.vm.forward_port 80, 8080 | |
config.vm.customize [ | |
"modifyvm", :id, | |
"--name", "LAMP VM", | |
"--memory", "2048" | |
] | |
config.vm.network :hostonly, "10.0.0.23" | |
config.vm.host_name = "lamp-vm" | |
config.vm.share_folder("v-root", "/home/vagrant/apps", ".", :nfs => true) | |
# Your organization name for hosted Chef | |
orgname = "##########" | |
# 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 = "#{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.provisioning_path = "/etc/chef" | |
chef.log_level = :debug | |
#chef.log_level = :info | |
chef.environment = "dev" | |
chef.add_role("base") | |
chef.add_role("db_master") | |
chef.add_role("webserver") | |
#chef.json.merge!({ :mysql_password => "foo" }) # You can do this to override any default attributes for this node. | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment