[chef] Re: passenger_apache2 with application_ruby and RVM


Chronological Thread 
  • From: Vladimir Skubriev < >
  • To:
  • Subject: [chef] Re: passenger_apache2 with application_ruby and RVM
  • Date: Thu, 13 Feb 2014 17:20:38 +0400

I too cannot install rvm with rvm cookbook, or system,

I write my own custom code to install rvm in user code.

See my own rvm recipe )


Hope this help. This worked in production some months. 

I cannot share all cookbook now.

I hope in future do it, but i need some refactoring )

See joshua timberman cookbook to setup redmine too (google it).


2014-02-13 16:39 GMT+04:00 Marco Betti < " target="_blank"> >:
Hi Chefs,

I'm trying to install a custom rails application with chef, using application_ruby cookbook with passenger_apache2 sub-resource and chef-rvm (rvm) cookbook.

I'm using chef-zero (local_mode true) to test it, in order to avoid any chef-solo impact and I'm currently using chef-11.8.2 omnibus installation on CentOS6.5_x64.

I managed to achieve the whole installation without using rvm, but in this way installation is done by embedded (omnibus) ruby and I would like to avoid it in order to be able to control ruby version my application will run with.

Unfortunately I cannot manage the whole installation working with rvm (even using bleeding edge version from master).

This is my wrapper recipe:
https://gist.github.com/marbe/8973868
These are involved attributes:
https://gist.github.com/marbe/8973899

This is the error running with params-only hash to pass attribute to passenger_apache2:
 * First run still uses embedded ruby:
https://gist.github.com/marbe/8974157
 * Second run (after re-login to set env variable after rvm install) uses rvm:
https://gist.github.com/marbe/8974173

This is the errror with explicit override of root_path (third run on the same VM instance):
override['passenger']['root_path'] = '/usr/local/rvm/gems/ruby-2.1.0'
https://gist.github.com/marbe/8974200

This is the errror with explicit override of root_path (first run on new VM instance):
https://gist.github.com/marbe/8974359
Again second run (after re-login to set env variable after rvm install) uses rvm:
https://gist.github.com/marbe/8974388

I only found this thread googling around:
http://lists.opscode.com/sympa/arc/chef/2013-03/msg00210.html
and would like to know if anyboby else has been able to manage such a scenario.

Any help would be very appreciated :-)

Marco




--
Ing. Marco Betti
RHCE RHEL4 id 804006512121056



--
Faithfully yours,

CVision Lab System Administrator
Vladmir Skubriev




Archive powered by MHonArc 2.6.16.

§