- From: Joshua Timberman <
>
- To:
- Subject: [chef] Re: Running two applications in the same node using application cookbook
- Date: Thu, 26 Apr 2012 09:21:16 -0600
Hello,
On Apr 25, 2012, at 4:26 PM, Daniel Cukier wrote:
>
Is it possible to run 2 applications in the same node using the application
>
cookbook?
>
>
I have tried to do it by adding two roles of two different applications to
>
the same node. Both roles are based on the application cookbook.
>
>
But just one of the applications is being installed.
It is not currently possible because of the way the application::default
recipe works and how Chef de-duplicates recipes.
The application::default recipe does an "include_recipe" for each recipe
relevant to the application being managed, so if you have two apps that
should be rails + unicorn, it does this:
# app1
include_recipe "application::rails"
include_recipe "application::unicorn"
# app2
include_recipe "application::rails"
include_recipe "application::unicorn"
However, the second app, Chef will say[0] "not including recipe
application::rails because I have already seen it.
The solution to this problem is address by implementing "application" as a
lightweight resource, and is the work done primarily by Noah and Andrea for
COOK-634[1][2]. The cookbooks for this work will be released by Opscode at
some point soon; the more people we get testing the code the better, and the
sooner we can release. They're probably beta quality right now, though I
believe that the existing recipes will remain backwards compatible for a
couple months after release.
[0]: you can see the messages with -l debug
[1]:
https://github.com/andreacampi/application/tree/COOK-634
[2]:
http://lists.opscode.com/sympa/arc/chef/2012-04/msg00329.html
--
Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman
Archive powered by MHonArc 2.6.16.