If the sites all share a similar architecture (which it sounds like they do) I would recommend creating a single "legacy_application" cookbook. You can then create an application data bag with an item for each application you will be deploying. These data bag items would contain data similar to the "example.com" hash you shared above. You can still use a lot of the DRY patterns laid forth by the Opscode application cookbook even though the logic in your recipes may differ.Seth
--
Opscode, Inc.
Seth Chisamore, Technical Evangelist
T: (404) 348-0505 E: " target="_blank">
Twitter, IRC, Github: schisamo
On Wed, Oct 6, 2010 at 5:22 AM, Jon Wood < " target="_blank"> > wrote:Yes, I looked at it, but for my purposes it wasn't really right - itOn 6 October 2010 12:26, Ash Berlin < " target="_blank"> > wrote:
> On 6 Oct 2010, at 12:19, Jon Wood wrote:
>> On 6 October 2010 08:55, < " target="_blank"> > wrote:
>>> I am looking for the best way to structure the following.
>>>
>>> We have several legacy java websites running apache, tomcat & mysql.
>>>
>>> Currently I am thinking about each site would have it's own cookbook and branch
>>> in the node, such as
>>> the one below:
>>>
>> ...snip...
>>>
>>> Does this sounds like the chef way to go?
>>
>> That would generally be the way to go, although you might like to look
>> at using data bags for that instead, and including an attribute called
>> something like "deploy_to" which lists the servers that application
>> should be deployed onto.
>
> (Missed the original email in this thread, but)
>
> Have you looked at the application cookbook? It drives deploys from data bags - an example is http://gist.github.com/568508
>
> The main reason I bring this up is that it uses 'deploy_to' as a path where to deploy things to. It works out what hosts to deploy it to by looking at the roles of the node and the roles you specify in the "server_roles" key. More info on http://github.com/opscode/cookbooks/tree/master/application/
>
assumes that you're going to be hosting things over a full cluster of
machines with specific uses, where as my situation is more of a shared
hosting one, with multiple sites on a single server handling web,
application and database. Because of that I was able to build my own
which was a lot simpler to use and support, but I can see that the
application cookbook would work well in other situations.
--
Jon Wood
Blank Pad Development
07827 888143
Archive powered by MHonArc 2.6.16.