Skip to content

Instantly share code, notes, and snippets.

@hedgehog
Created April 22, 2011 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgehog/936071 to your computer and use it in GitHub Desktop.
Save hedgehog/936071 to your computer and use it in GitHub Desktop.
Chef 0.10.0.rc.0
$ vagrant up chef
[chef] Provisioning enabled with chef_solo...
[chef] Box chef was not found. Fetching box from specified URL...
[chef] Downloading with Vagrant::Downloaders::File...
[chef] Copying box to temporary location...
[chef] Extracting box...
[chef] Verifying box...
[chef] Cleaning up downloaded box...
[chef] Importing base box 'chef'...
[chef] Matching MAC address for NAT networking...
[chef] Running any VM customizations...
[chef] Clearing any previously set forwarded ports...
[chef] Forwarding ports...
[chef] -- ssh: 22 => 2200 (adapter 1)
[chef] -- chefs: 4000 => 4000 (adapter 1)
[chef] -- chefs_web: 4040 => 4040 (adapter 1)
[chef] Creating shared folders metadata...
[chef] Preparing host only network...
[chef] Creating new host only network for environment...
[chef] Booting VM...
[chef] Waiting for VM to boot. This can take a few minutes.
[chef] VM booted and ready for use!
[chef] Enabling host only network...
[chef] Mounting shared folders...
[chef] -- v-root: /vagrant
[chef] -- chef: ~/chef
[chef] -- chef-server-etc: /etc/chef
[chef] Running provisioner: Vagrant::Provisioners::ChefSolo...
[chef] Generating chef JSON and uploading...
[chef] Running chef-solo...
[chef] [Thu, 21 Apr 2011 22:07:34 -0700] INFO: *** Chef 0.10.0.rc.0 ***
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Building node object for chef
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Extracting run list from JSON attributes provided on command line
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] INFO: Setting the run_list to ["recipe[hosts::chefserver]", "recipe[apt]", "recipe[build-essential]", "recipe[chef-server::rubygems-install]"] from JSON
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Applying attributes from json file
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Platform is ubuntu version 10.04
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] INFO: Run List is [recipe[hosts::chefserver], recipe[apt], recipe[build-essential], recipe[chef-server::rubygems-install]]
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] INFO: Run List expands to [hosts::chefserver, apt, build-essential, chef-server::rubygems-install]
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] INFO: Starting Chef Run for chef
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: No chefignore file found at /tmp/vagrant-chef/cookbooks-0/chefignore no files will be ignored
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: No chefignore file found at /tmp/vagrant-chef/cookbooks-1/chefignore no files will be ignored
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Loading Recipe hosts::chefserver via include_recipe
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] ERROR: Running exception handlers
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] ERROR: Exception handlers complete
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Re-raising exception: Chef::Exceptions::CookbookNotFound - Cookbook hosts not found. If you're loading hosts from another cookbook, make sure you configure the dependency in your metadata
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/cookbook/cookbook_collection.rb:38
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `call'
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `default'
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `default'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:39:in `[]'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:39:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:72:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:69:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:69:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/client.rb:195:in `setup_run_context'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/client.rb:159:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:192:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:183:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:183:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application.rb:66:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load'
/usr/bin/chef-solo:19
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] FATAL: Stacktrace dumped to /tmp/vagrant-chef/chef-stacktrace.out
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] DEBUG: Chef::Exceptions::CookbookNotFound: Cookbook hosts not found. If you're loading hosts from another cookbook, make sure you configure the dependency in your metadata
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/cookbook/cookbook_collection.rb:38
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `call'
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `default'
/usr/lib/ruby/gems/1.8/gems/ohai-0.6.2/lib/ohai/mash.rb:77:in `default'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:39:in `[]'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:39:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:72:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:69:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/run_context.rb:69:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/client.rb:195:in `setup_run_context'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/client.rb:159:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:192:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:183:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application/solo.rb:183:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/../lib/chef/application.rb:66:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.0.rc.0/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load'
/usr/bin/chef-solo:19
: stdout
[chef] [Thu, 21 Apr 2011 22:07:35 -0700] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook hosts not found. If you're loading hosts from another cookbook, make sure you configure the dependency in your metadata
: stdout
[chef] : stdout
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-chef
chef-solo -c solo.rb -j dna.json
The output of the command prior to failing is outputted below:
[no output]
Vagrant::Config.run do |config|
@cs_root_path = File.dirname(File.absolute_path(__FILE__))
@cs_box = "chef"
@cs_box_url = "#{File.dirname(@cs_root_path)}/lucid64_4.0.4.box"
@cs_nodename = "chef"
@cs_tld = "private.org"
@cs_ip = "33.33.33.254" # Host-only networking
@cs_port = 4000
@cs_ssh_port = 2200
@cs_webui_port = 4040
@cs_kitchen = @cs_root_path
@cs_validation_client_name = "chef-validator"
config.vm.define :chef do |csc|
csc.send :eval, IO.read("#{@cs_root_path}/hobos/vm.bo")
csc.vm.box = "#{@cs_box}"
csc.vm.box_url = "#{@cs_box_url}"
csc.vm.forward_port("chefs", @cs_port, @cs_port)
csc.vm.forward_port("chefs_web", @cs_webui_port, @cs_webui_port)
csc.vm.forward_port("ssh", 22, @cs_ssh_port, :auto => true)
csc.vm.network(@cs_ip)
csc.vm.share_folder("chef", "~/chef", "#{@cs_root_path}/mnt/chef" )
csc.vm.share_folder("chef-server-etc", "/etc/chef", "#{@cs_kitchen}/mnt/etc" )
csc.vm.provision :chef_solo do |chef|
chef.log_level = :debug # :info or :debug
chef.node_name = @cs_nodename
chef.cookbooks_path = [
File.expand_path("#{@cs_kitchen}/site-cookbooks"),
File.expand_path("#{@cs_kitchen}/cookbooks")]
chef.add_recipe("hosts::chefserver")
chef.add_recipe("apt")
chef.add_recipe("build-essential")
chef.add_recipe("chef-server::rubygems-install")
chef.json.merge!({
:chef=> {
:name=> @cs_nodename,
:validation_client_name=> @cs_validation_client_name,
:url_type=>"http",
:server_fqdn=> "#{@cs_nodename}.#{@cs_tld}",
:server_port=> "#{@cs_port}",
:webui_port=> "#{@cs_webui_port}",
:webui_enabled=> true,
}
})
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment