Re: Re: Chef Cookbooks & Versions?


That sounds like just what we’re looking for. Would be more than happy to assist with testing against CentOS…

Will take a look at the recipe and see if can make some progress in the mean time…


Sent from my HTC

----- Reply message -----
From: “Peter Donald”
To: ""
Subject: [chef] Re: Chef Cookbooks & Versions?
Date: Sun, Aug 19, 2012 11:22


On Thursday, August 16, 2012, Gavin Williams wrote:
We run J2EE apps within Glassfish 3, on top of CentOS hosts, with Nagios systems monitoring using NRPE.

I can see existing recipes for Glassfish, Nagios etc. Obviously I’m going to need to write my own Cookbook to cover the configuration required for applications, such as Glassfish resource config, host environment variables etc. The challenge that I can see is that we support multiple versions of our applications in our live env’s, and each could have different glassfish config etc…

I am the author of the glassfish cookbook available at

I would be very interested in helping you incorporate centos support into the cookbook. It is currently Ubuntu centric in that it uses upstart as the init system and it also uses authbind (if you bind to any low ports) which I believe is Debian/Ubuntu specific. Other than that I believe it should be easy to move across.

The way we typically use this cookbook is to create a separate cookbook for each ‘type’ of node. This cookbook then searches a data bag for the list of applications and corresponding versions of applications to deploy in the node. The databag entries also includes definitions of resources that are needed by the applications (i.e. the data source resources, jms resources, mail resources etc). We then merge all these configuration data as attribute data against the node and include the glassfish::attribute_driven_domain recipe and that handles the creation of all the resources/deployent as required. I have a partially written up blog post that describes this which I should finish to show how it all fits together.

There are two places where the cookbook does not provide all the facilities you may need. The first is with clustered glassfish instances which we don’t use so we have yet to develop support for. The second is when there is action required as part of the deploy/upgrade such as database migrations and we have experimental support for this in a private branch but have yet to push it out into the public version (but can do so if needed).

I am currently out on holidays but if you are interested in collaborating on the glassfish cookbook or seeing how we deploy out our applications, ping me early next month and I will get back to you.


Peter Donald

This e-mail has been scanned for all viruses.