ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Vagrant - Passanger module does not exist/command failed chiliproject_settings

Added by Lukasz Radziwonowicz at 2013-02-05 06:26 pm

Hi!

I wanted to test ChiliProject and start it using Vagrant file on Windows 7 machine. Because I'm new to ChiliProject, Chef and Vagrant I can't configure it correctly.

I made following steps:
  1. Updated Vagrantfile and added path to local cookbooks:
    chef.cookbooks_path = ["cookbooks", "../cookbooks"]
    
  2. Downloaded from OpCode git repository followed cookbooks: apache2, apt, build-essential, database, git, imagemagick, logrotate, ohai, openssl, passenger_apache2 and postgresql
  3. Downloaded ChiliProject cookbook

When I start VM I get an error: Module passenger does not exist! I installed it over SSH: apt-get install libapache2-mod-passenger but then I get following error:

[2013-02-05T17:20:00+00:00] INFO: chiliproject_settings[Set hostname for default] sending set action to chiliproject_set
tings[Delayed Settings for default] (delayed)
[2013-02-05T17:20:00+00:00] INFO: Processing chiliproject_settings[Delayed Settings for default] action set (/tmp/vagran
t-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb line 26)

================================================================================
Error executing action `set` on resource 'chiliproject_settings[Delayed Settings for default]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of script/console ----
STDOUT:
STDERR: /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/../config/preinitializer.rb:1
9: Could not load the bundler gem. Install it with `gem install bundler`. (RuntimeError)
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:42:in `load'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:42:in `preinitia
lize'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:24:in `boot!'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:137
        from script/console:3:in `require'
        from script/console:3
---- End output of script/console ----
Ran script/console returned 1

Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb:59:in `set_now'
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb:9:in `class_from_file'

Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb

 25:   unless (resource_collection.find("chiliproject_settings[Delayed Settings for #{inst['id']}]") rescue nil)
 26:     chiliproject_settings "Delayed Settings for #{inst['id']}" do
 27:       action :nothing
 28:       values node.run_state['chiliproject_delayed_settings'][inst['id']]
 29:       instance new_resource.instance
 30:       delayed false
 31:     end
 32:

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb:26:in `set_later'

chiliproject_settings("Delayed Settings for default") do
  retry_delay 2
  instance {"log_dir"=>"/var/log/chiliproject/default", "user"=>"chili_default", "repository"=>"https://github.com/chili
project/chiliproject.git", "rails_env"=>"production", "logrotate"=>true, "migrate"=>true, "repository_hosting"=>[], "set
tings"=>{}, "local_gems"=>{}, "database"=>{"username"=>"chili_default", "host"=>"localhost", "password"=>"super_secret",
 "port"=>5432, "hostname"=>"localhost", "database_yml"=>{"username"=>"chili_default", "port"=>5432, "password"=>"super_s
ecret", "host"=>"localhost", "database"=>"chili_default", "reconnect"=>true, "encoding"=>"utf8", "adapter"=>"postgresql" 
}, "database"=>"chili_default", "superuser"=>nil, "ssl"=>false, "reconnect"=>true, "superuser_password"=>nil, "encoding" 
=>"utf8", "create_if_missing"=>true, "adapter"=>"postgresql", "role"=>nil, "backup_before_migrate"=>true, "collation"=>" 
en_US.UTF-8"}, "data_bag"=>"chiliproject", "session"=>{"secret"=>"supersecretsupersecretsupersecretsupersecretsupersecre
t"}, "base_uri"=>#<URI::Generic:0x7ffcd865c610 URL:http://default/>, "chef_type"=>"data_bag_item", "config_files"=>{}, " 
shared_dir"=>"/opt/chiliproject/shared/default", "deploy_to"=>"/opt/chiliproject/default", "group"=>"chili_default", "re
vision"=>"master", "external_uri"=>#<URI::HTTP:0x7ffcd865a5b8 URL:http://localhost:4223/>, "id"=>"default", "apache"=>{" 
cookbook"=>"chiliproject", "template"=>"apache.conf.erb", "serve_aliases"=>true, "document_root"=>"/var/www"}, "bundle_v
endor"=>false, "force_deploy"=>true, "plugins"=>{}}
  retries 0
  values {"host_name"=>"localhost:4223", "protocol"=>"http"}
  action [:nothing]
  cookbook_name :chiliproject
end
[2013-02-05T17:20:00+00:00] ERROR: Running exception handlers
[2013-02-05T17:20:00+00:00] ERROR: Exception handlers complete
[2013-02-05T17:20:00+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-05T17:20:00+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: chiliproject_settings[Delayed Settings for defa
ult] (/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chiliproject/providers/settings.rb line 26) had an error: Mixlib::ShellO
ut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of script/console ----
STDOUT:
STDERR: /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/../config/preinitializer.rb:1
9: Could not load the bundler gem. Install it with `gem install bundler`. (RuntimeError)
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:42:in `load'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:42:in `preinitia
lize'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:24:in `boot!'
        from /opt/chiliproject/default/releases/3f9007b9090b29bb7eabdfb1c3325c068077da27/config/boot.rb:137
        from script/console:3:in `require'
        from script/console:3
---- End output of script/console ----
Ran script/console returned 1
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Does anyone have an idea how to resolve this issue?

Thanks in advance!
Lukasz


Replies (4)

RE: Vagrant - Passanger module does not exist/command failed chiliproject_settings - Added by Holger Just at 2013-02-05 07:39 pm

We have an example setup for Vagrant at https://github.com/chiliproject/vagrant which (among other things) makes sure you have all required cookbooks available using librarian. Please see that repository for an full example on how to use the chiliproject cookbook.

If that doesn't help, please post your full Vagrantfile as well as a complete list of your cookbooks and the databag.

RE: Vagrant - Passanger module does not exist/command failed chiliproject_settings - Added by Lukasz Radziwonowicz at 2013-02-05 09:14 pm

Thanks for reply. I'm using the Vagrant setup provided by ChiliProject. vargant up returned error that 'apt' is not available, so I added missing cookbooks on my own.

My question, do I have to change the default settings in Vagrant file or ChiliProject cookbook to run test environment?

Any ideas?

Cheers,
Lukasz

RE: Vagrant - Passanger module does not exist/command failed chiliproject_settings - Added by Felix Schäfer at 2013-02-05 10:09 pm

Lukasz Radziwonowicz wrote:

My question, do I have to change the default settings in Vagrant file or ChiliProject cookbook to run test environment?

No. I just cloned the vagrant repository to make sure, run bundle install and vagrant up in the cloned directory and everything was fine. I even removed my cached copy of the vagrant base box to make sure I had a pristine state.

I'm using the Vagrant setup provided by ChiliProject. vargant up returned error that 'apt' is not available, so I added missing cookbooks on my own.

Could you please post the exact error you encountered? There's no part of vagrant that normally requires apt on the host system, and I actually ran the test above on Mac OS X, which doesn't have apt, so there's something else going awry.

RE: [CLOSED] Vagrant - Passanger module does not exist/command failed chiliproject_settings - Added by Lukasz Radziwonowicz at 2013-02-06 12:57 pm

Thanks for your help. I've started one more time from scratch and it works perfect!

I think, I had problem with my bundler installation.

(1-4/4)