Sunday, March 13, 2022

[SOLVED] Moving Jenkins configuration from Tomcat7 tarball to apt package manager installation

Issue

I have an existing Jenksins installation which runs on Tomcat7. Tomcat7 was initially installed from Tarball, however I have had a request to use the version from apt. What is the simplest method of copying the installation of Jenkins from the existing Tarball installation, to the new installation?

The other questions I have seen are particularly in relation to moving builds from one machine to another, however, I'd really like to keep the existing Jenkins setup exactly as is, as it has quite a few additional plugins already configured.

The system is an Ubuntu 12 system.


Solution

This should be fairly simple as the Jenkins web app lives in a separate place from the JENKINS_HOME directory where all of your build data is stored.

I'm assuming that you have a standard installation of Jenkins where you copied the jenkins.war file to $CURRENT_CATALINA_HOME/webapps, so your Jenkins responds on http://yourhost.yourdomain/jenkins

If so, you just need to move jenkins.war to the $NEW_CATALINA_HOME/webapps and then make sure that the user running Tomcat knows where your JENKINS_HOME is. You can either do this by defining JENKINS_HOME in the environment of the user that runs Tomcat, or put it in the CATALINA_OPTS startup options from Tomcat. See https://wiki.jenkins-ci.org/display/JENKINS/Tomcat for more detail.



Answered By - gareth_bowles
Answer Checked By - Cary Denson (WPSolving Admin)