[chef] new tomcat cookbook w/ lwrp to create multiple instances on a single node


Chronological Thread 
  • From: Bryan Berry < >
  • To:
  • Subject: [chef] new tomcat cookbook w/ lwrp to create multiple instances on a single node
  • Date: Thu, 23 Feb 2012 16:22:55 +0100
  • Authentication-results: mr.google.com; spf=pass (google.com: domain of designates 10.220.156.201 as permitted sender) ; dkim=pass

I have revised the tomcat cookbook so that it installs from the binaries hosted at apache.org rather than jpackage and so this supports multiple tomcat instances on the same node. It supports the RedHat and Debian families

https://github.com/bryanwb/cookbooks/tree/master/tomcat

to use it, 

add "recipe[tomcat::ark]"   to your run_list

this will install the basic tomcat libraries at /usr/local/tomcat/default/ but it will not enable a system daemon
tomcat "jira" do
  http_port  8080
  https_port 8443
end
The following actions will be taken
  • creates a tomcat instance at  /usr/local/tomcat/jira/  w/ templates catalina.properties, logging.properties, server.xml files 
  • create a user account "jira" and make it the owner of /usr/local/tomcat/jira
  • set environment variables in /etc/default/jira, notably CATALINA_HOME as /usr/local/tomcat/default/ and CATALINA_BASE as /usr/local/tomcat/jira
  • creates system V init script in /etc/init.d/jira and enables it, this is a generic startup script modeled on catalina.sh
tomcat "confluence" do
  http_port  8081
  https_port 8444
  jvm_opts ["-Xmx1024M,  "XX:MaxPermGen256M" ]
end
This resource will create a tomcat instance at /usr/local/tomcat/confluence, create a `confluence` user, set up the sysv init script, etc.

The only property that tomcat['confluence'] will share with tomcat['jira'] the common value for CATALINA_HOME

This cookbook is still changing rapidly as I work out the kinks, but I think others will find it useful.

BryanWB







Archive powered by MHonArc 2.6.16.

§