Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a separate test environment?

Status
Not open for further replies.

BPetro

Programmer
Oct 1, 2002
59
US
How hard is it with Tomcat 4.1.24 under Linux to set up two separate directory structures so one handles production without hitting development errors and the other is development??

Any help with links for docs or else just a brief overview of the major files to modify for each portion of this setup change would be appreciated!

Thanks!
 
While it is insane, we do this all the time. Each developer gets their own structure and then in production we run a single box for our demo sites, customer specific sites and 'code preview' sites.

It works pretty well for us in these contexts.

All you need to do (assuming your sharing a JVM amongst them all ) is define virtual hosts in the server.xml, create the directory structure and deploy.

For us that means updating server.xml, creating a directory and doing a cvs checkout for the branch the site or developer requires.

Sandboxes in this context are great.

If one site kills the JVM or corrupts some shared data your toast though but I have never had that happen. Sedj would know better, he's the veteran around these parts :)



 
Good comments - to clarify this isn't a business situation or I would agree with Sedj. But its a fairly simple website done as a donation of time, and I only have one server to work with. Limitations force decisions sometimes. Anyway, I've had occasion to do a relatively small change thinking it's safe and sure enough it breaks something which, being a perfectionist, I find rather embarrasing, so I wanted to set up a small temporary testing environment that is a duplicate if its not too difficult to do so. My expectations are that the types of simple 'typo' errors that might occur will not be deep enough into the excentricities of Java to cause crashes.

So siberian your description is very helpful. I'll toy with this on a test server before I try to push it onto the 'production' web server. But to clarify my overview - under this concept, are you saying we will not have multiple CATALINA_BASE's - we will have only one, but then we will have multiple directories under the webapps directory there? Or would we be starting up multiple Tomcat instances but with all Tomcat instances sharing just one JAVA_HOME and one CATALINA_HOME? I believe you are suggesting the latter but I am not at all certain.

Thanks to both of you for your thoughts and time!
 
I have one CATALINA_BASE but virtual hosts don't care about that. A VHOST in server.xml can be anywhere on your box and function.

For us, each developer has their websites directly off their home directory. That directory is placed into the vhost context in server.xml and everyone is happy.

One JAVA_HOME, One CATALINA_BASE

Good luck! Let me know if I can help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top