Created
May 2, 2011 20:24
-
-
Save MarkBennett/952284 to your computer and use it in GitHub Desktop.
Chef / Vagrant setup
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
[default] Running chef-solo... | |
[default] [Mon, 02 May 2011 13:50:44 -0700] INFO: Setting the run_list to ["recipe[apt]", "recipe[vim]", "recipe[tmux]", "recipe[webapp]"] from JSON | |
[Mon, 02 May 2011 13:50:44 -0700] INFO: Starting Chef Run (Version 0.9.12) | |
[Mon, 02 May 2011 13:50:49 -0700] WARN: Missing gem 'rvm' | |
[Mon, 02 May 2011 13:50:49 -0700] INFO: Missing gem 'mysql' | |
[Mon, 02 May 2011 13:50:50 -0700] WARN: Missing gem 'right_aws' | |
: stdout | |
[default] /tmp/vagrant-chef/cookbooks-0/webapp/recipes/default.rb:35:in `from_file': stderr | |
[default] : : stderr | |
[default] undefined method `[]' for nil:NilClass: stderr | |
[default] (: stderr | |
[default] NoMethodError: stderr | |
[default] ) | |
: stderr | |
[default] from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:46:in `instance_eval' | |
: stderr | |
[default] from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:46:in `method_missing' | |
: stderr | |
[default] from /tmp/vagrant-chef/cookbooks-0/webapp/recipes/default.rb:33:in `from_file' | |
: stderr | |
[default] from /tmp/vagrant-chef/cookbooks-0/webapp/recipes/default.rb:20:in `each' | |
: stderr | |
[default] from /tmp/vagrant-chef/cookbooks-0/webapp/recipes/default.rb:20:in `from_file' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/cookbook_version.rb:472:in `load_recipe' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/run_context.rb:94:in `load' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/run_context.rb:91:in `each' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/run_context.rb:91:in `load' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/run_context.rb:55:in `initialize' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/client.rb:155:in `new' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/client.rb:155:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/solo.rb:190:in `run_application' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/solo.rb:181:in `loop' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/solo.rb:181:in `run_application' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application.rb:62:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/chef-solo:25 | |
from /usr/bin/chef-solo:19:in `load' | |
from /usr/bin/chef-solo:19 | |
: stderr | |
[default] [Mon, 02 May 2011 13:51:00 -0700] INFO: Ran execute[apt-get update] successfully | |
[Mon, 02 May 2011 13:51:00 -0700] ERROR: Running exception handlers | |
[Mon, 02 May 2011 13:51:00 -0700] ERROR: Exception handlers complete | |
: stdout | |
[default] : 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] |
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
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 = "base" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
config.vm.box_url = "http://files.vagrantup.com/lucid32.box" | |
# Assign this VM to a host only network IP, allowing you to access it | |
# via the IP. | |
# config.vm.network "33.33.33.10" | |
# 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 "http", 80, 8080 | |
# 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" | |
# Enable provisioning with chef solo, specifying a cookbooks path (relative | |
# to this Vagrantfile), and adding some recipes and/or roles. | |
# | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = "fnichol-cookbooks" | |
chef.add_recipe('apt') | |
chef.add_recipe('vim') | |
chef.add_recipe('tmux') | |
chef.add_recipe('webapp') | |
# You may also specify custom JSON attributes: | |
chef.json.merge!({ | |
:mysql_password => "foo", | |
:webapp => { | |
:web_server => "nginx", | |
:sites_root => "/home/vagrant/sites/", | |
:vhosts => [ | |
{ :id => "production", | |
:host_name => "foo.example.com" | |
} | |
], | |
:apps => [ | |
{ :id => "litdistco-sales", | |
:vhost => "production", | |
:profile => "rails", | |
:user => "litdistco_deploy", | |
:mount_path => "" | |
} | |
], | |
:users => { | |
:deploy => { | |
:deploy_keys => "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvNt0IGYJSpkG6gmrtSP9sSbuuSQD+CttTloiwdZbsY7BL+KUPWZ3B/egvqCr76HMmnuNhUh6ROwOagXRXpq7DYC2kkjVloYbrD5Wzt+GTpGMO0Vg0yn0s/xg6TqBnfoSjl16PapOorrD03G9G+Ilx4Jco6fJ/39us/mugAP8L84OBpANrdu6kU3IlPnn3AV3oOn9XSrrO94JPeg74GKq6VxZChCXu/J6XzV1vJSj0qiiWuL9iV8Dg9FElMTcTZ+Jq4X8FKI7xvzaLacgAql+smnG2AHa8TPoaZJfCak8ITjO0FtLBJkilo+OojaOdCpqF27AElUpEFDxhQjdhT609w== [email protected]" | |
} | |
} | |
}, | |
:rvm => { | |
:rvmrc => { | |
:rvm_trust_rvmrcs_flag => 1, | |
:rvm_gemset_create_on_use_flag => 1 | |
}, | |
:version => "1.6.5" | |
}, | |
:rvm_passenger => { | |
:rvm_ruby => "ruby-1.9.2-p180@passenger", | |
:version => "3.0.7" | |
} | |
}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment