Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example output for the vagrant_example.
Macbook:vagrant_example (master) $ time vagrant up
[default] Provisioning enabled with chef_solo...
[default] Box base was not found. Fetching box from specified URL...
[default] Downloading with Vagrant::Downloaders::HTTP...
[default] Downloading box: http://files.vagrantup.com/lucid32.box
[default] Extracting box...
[default] Verifying box...
[default] Cleaning up downloaded box...
[default] Importing base box 'base'...
[default] Matching MAC address for NAT networking...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Preparing host only network...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Enabling host only network...
[default] Mounting shared folders...
[default] -- v-root: /app
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
[default] /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/cookbook/cookbook_collection.rb:38: stderr
[default] : : stderr
[default] Cookbook apt not found: stderr
[default] (: stderr
[default] Chef::Exceptions::CookbookNotFound)
from /usr/lib/ruby/gems/1.8/gems/extlib-0.9.15/lib/extlib/mash.rb:31:in `call'
from /usr/lib/ruby/gems/1.8/gems/extlib-0.9.15/lib/extlib/mash.rb:31:in `default'
from /usr/lib/ruby/gems/1.8/gems/extlib-0.9.15/lib/extlib/mash.rb:31:in `default'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/language_include_recipe.rb:39:in `[]'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/language_include_recipe.rb:39: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] [Wed, 23 Mar 2011 11:48:57 -0700] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[ruby_enterprise]", "recipe[bundler_enterprise]", "recipe[passenger_enterprise::apache2]", "recipe[mysql::server]", "recipe[git]", "recipe[development_app]", "recipe[development]"] from JSON
[Wed, 23 Mar 2011 11:48:57 -0700] INFO: Starting Chef Run (Version 0.9.12)
[Wed, 23 Mar 2011 11:48:57 -0700] ERROR: Running exception handlers
[Wed, 23 Mar 2011 11:48:57 -0700] ERROR: Exception handlers complete
: stdout
[default] 'unknown': unknown terminal type.
: stderr
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]
real 8m31.172s
user 1m7.607s
sys 0m14.958s
Macbook:vagrant_example (master) $ time vagrant reload
[default] Provisioning enabled with chef_solo...
[default] Attempting graceful shutdown of linux...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Cleaning previously set shared folders...
[default] Creating shared folders metadata...
[default] Preparing host only network...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Enabling host only network...
[default] Mounting shared folders...
[default] -- v-csc-0: /tmp/vagrant-chef/cookbooks-0
[default] -- v-root: /app
[default] -- v-csc-1: /tmp/vagrant-chef/cookbooks-1
[default] -- v-csc-2: /tmp/vagrant-chef/cookbooks-2
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
[default] [Wed, 23 Mar 2011 11:50:05 -0700] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[ruby_enterprise]", "recipe[bundler_enterprise]", "recipe[passenger_enterprise::apache2]", "recipe[mysql::server]", "recipe[git]", "recipe[development_app]", "recipe[development]"] from JSON
[Wed, 23 Mar 2011 11:50:05 -0700] INFO: Starting Chef Run (Version 0.9.12)
[Wed, 23 Mar 2011 11:50:06 -0700] WARN: Missing gem 'mysql'
: stdout
[default] [Wed, 23 Mar 2011 11:50:11 -0700] INFO: Ran execute[apt-get update] successfully
: stdout
[default] [Wed, 23 Mar 2011 11:50:11 -0700] INFO: Installing package[mysql-devel] version 5.1.41-3ubuntu12.10
: stdout
[default] [Wed, 23 Mar 2011 11:50:25 -0700] INFO: Installing package[mysql-client] version 5.1.41-3ubuntu12.10
: stdout
[default] [Wed, 23 Mar 2011 11:50:52 -0700] INFO: Installing gem_package[mysql] version 2.8.1
[Wed, 23 Mar 2011 11:50:59 -0700] WARN: Could not find previously defined grants.sql resource
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Creating directory[/var/cache/local] at /var/cache/local
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting owner to 0 for directory[/var/cache/local]
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting group to 0 for directory[/var/cache/local]
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting mode to 755 for directory[/var/cache/local]
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Creating directory[/var/cache/local/preseeding] at /var/cache/local/preseeding
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting owner to 0 for directory[/var/cache/local/preseeding]
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting group to 0 for directory[/var/cache/local/preseeding]
[Wed, 23 Mar 2011 11:50:59 -0700] INFO: Setting mode to 755 for directory[/var/cache/local/preseeding]
: stdout
[default] [Wed, 23 Mar 2011 11:51:00 -0700] INFO: Installing package[binutils-doc] version 2.20.1-3ubuntu7.1
: stdout
[default] [Wed, 23 Mar 2011 11:51:05 -0700] INFO: Installing package[autoconf] version 2.65-3ubuntu1
: stdout
[default] [Wed, 23 Mar 2011 11:51:19 -0700] INFO: Installing package[flex] version 2.5.35-9
: stdout
[default] [Wed, 23 Mar 2011 11:51:26 -0700] INFO: Installing package[bison] version 1:2.4.1.dfsg-3
: stdout
[default] [Wed, 23 Mar 2011 11:51:32 -0700] INFO: Installing package[libssl-dev] version 0.9.8k-7ubuntu8.6
: stdout
[default] [Wed, 23 Mar 2011 11:51:58 -0700] INFO: Installing package[libreadline5-dev] version 5.2-7build1
: stdout
[default] [Wed, 23 Mar 2011 11:52:27 -0700] INFO: remote_file[/tmp/ruby-enterprise-1.8.7-2011.01.tar.gz]: Creating /tmp/ruby-enterprise-1.8.7-2011.01.tar.gz
: stdout
[default] [Wed, 23 Mar 2011 11:59:39 -0700] INFO: Ran bash[Install Ruby Enterprise Edition] successfully
: stdout
[default] [Wed, 23 Mar 2011 11:59:40 -0700] INFO: Installing gem_package[bundler] version 1.0.10
: stdout
[default] [Wed, 23 Mar 2011 11:59:48 -0700] INFO: Installing gem_package[passenger] version 3.0.2
: stdout
[default] [Wed, 23 Mar 2011 12:00:08 -0700] INFO: Installing package[apache2] version 2.2.14-5ubuntu8.4
: stdout
[default] [Wed, 23 Mar 2011 12:00:36 -0700] INFO: Creating directory[/etc/apache2/ssl] at /etc/apache2/ssl
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Setting owner to 0 for directory[/etc/apache2/ssl]
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Setting group to 0 for directory[/etc/apache2/ssl]
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Setting mode to 755 for directory[/etc/apache2/ssl]
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[apache2.conf] to /etc/apache2/apache2.conf
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[apache2.conf] to /var/chef/backup/etc/apache2/apache2.conf.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[security] to /etc/apache2/conf.d/security
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[security] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[/etc/apache2/ports.conf] to /etc/apache2/ports.conf
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[/etc/apache2/ports.conf] to /var/chef/backup/etc/apache2/ports.conf.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[/etc/apache2/ports.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[/etc/apache2/sites-available/default] to /etc/apache2/sites-available/default
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[/etc/apache2/sites-available/default] to /var/chef/backup/etc/apache2/sites-available/default.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[/etc/apache2/sites-available/default] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[/etc/apache2/mods-available/alias.conf] to /etc/apache2/mods-available/alias.conf
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[/etc/apache2/mods-available/alias.conf] to /var/chef/backup/etc/apache2/mods-available/alias.conf.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[/etc/apache2/mods-available/alias.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[/etc/apache2/mods-available/mime.conf] to /etc/apache2/mods-available/mime.conf
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[/etc/apache2/mods-available/mime.conf] to /var/chef/backup/etc/apache2/mods-available/mime.conf.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[/etc/apache2/mods-available/mime.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Writing updated content for template[/etc/apache2/mods-available/setenvif.conf] to /etc/apache2/mods-available/setenvif.conf
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: Backing up template[/etc/apache2/mods-available/setenvif.conf] to /var/chef/backup/etc/apache2/mods-available/setenvif.conf.chef-20110323120037
[Wed, 23 Mar 2011 12:00:37 -0700] INFO: template[/etc/apache2/mods-available/setenvif.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
: stdout
[default] [Wed, 23 Mar 2011 12:00:38 -0700] INFO: Installing package[apache2-threaded-dev] version 2.2.14-5ubuntu8.4
: stdout
[default] [Wed, 23 Mar 2011 12:01:22 -0700] INFO: Installing package[libcurl4-openssl-dev] version 7.19.7-1ubuntu1
: stdout
[default] [Wed, 23 Mar 2011 12:03:24 -0700] INFO: Ran execute[passenger_apache2_module] successfully
[Wed, 23 Mar 2011 12:03:24 -0700] INFO: Writing updated content for template[/etc/apache2/mods-available/passenger.load] to /etc/apache2/mods-available/passenger.load
[Wed, 23 Mar 2011 12:03:24 -0700] INFO: Writing updated content for template[/etc/apache2/mods-available/passenger.conf] to /etc/apache2/mods-available/passenger.conf
: stdout
[default] [Wed, 23 Mar 2011 12:03:24 -0700] INFO: Ran execute[a2enmod passenger] successfully
: stdout
[default] [Wed, 23 Mar 2011 12:03:25 -0700] INFO: Writing updated content for template[/var/cache/local/preseeding/mysql-server.seed] to /var/cache/local/preseeding/mysql-server.seed
[Wed, 23 Mar 2011 12:03:25 -0700] INFO: template[/var/cache/local/preseeding/mysql-server.seed] sending run action to execute[preseed mysql-server] (immediate)
: stdout
[default] [Wed, 23 Mar 2011 12:03:25 -0700] INFO: Ran execute[preseed mysql-server] successfully
[Wed, 23 Mar 2011 12:03:25 -0700] INFO: Writing updated content for template[/etc/mysql/debian.cnf] to /etc/mysql/debian.cnf
: stdout
[default] [Wed, 23 Mar 2011 12:03:25 -0700] INFO: Installing package[mysql-server] version 5.1.41-3ubuntu12.10
: stdout
[default] [Wed, 23 Mar 2011 12:04:10 -0700] INFO: Writing updated content for template[/etc/mysql/my.cnf] to /etc/mysql/my.cnf
[Wed, 23 Mar 2011 12:04:10 -0700] INFO: Backing up template[/etc/mysql/my.cnf] to /var/chef/backup/etc/mysql/my.cnf.chef-20110323120410
[Wed, 23 Mar 2011 12:04:10 -0700] INFO: template[/etc/mysql/my.cnf] sending restart action to service[mysql] (immediate)
: stdout
[default] [Wed, 23 Mar 2011 12:04:15 -0700] INFO: service[mysql]: restarted successfully
[Wed, 23 Mar 2011 12:04:15 -0700] INFO: Writing updated content for template[/etc/mysql/grants.sql] to /etc/mysql/grants.sql
[Wed, 23 Mar 2011 12:04:15 -0700] INFO: template[/etc/mysql/grants.sql] sending run action to execute[mysql-install-privileges] (immediate)
: stdout
[default] [Wed, 23 Mar 2011 12:04:15 -0700] INFO: Ran execute[mysql-install-privileges] successfully
: stdout
[default] [Wed, 23 Mar 2011 12:04:16 -0700] INFO: Installing package[git-core] version 1:1.7.0.4-1ubuntu0.2
: stdout
[default] [Wed, 23 Mar 2011 12:04:37 -0700] INFO: Writing updated content for template[/etc/apache2/sites-available/app] to /etc/apache2/sites-available/app
: stdout
[default] [Wed, 23 Mar 2011 12:04:37 -0700] INFO: Ran execute[a2ensite app] successfully
[Wed, 23 Mar 2011 12:04:37 -0700] INFO: execute[a2ensite app] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
: stdout
[default] [Wed, 23 Mar 2011 12:06:02 -0700] INFO: Ran bash[Prepare development environment] successfully
[Wed, 23 Mar 2011 12:06:02 -0700] INFO: template[apache2.conf] sending restart action to service[apache2] (delayed)
: stdout
[default] [Wed, 23 Mar 2011 12:06:05 -0700] INFO: service[apache2]: restarted successfully
[Wed, 23 Mar 2011 12:06:05 -0700] INFO: execute[a2enmod passenger] sending restart action to service[apache2] (delayed)
: stdout
[default] [Wed, 23 Mar 2011 12:06:08 -0700] INFO: service[apache2]: restarted successfully
[Wed, 23 Mar 2011 12:06:08 -0700] INFO: Chef Run complete in 962.467311 seconds
[Wed, 23 Mar 2011 12:06:08 -0700] INFO: cleaning the checksum cache
[Wed, 23 Mar 2011 12:06:08 -0700] INFO: Running report handlers
[Wed, 23 Mar 2011 12:06:08 -0700] INFO: Report handlers complete
: stdout
[default] 'unknown': unknown terminal type.
: stderr
real 16m0.057s
user 0m5.008s
sys 0m0.998s
Macbook:vagrant_example (master) $ echo "10.5.5.5 app.dev" | sudo tee -a /etc/hosts
10.5.5.5 app.dev
Macbook:vagrant_example (master) $ curl "http://app.dev/users" -s|grep "New User"
<a href="/users/new">New User</a>
Macbook:vagrant_example (master) $ vagrant ssh
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
Welcome to your Vagrant-built virtual machine.
Last login: Wed Jan 19 16:09:20 2011
vagrant@box:/app$ rake
(in /app)
Loaded suite /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.
Finished in 0.287387 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
Loaded suite /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.......
Finished in 1.082366 seconds.
7 tests, 10 assertions, 0 failures, 0 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment