[chef] Re: Re: Re: Re: Re: Configure/deploy multiples apps per cookbook, how?


Chronological Thread 
  • From: Marcelo de Moraes Serpa < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Configure/deploy multiples apps per cookbook, how?
  • Date: Thu, 16 Aug 2012 20:56:40 -0500

Wow! Thanks for the comprehensive reply Andrea!

I'll try those suggestion tonight. @Igor, I'll check out rails_ghetto as well! I'll share my experience here afterwards.

Meanwhile, I have a quick question regarding the approach of Bryan Baugher, in this thread:

http://lists.opscode.com/sympa/arc/chef/2012-07/msg00355.html

How would that work?

Thank you *very much* again for the replies!

- Marcelo.

On Thu, Aug 16, 2012 at 5:22 AM, Igor Afonov < " target="_blank"> > wrote:
Andrea,

Wow, thanks, I've totally missed that I can do it like that. I thought that there maybe a better way to do it but totally missed most obvious way.

Igor

Отправлено при помощи Sparrow

четверг, 16 августа 2012 г. в 11:38, Andrea Campi написал:

Igor,

On Thu, Aug 16, 2012 at 9:36 AM, Igor Afonov < " target="_blank"> > wrote:
Hi Marcelo,

I've already mentioned in this list but I have a cookbook which is basically
what you need. It manages deployment of several very similar rails
applications. As Andrea mentioned if you have different applications it is
better to have a separate cookbooks for them. But for your case here is the
cookbook - https://github.com/iafonov/rails_ghetto. I'm 100% sure that you'd
have to change it for your needs. I'm not a big fan of data bags (this
cookbook was initially created for chef-solo) but if you are - you can quite
easily alter it to use data bags instead of attributes.

I had a look at rails_ghetto some time ago and I like it. If anything,
it shows a big benefit of the "new" application cookbook: you were
able to reuse its LWRPs to add functionality on top.


One question though: how come you rolled your own nginx_sites_enable
instead of using application_nginx? Any missing functionality there?
At a cursory glance it looks like a perfect match, you just need to
specify your own template.
I.e. in your recipes/deploy.rb:

rails_applications do |name, app|
application name do
nginx do
template "nginx_site.erb"
cookbook_name "rails_ghetto"
end
end
end

And you'd be pretty much set.

Did you try that and hit any roadblock?

Andrea





Archive powered by MHonArc 2.6.16.

§