LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-11-2017, 10:00 AM   #1
mfaine
LQ Newbie
 
Registered: Nov 2009
Posts: 14

Rep: Reputation: 1
Question Tomcat Multiple Instance RPM


I'd like to split a Tomcat installation into two different RPMs. One RPM would be a simple base installation, non-relocatable. The other would be a relocatable instance RPM that installs a separate CATALINA_HOME instance and depends on the base installation RPM. I know I could just name the instance RPMs based on their intended purpose but that seems really limiting and would result in multiple specially named RPMs. I'd rather have something like:

tomcat-base-$version-$dist-$arch.rpm
tomcat-instance-$version-$dist-$arch.rpm

I could then use puppet to install as many tomcat-instances as I need, each on different network interfaces.

The problem is that I can't seem to find any documentation on how this can be done, which leads me to believe that it can't, which would be a shame.
 
Old 08-11-2017, 10:10 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by mfaine View Post
I'd like to split a Tomcat installation into two different RPMs. One RPM would be a simple base installation, non-relocatable. The other would be a relocatable instance RPM that installs a separate CATALINA_HOME instance and depends on the base installation RPM. I know I could just name the instance RPMs based on their intended purpose but that seems really limiting and would result in multiple specially named RPMs. I'd rather have something like:

tomcat-base-$version-$dist-$arch.rpm
tomcat-instance-$version-$dist-$arch.rpm

I could then use puppet to install as many tomcat-instances as I need, each on different network interfaces.

The problem is that I can't seem to find any documentation on how this can be done, which leads me to believe that it can't, which would be a shame.
Or you could just create a single RPM with your custom configs/paths in it, which CAN be done. No different than packaging up a set of scripts/utilities for use on different systems.

Create your RPM with a dependency on the initial tomcat RPM package.
 
Old 08-11-2017, 11:10 AM   #3
mfaine
LQ Newbie
 
Registered: Nov 2009
Posts: 14

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TB0ne View Post
Or you could just create a single RPM with your custom configs/paths in it, which CAN be done. No different than packaging up a set of scripts/utilities for use on different systems.

Create your RPM with a dependency on the initial tomcat RPM package.
I'm not sure what you mean. That sounds like what I already mentioned and discounted. I'm trying to make it generic enough to handle arbitrarily adding new applications to a server. I already have a custom Tomcat RPM but it is for a single installation where CATALINA_HOME and CATALINA_BASE are the same directories.

I want to avoid something like:

tomcat-base-$version-$dist-$arch.rpm
tomcat-instance1-$version-$dist-$arch.rpm
tomcat-instance2-$version-$dist-$arch.rpm
tomcat-instance3-$version-$dist-$arch.rpm

I also want to avoid a custom RPM that contains two CATALINA_HOME directories because that's a hard coded limitation that's not much better than my existing RPM, what happens when we need to use the RPM on a server that needs three apps deployed all on different network interfaces?

A hacky way to do it would be to dynamically rebuild the RPM before every install passing in a variable that would determine how many times to duplicate the CATALINA_HOME environment, placing them all under a base path for instances. Naming them sequentially instance1, instance2, instanceN where N is the number passed into the build using --define. Not sure if that would work though.

Alternatively, I could just install the base package and handle all of the instances using puppet, downloading the Tomcat zip file and selectively extracting what I need from it for each instance required in the puppet code. That does sound way easier but I hate relying on downloaded files in my puppet code, especially from mirrors. I would also have to rely on proxies and that's really a pain and a source of lots of issues. Still, it does look like the puppet tomcat module will help a lot.
 
  


Reply

Tags
rpm, tomcat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat Issue (multiple tomcat is running) vignesh4sh Linux - Server 4 02-04-2013 01:16 AM
[SOLVED] What is tomcat multiple instance ? vannath Linux - Server 2 05-09-2012 01:13 AM
using Apache as a front end to a running Tomcat instance tkmsr Linux - Server 4 07-20-2010 09:32 AM
How to bind Tomcat instance to an IP? thomas2004ch Linux - Software 1 07-14-2010 06:25 AM
multiple instance of X satinet Linux - General 3 03-10-2005 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration