I`m currently using Jenkins 2.516.2, Java 17 on Ubuntu 22.04 and want to update to 2.580.2 LTS, Java 21 and Ubuntu 24.04.
All the jobs are stored on a shared drive so which way is the easiest and cleanest option, upgrade existing jenkins controller or create new 24.04 machine with java 21 and latest jenkins version?
A separate Ubuntu 24.04 controller can make testing and rollback easier, but the shared drive is the key detail: is it the whole JENKINS_HOME, a jobs/ mount, or only build workspaces? Copying jobs alone omits controller configuration, plugin data, credentials and the secrets needed to decrypt them.
For the new-machine route, stop the old controller before taking a consistent copy of the full JENKINS_HOME, then test the target Jenkins/Java/plugin combination against a separate writable copy. Do not let both controllers write to the same shared home. Keep production triggers and agents isolated during validation so the test controller does not launch duplicate work.
Check the intervening LTS upgrade guides and plugin compatibility before the first upgraded start. Preserve the old controller and its original home for rollback; an upgraded home should not be assumed safe to reopen with the older Jenkins version. Switch the production mount/agents only after the copied controller and representative pipelines have been checked.
One practical detail for the new-machine route: if the shared mount is NFS/SMB, check that the Jenkins user on 24.04 has the same UID/GID and that file locking works; otherwise credentials, plugin config, or job files can fail even after a clean copy. Also run the test controller on a different port/context path and disable its agents and triggers, so it cannot collide with production. That makes the new-machine approach cleaner than upgrading in place.
Thanks for the reply. It is only the job folder that is shared but i have a staging server i can test the update with before working on the production server. This staging uses a different share so no issues if i screw it up.
have been thinking…Is it also easier to take a clone as its running on vmware, disconnect the shared job folder, rename the machine and then upgrade the system. I can then stop the old jenkins controller, rename the new machine and connect the shared job folder.
Yes, the VMware clone route is a good one, and it gives you a clean rollback — just take the clone while Jenkins is stopped, so JENKINS_HOME is in a consistent state.
Before you first boot the clone, disconnect it from the shared job folder and keep it off the network, or at least make sure the original controller is stopped. Two controllers writing to the same jobs folder at the same time is the thing to avoid.
Rename the clone and give it a different IP and Jenkins URL before you reconnect the shared folder, and check the Jenkins user still has the right ownership on the mount, as davidwright mentioned.
Then do the Java 21 and Jenkins upgrade on the clone first and run a few representative jobs there. If that works, stop the old controller for good and switch over to the upgraded clone; if it does not, you still have the original untouched.
I routinely upgrade Jenkins infra in AWS. Upgrading always means a new machine where controller war and plugin versions are pre-baked. The storage is an EBS volume and there is never more than one Jenkins instance per JENKINS_HOME.
If I were maintaining it outside of AWS I would follow a similar practice even if I was hosting multiple Jenkins on the same machine. I would upgrade a copy and keep at least one backup that could be restored.