Migrating from CloudBees Jenkins Distribution to Jenkins LTS

Follow these steps to migrate from CloudBees Jenkins Distribution to Jenkins LTS.

This document explains how to migrate from a CloudBees Jenkins Distribution WAR file installation to a Jenkins installation. If you are using another type of distributable, such as RPM, Suse, or Docker, the logic is the same.

CloudBees Jenkins Distribution includes some specific libraries or plugins that prevent a Jenkins controller from starting correctly. These files need to be removed from the JENKINS_HOME so a Jenkins WAR file can be run instead.

To migrate from CloudBees Jenkins Distribution to Jenkins LTS:

  1. Download an LTS version of Jenkins that is based on the same version as the CloudBees Jenkins Distribution version you are using. For example, if you are using CloudBees Jenkins Distribution 2.249.2.3, download Jenkins LTS 2.249.2.

  2. Open your browser at https://<yourControllerUrl>/script and run the following script:

    Jenkins.get().getUpdateCenter().getSites().clear()
    UpdateSite site = new UpdateSite("default", "https://updates.jenkins.io/update-center.json")
    Jenkins.get().getUpdateCenter().getSites().add(site)
  3. Stop your CloudBees Jenkins Distribution controller.

  4. From the ${JENKINS_HOME} directory for this CloudBees Jenkins Distribution, run the following shell code to remove specific files and directories:

    # If JENKINS_HOME is undefined, `cd` into the home directory of CloudBees Jenkins Distribution, and run
    # export JENKINS_HOME=$( pwd )
    CB_REMOVE_DIR=/tmp/cloudbees-jenkins-distribution-removed
    mkdir $CB_REMOVE_DIR
    cd $JENKINS_HOME
    mv updates $CB_REMOVE_DIR
    cd plugins
    mv cloudbees-analytics* \
       cloudbees-assurance* \
       cloudbees-administrative-monitors* \
       cloudbees-license* \
       cloudbees-uc-data-api* \
       cloudbees-support* \
       nectar-license* \
       $CB_REMOVE_DIR
  5. Start the downloaded Jenkins WAR using the same method you used before for CloudBees Jenkins Distribution.