Migrating CloudBees Jenkins Platform to CloudBees CI

3 minute read

This guide explains how to migrate your CloudBees Jenkins Platform client controller and operations center instance to CloudBees CI on traditional platforms. Read Preparing CloudBees Jenkins Platform for migration to CloudBees CI before attempting the migration steps.

End-of-life announcement

The CloudBees Jenkins Platform (CJP) product which has been available since November 16, 2016, is reaching the end of its product lifecycle. CloudBees will declare this product end-of-life (EOL) on June 30, 2023.

Please note that once EOL is reached, CloudBees will no longer provide commercial support for this product. Please contact CloudBees Support if you have any concerns or questions.

Video walk-through of this guide

Before beginning the migration process, you can watch this overview of the migration process.

Migrating CloudBees Jenkins Platform to CloudBees CI

Preparing CloudBees Jenkins Platform for migration to CloudBees CI

Before migrating your CloudBees Jenkins Platform client controller or operations center instance, complete the following steps:

  1. Open an Assisted Update ticket with CloudBees Support to get a custom upgrade plan for your environment.

  2. Verify that your CloudBees Jenkins Platform operations center and controllers are on the latest release and your plugins are updated.

  3. Back up your $JENKINS_HOME directory from your CloudBees Jenkins Platform client controller or operations center instance.

If the BUILD_DIRECTORY is outside the $JENKINS_HOME directory, then save a copy of this directory as well.

Migrating a client controller instance from CloudBees Jenkins Platform to CloudBees CI

Follow these steps to migrate a client controller instance from CloudBees Jenkins Platform to CloudBees CI.

  1. Stop your CloudBees Jenkins Platform client controller instance.

    sudo service jenkins stop
  2. Install the client controller for CloudBees CI on traditional platforms.

  3. Create a copy of the jenkins directory (from your old CloudBees Jenkins Platform client controller installation) for CloudBees CI (named cloudbees-core-cm) and change the ownership of this new directory to the new cloudbees-core-cm user:

    cd /var/lib/
    sudo cp -rf jenkins/* cloudbees-core-cm/
    cd cloudbees-core-cm/
    sudo chown -R cloudbees-core-cm:cloudbees-core-cm .
  4. Migrate service options such as JENKINS_JAVA_OPTIONS, JENKINS_USER, and JENKINS_HOME from /etc/sysconfig/jenkins to /etc/sysconfig/cloudbees-core-cm (or /etc/default/jenkins to /etc/default/cloudbees-core-cm), per How to add Java arguments to Jenkins?.

  5. Start your new CloudBees CI client controller instance.

    sudo service cloudbees-core-cm start
  6. Uninstall the CloudBees Jenkins Platform client controller:

    • On Ubuntu or Debian.

      sudo apt-get purge jenkins
    • On Red Hat, CentOS, Fedora or Amazon Linux 2.

      sudo yum remove jenkins
    • On OpenSUSE.

      sudo zypper remove jenkins
  7. (Optional) If the migration of your client controller instance to CloudBees CI ran successfully, you can remove the old CloudBees Jenkins Platform client controller directory:

    rm -rf /var/lib/jenkins

Migrating an operations center instance from CloudBees Jenkins Platform to CloudBees CI

Follow these steps to migrate an operations center instance from CloudBees Jenkins Platform to CloudBees CI:

  1. Stop your CloudBees Jenkins Platform operations center instance.

    sudo service jenkins-oc stop
  2. Install the operations center for CloudBees CI on traditional platforms.

  3. Create a copy of the jenkins-oc directory (from your old CloudBees Jenkins Platform operations center installation) for CloudBees CI (named cloudbees-core-oc) and change the ownership of this new directory to the new cloudbees-core-oc user:

    cd /var/lib/
    sudo cp -rf jenkins-oc/* cloudbees-core-oc/
    cd cloudbees-core-oc/
    sudo chown -R cloudbees-core-oc:cloudbees-core-oc .
  4. Migrate service options such as JENKINS_JAVA_OPTIONS, JENKINS_USER, and JENKINS_HOME from /etc/sysconfig/jenkins to /etc/sysconfig/cloudbees-core-cm (or /etc/default/jenkins to /etc/default/cloudbees-core-cm), per How to add Java arguments to Jenkins?.

  5. Start your new CloudBees CI operations center instance.

    sudo service cloudbees-core-oc start
  6. Uninstall the CloudBees Jenkins Platform operations center:

    • On Ubuntu or Debian.

      sudo apt-get purge jenkins-oc
    • On Red Hat, CentOS, Fedora or Amazon Linux 2.

      sudo yum remove jenkins-oc
    • On OpenSUSE.

      sudo zypper remove jenkins-oc
  7. ( Optional ) If the migration of your operations center instance to CloudBees CI ran successfully, you can remove the old CloudBees Jenkins Platform operations center directory:

    rm -rf /var/lib/jenkins-oc