Created
May 23, 2012 15:16
-
-
Save fishnix/2775835 to your computer and use it in GitHub Desktop.
stash vagrantfile
This file contains hidden or 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 : | |
| user = ENV['OPSCODE_USER'] | |
| org = ENV['OPSCODE_ORG'] | |
| 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. | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "minimal-centos-62" | |
| # 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 7990, 7990 | |
| config.vm.forward_port 22, 2222 | |
| config.vm.provision :chef_client do |chef| | |
| # Set up some organization specific values based on environment variable above. | |
| chef.chef_server_url = "https://api.opscode.com/organizations/#{org}" | |
| chef.validation_key_path = "#{ENV['HOME']}/.chef/#{org}-validator.pem" | |
| chef.validation_client_name = "#{org}-validator" | |
| # Change the node/client name for the Chef Server | |
| chef.node_name = "#{user}-vagrant" | |
| # Put the client.rb in /etc/chef so chef-client can be run w/o specifying | |
| chef.provisioning_path = "/etc/chef" | |
| # logging | |
| chef.log_level = :info | |
| # adjust the run list to suit your testing needs | |
| chef.run_list = [ | |
| "recipe[java]", | |
| "recipe[yum]", | |
| "recipe[git::client]", | |
| "recipe[stash]" | |
| ] | |
| end | |
| # Share an additional folder to the guest VM. The first argument is | |
| # an identifier, the second is the path on the guest to mount the | |
| # folder, and the third is the path on the host to the actual folder. | |
| # config.vm.share_folder "v-data", "/vagrant_data", "../data" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment