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.
Video walk-through of this guide
Before beginning the migration process, you can watch this overview of the migration process.
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:
-
Open an Assisted Update ticket with CloudBees Support to get a custom upgrade plan for your environment.
-
Verify that your CloudBees Jenkins Platform operations center and controllers are on the latest release and your plugins are updated.
-
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.
-
Stop your CloudBees Jenkins Platform client controller instance.
sudo service jenkins stop
-
Install the client controller for CloudBees CI on traditional platforms.
-
Create a copy of the
jenkins
directory (from your old CloudBees Jenkins Platform client controller installation) for CloudBees CI (namedcloudbees-core-cm
) and change the ownership of this new directory to the newcloudbees-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 .
-
Migrate service options such as
JENKINS_JAVA_OPTIONS
,JENKINS_USER
, andJENKINS_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?. -
Start your new CloudBees CI client controller instance.
sudo service cloudbees-core-cm start
-
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
-
-
(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:
-
Stop your CloudBees Jenkins Platform operations center instance.
sudo service jenkins-oc stop
-
Install the operations center for CloudBees CI on traditional platforms.
-
Create a copy of the
jenkins-oc
directory (from your old CloudBees Jenkins Platform operations center installation) for CloudBees CI (namedcloudbees-core-oc
) and change the ownership of this new directory to the newcloudbees-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 .
-
Migrate service options such as
JENKINS_JAVA_OPTIONS
,JENKINS_USER
, andJENKINS_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?. -
Start your new CloudBees CI operations center instance.
sudo service cloudbees-core-oc start
-
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
-
-
( 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