Chef Cookbooks & Versions?

Hi there,

I’m currently evaluating incorporating Chef into our existing environment. I’m a total freshman to Chef, so excuse any ignorant questions J

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…

How could I support this with Chef?

Thanks in advance for any replies.

Regards
Gavin

Hi,

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
https://github.com/realityforge-cookbooks/glassfish

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.

--
Cheers,

Peter Donald