[chef] Re: Re: Re: Re: Rails 3 and ruby 1.9.2 application with chef


Chronological Thread 
  • From: Daniel Cukier < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Rails 3 and ruby 1.9.2 application with chef
  • Date: Wed, 25 Apr 2012 09:50:05 -0300

When I try

knife cookbook site vendor application_ruby

or

knife cookbook site vendor application_rails

both do not work...

Daniel

On Wed, Apr 25, 2012 at 9:22 AM, Daniel Cukier < " target="_blank"> > wrote:
> If your cookbook correctly depends on application and
> application_rails (if it's a Rails app), you don't need to explicitly
> include the application cookbook.

It is application_ruby or application_rails? I'm confused... :-)




On Wed, Apr 25, 2012 at 1:51 AM, Andrea Campi < " target="_blank"> > wrote:
I am traveling at the moment, and I am on GMT+8, so I may reply to
this and other threads with quite a bit of latency...


On Wed, Apr 25, 2012 at 10:22 AM, Daniel Cukier < " target="_blank"> > wrote:
> Bryan, I've looked to this refactor, but actually I did not find a good
> documentation of how to use it.

Interesting. The documentation is one of the areas I am looking for feedback on.
If you can spare a few minutes, can you elaborate on what you find
unclear in the documentation? Here or private email.

I guess a "how to convert from the old version" tutorial, as you
suggest, would be helpful.

> From what I've understood, I need to create a cookbook for my_app and add
> the application code block to the default.rb of my cookbook. Is it correct?

That's correct.

> If it is so, then it is worse than before, when all I needed to do was
> create a data_bag, put some configuration there and create a my_app role
> with the application default recipe in its run_list.

To be clear: I don't think removal of the data bag was a goal of the
project, it's more of a side casualty.

Data bags are not very expressive; while it was pretty easy to get
started, people with more advanced use cases kept bumping into
limitations. For example, some attributes were per-environment, some
weren't.

Since the new DSL is more complete and powerful than the old recipe,
it would be quite hard to create a purely data bag-driven mode that is
useful and generic for everybody.

On the other hand, it's pretty easy to roll your own, as Joshua has
demonstrated: http://lists.opscode.com/sympa/arc/chef/2012-04/msg00346.html
Nobody knows what you need better than you, so if you'd rather use a
data bag I suggest you look into that approach.

> Another thing is: with this new refactor, do I still need to add the
> application recipe to the node run_list?

If your cookbook correctly depends on application and
application_rails (if it's a Rails app), you don't need to explicitly
include the application cookbook.
Moreover, the application::default recipe (and the stack-specific
ones) will be deprecated. Once you are done converting all your apps
to the "new style", you should remove that recipe from the run_list.
We will be keeping backward compatibility, with a deprecation warning,
for about 3 months.



--
Daniel Cukier
Software Artist




--
Daniel Cukier
Software Artist
+55 11 9991-3913




Archive powered by MHonArc 2.6.16.

§