Disconnecting a client controller from operations center

3 minute read

The following instructions assume you have completed the steps for Installing the operations center and have a new operations center accessible.

Prerequisites

  • Make sure that the destination operations center is running the same or a more recent version of CloudBees CI.

  • If the client controller is using operations center SSO, the disconnection will cause the client controller to switch to the fallback Security Realm that should allow users to still be able to sign in. Review the Single sign-on fallback behavior guide to ensure that this is set up properly. Otherwise, the controller will not be accessible when disconnected, and in that case, security would need to be disabled temporarily to reconnect the controller. Refer to How do I login to Jenkins when I locked myself out? to restore access.

  • If the destination operations center is using https, make sure it is trusted by the client controller. Otherwise, add the required certificate(s) to the client controller’s truststore. Refer to How to install a new SSL certificate on Traditional Platforms? for more information.

Disconnect client controller from the UI

  1. Navigate to the client controllers Manage Jenkins  Configure System  operations center Connector page.

  2. Uncheck the Operations Center Connector  Enable checkbox and select Save.

  3. Back up the config.xml and nectar-rbac.xml of the client controller item (available in the directory $CJOC_HOME/jobs/<pathToClientcontrollerItem>/) on the operations center.

  4. Navigate to the operations center Client controller  Manage page and select Release.

  5. Navigate to the new operations center and create a new client controller item.

  6. Connect the client controller by either:

  7. If there was an RBAC configuration for the controller item, restore the RBAC configuration on the new operations center from the backed up nectar-rbac.xml by restoring that file into the new operations center filesystem at $CJOC_HOME/jobs/<pathToClientcontrollerItem>/nectar-rbac.xml, then restart the operations center (or use Manage Jenkins  Reload Configuration from Disk). For more information on how to restore the RBAC configuration, refer to How to save RBAC configuration when a client controller needs to be renamed?.

If client controller is not accessible from the UI

If you do not have access to the UI or cannot sign in to the client controller after disconnecting it, do the following:

  1. On the current operations center, backup the config.xml and nectar-rbac.xml of the client controller item (available in the directory $CJOC_HOME/jobs/<pathToClientcontrollerItem>/).

  2. Navigate to the Client controller  Manage page and refer to Disconnect and Release the client controller.

  3. On the controller, stop the client controller.

  4. In the client controller file system, delete the following:

    • $JENKINS_HOME/license.xml

    • $JENKINS_HOME/operations-center-cloud*

    • $JENKINS_HOME/operations-center-client*

    • $JENKINS_HOME/com.cloudbees.opscenter.client.plugin.OperationsCenterRootAction.xml

  5. Disable security in the client controller by editing $JENKINS_HOME/config.xml.

    1. Locate this line: <useSecurity>true</useSecurity>

    2. Change it to: <useSecurity>false</useSecurity>

      This method is risky if your instance is accessible to others because it allows unrestricted access to all information, including secret credentials and all jobs. This method should only be used when you isolate network access to the instance during the timeframe when security is disabled.
      If using Configuration as Code for controllers, Configuration as Code needs to be disabled temporarily. Remove the -Dcore.casc.config.bundle=…​ argument.
  6. Start the client controller.

  7. On the new operations center, create a new client controller item.

  8. Connect the client controller by either:

  9. If there was an RBAC configuration for the controller item, restore the RBAC configuration on the new operations center from the backed up nectar-rbac.xml by restoring that file into the new operations center filesystem at $CJOC_HOME/jobs/<pathToClientcontrollerItem>/nectar-rbac.xml, then restart the operations center

For more information on how to restore the RBAC configuration, refer to How to save RBAC configuration when a client controller needs to be renamed?.

For additional information, refer to the following: