I maintain a number of RedHat Enterprise Linux (both 7 and 8) servers (>100) with different applications. To keep my sanity, I'm of course using tools such as Ansible, and more to the point of this questions, locally mirrored copies of public RPM repositories (using Satellite Server for the purpose).
Updates are applied regularly from these repositories to keep the servers secure.
A few of these servers need Apache Tomcat installed. This is one of the few applications that is, to my knowledge, not available from any RPM-based repository; it must be installed manually from a tarball. Updates are also manual (aided by an Ansible role, but I still have to be aware of the new version and manually change it).
Are there any strategies to keep Tomcat up-to-date with little or no constant attention?
Update:
I found half of a solution to my problem. By default, Tomcat keeps the installation and the instance configuration mixed together in a single directory tree identified by CATALINA_HOME. That makes updating Tomcat without clobbering your configuration complicated.
To solve that, you can put the instance-specific files in a separate directory tree identified with the CATALINA_BASE variable. Upgrading Tomcat then becomes as easy as:
- Download the new tarball.
- Untar it to a new location
- Review the readme and changelog for any breaking changes.
- Update the CATALINA_HOME variable to point to the new location, while keeping the CATALINA_BASE variable unchanged.
- Restart Tomcat, using the scripts in the new CATALINA_HOME bin directory.
I am not providing code here because where and how you set CATALINA_HOME and CATALINA_BASE will vary. I set both variables in the service unit file that also starts Tomcat.
Still open: finding a way to automatically find out when a new release of Tomcat is published.