Last active
August 26, 2018 00:37
-
-
Save shunwen/7178845 to your computer and use it in GitHub Desktop.
Vagrant up with chef client
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.configure("2") do |config| | |
config.vm.hostname = "NODE NAME" # will be the node name on chef-server. | |
config.vm.box = "BOX NAME" | |
config.vm.box_url = "BOX IMAGE DOWNLOAD URL WHEN BOX DOES NOT EXIST" | |
config.vm.boot_timeout = 180 # Raise error when bootup takes too long | |
config.omnibus.chef_version = :latest # Use the latest chef version on this box | |
#config.vm.network :private_network, ip: "33.33.33.10" # THIS CAUSES SSH PROBLEM, remove it | |
# The path to the Berksfile to use with Vagrant Berkshelf | |
config.berkshelf.berksfile_path = "./Berksfile" | |
config.berkshelf.enabled = true | |
config.vm.provision :chef_client do |chef| | |
chef.log_level = :debug # This generates lots of detail messages | |
chef.chef_server_url = "https://api.opscode.com/organizations/ORGANIZATION_NAME" | |
chef.validation_client_name = "ORGANIZATION_NAME-validator" | |
chef.validation_key_path = "~/.chef/ORGANIZATION_NAME-validator.pem" | |
chef.json = {} | |
chef.run_list = [] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment