There are two primary use cases where you may need to move credentials between controllers:
-
Cloning a controller.
-
Moving jobs from a monolithic controller into a smaller team controller.
Managing credentials when cloning a controller
You may need to create a test controller from the backup of a production controller. If you do so, and the controllers are in the same cluster, you may receive errors, and should use the following instructions to resolve the problem:
-
Sign in to the origin controller and stop the controller.
-
Using administrative SSH or console access, sign in to the controller and remove the following files:
-
$JENKINS_HOME/license.xml
-
$JENKINS_HOME/operations-center-cloud*
-
$JENKINS_HOME/operations-center-client*
-
$JENKINS_HOME/com.cloudbees.opscenter.client.plugin.OperationsCenterRootAction.xml
-
-
Disable security:
-
Open
$JENKINS_HOME/config.xml
. -
Locate the line
<useSecurity>true</useSecurity>
and change the value to<useSecurity>false</useSecurity>
. -
Save
$JENKINS_HOME/config.xml
.
-
-
Start the Jenkins service.
-
Create a new client controller in the operations center and push the modified configuration in
$JENKINS_HOME/config.xml
to it.
Managing credentials when moving jobs between controllers
If you are moving a set of jobs from a monolithic controller to a team controller and you receive "duplicate instance" errors:
-
Stop Jenkins.
-
Change to the
$JENKINS_HOME
directory. -
Delete the
secret.key
file. -
Delete the
license.xml
file. -
Start Jenkins.
Navigate to https://$JENKINS_URL/license to view the instance ID associated with your license.
|
to display your instance ID. You can also go to