How do I connect a Client Master to a different Operations Center?

Issue

  • We had a Client Master connected to an Operations Center and we wish to connect it to another Operations Center

Environment

Resolution

Pre-Requisite

  • Make sure that the destination Operations Center is running the same or a more recent version of CloudBees CI.
  • If the Client Master is using Operations Center SSO, the disconnection will cause the Client Master to switch to the fallback Security Realm that should allow users to still be able to login. Please review Single sign-on fallback behavior to ensure that this s set up properly. Otherwise, the master will not be accessible when disconnected and in that case security would need to be disabled temporarily (see How do I login to Jenkins when I locked myself out?) to reconnect the master.
  • If the destination Operations Center is using https, make sure it is trusted by the Client Master. Otherwise, add the required certificate(s) to the Client Master’s truststore, see How to install a new SSL certificate on Traditional Platforms?

From the UI

This is the recommended approach:

  1. [Master] Go to Manage Jenkins > Configure System > Operations Center Connector
  2. [Master] Uncheck the Operations Center Connector > Enable checkbox and Save
  3. [CJOC source] Backup the config.xml of the Client Master item (available at $CJOC_URL/jobs/<pathToClientMasterItem>/config.xml)
  4. [CJOC source] Go to the Client Master > Manage page and hit Release
  5. [CJOC destination] Create a new Client Master item
  6. [CJOC destination] Connect the Client Master (by either pushing connection details OR copy / pasting the connection details as documented in Setting up your new Client Master)
  7. [CJOC destination] If there was an RBAC configuration for the Master item, restore the RBAC configuration from the backed up config.xml as explained in step 10. of How to save RBAC configuration when a Client Master needs to be renamed?

If Client Master is not accessible from the UI

In case you do not have access to the UI or if you cannot log in to the Client Master after disconnecting it, follow this approach:

  1. [CJOC source] Backup the config.xml of the Client Master item (available at $CJOC_URL/jobs/<pathToClientMasterItem>/config.xml)
  2. [CJOC source] Go to the Client Master > Manage page and Disconnect and Release the Client Master
  3. [Master] Stop the Client Master
  4. [Master] In the Client Master file system, delete:
    • $JENKINS_HOME/license.xml
    • $JENKINS_HOME/operations-center-cloud*
    • $JENKINS_HOME/operations-center-client*
    • $JENKINS_HOME/com.cloudbees.opscenter.client.plugin.OperationsCenterRootAction.xml
  5. [Master] Disable security in the Client Master by editing $JENKINS_HOME/config.xml. Locate this line: <useSecurity>true</useSecurity> and changing it to <useSecurity>false</useSecurity>
  6. [Master] Start the Client Master
  7. [CJOC destination] Create a new Client Master item
  8. [CJOC destination] Connect the Client Master (by either pushing connection details OR copy / pasting the connection details as documented in Setting up your new Client Master)
  9. [CJOC destination] If there was an RBAC configuration for the Master item, restore the RBAC configuration from the backed up config.xml as explained in step 10. of How to save RBAC configuration when a Client Master needs to be renamed?

References

Have more questions?

0 Comments

Please sign in to leave a comment.