Tomcat Cookbook Rewrite Release

Hello Everyone,

Today we released the Tomcat 2.0 cookbook, which is a complete rewrite of the existing cookbook. If you’ve ever had the pleasure of using the existing cookbook for any non-trivial Tomcat work, you’ll probably understand why a complete rewrite was necessary. The existing cookbook had recipes, miles of attributes, and a somewhat-functional provider that attempted to install the various Tomcat disto packages and configure the monster that is the Tomcat server.xml config. It was a 2009 era Chef cookbook that we continued to bolt functionality onto even though more and more attributes clearly weren’t the real solution. Instead we have just two providers at the moment that should do the heavy lifting of the install, while allowing the user to manage their server.xml destiny.

tomcat_install: Grabs the desired version straight from the Apache Org site. No more distro packages so you can run whatever version you desire and easily switch platforms without cookbook refactoring. Want 2 instances on the same host running different version? Define two resources and done.

tomcat_service: Manages the service using sys-v, upstart, or systemd. Behaves basically just like the standard service resource.

Give it a try and let us know what you think. We’re definitely open to expanding the scope of the cookbook to configure additional parts of Tomcat so let us know if you have any needs or ideas. Just keep in mind we’re trying to avoid large numbers of resource properties or hashes of configs that feel like XML. If it can’t be easily abstracted it’s probably best left up to the user in their wrapper cookbook.