-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
- Docker version 1.10.3, build 20f81dd
- CentOS Linux release 7.2.1511 (Core)
- Java(TM) SE Runtime Environment, 1.8.0_45-b14
- Tomcat 8.5.5
- Jenkins 2.19.1, -Djenkins.install.runSetupWizard=false
We are deploying and installing Jenkins for customers using a framework of ours, where we are packaging Tomcat, Jenkins, plugins and other maintenance tools to have a full server up and running.
To be able to do this in a controlled manner for the customer, in for example an upgrade situation, we want to disable the setup wizard.
https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
jenkins.install.runSetupWizard: "Set to false to skip install and upgrade wizards."
We are setting the system property jenkins.install.runSetupWizard to false to skip both install and upgrade wizards.
JAVA_OPTS:
-Xms500m -Xmx500m -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=1024M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -XX:+UseG1GC -XX:MaxGCPauseMillis=400 -XX:GCPauseIntervalMillis=8000 -Djava.awt.headless=true -Dhudson.model.ParametersAction.keepUndefinedParameters=true -Djenkins.install.runSetupWizard=false -javaagent:./dist/ssl/sys-props-agent.jar=props:./dist/ssl/private/syspropsagent.properties -XX:HeapDumpPath=/<path-to-logs>/logs/
But still the setup wizard is appearing when upgrading like below.
Going from:
Tomcat 7.0.50, Jenkins 1.651.3
Going to:
Tomcat 8.5.5, Jenkins 2.19.1, -Djenkins.install.runSetupWizard=false
Upgrading in our terms means:
/usr/<old-installation-of-framework-incl-tomcat-7-and-jenkins-1.651.3>
/usr/<new-installation-of-framework-incl-tomcat-8-and-jenkins-2.19.1>
/usr/in_production/<link-to-active-installation>
/proj/jenkins_home/ [ JENKINS_HOME is kept separated from installation; plugins, jobs, customer data etc ]
Stop old Tomcat/Jenkins, install new Tomcat/Jenkins in parallel, change symlinks (old->new installation), start new Tomcat/Jenkins.
And yes, we understand we might be doing a (parallel) install in your terms, when we perform the above "upgrade".
1) We simply can't understand under which situations this system property is supposed to DISABLE the setup wizard? Is it not supposed to be working when running Jenkins in Tomcat? It IS described to "skip install and upgrade wizards".
As we somehow needed to get this to work we have done extensive googling and trying out several approaches where users seem to have struggling with this as well. One workaround tested was this:
https://github.com/geerlingguy/ansible-role-jenkins/issues/50
Where we ONLY are adding the mentioned file with the value of "2.0" (no newline)
Create the file JENKINS_HOME/jenkins.install.UpgradeWizard.state with one line, 2.0
( echo -n 2.0 > $JENKINS_HOME/jenkins.install.UpgradeWizard.state )
VOILA, no setup wizard appearing after login to upgraded Jenkins!
2) Is this a supported, recommended way of disabling the wizard? Are there any pitfalls going this way? Or are we simply working around a bug here?