How to upgrade Jenkins war in Client controllers using a Cluster Operation?

Article ID:115000072492
2 minute readKnowledge base

Issue

Is it possible to use a Cluster Operation to push a Jenkins war to different Client controllers?

Environment

  • CloudBees Jenkins Platform (Legacy) - Master

  • CloudBees Jenkins Platform (Legacy) - Operation Center

Resolution

With Cluster Operations, you can push Jenkins war versions from CJOC to a Client controller.

These wars, can be hosted in any valid Update Center accessible by your Client controllers.

Basically, from CJOC you can create a push operation by following this procedure:

  • Click New Item then Cluster Operations

  • Under Add Operation click controllers

  • Under Step, click Add Step then Upgrade Jenkins/…​

Extended documentation can be found here: OC Documentation - Cluster Operations section

  • Important Notice: If you have your Client controller deployed in a Tomcat Web server, this method will not work for you and you will receive an error message like the one shown below:

[ERROR] Jenkins upgrade not supported in this running mode

Examples

For these examples, we have configured a hosted Update Center (Custom Update Center), uploaded and promoted one Jenkins war. Please, be aware that any war version deployed on a Client controller should be compatible with the corresponding Operations Center version (as defined here). Additionally, be aware that, if the same or newer version is already running, the update will be skipped.

co_custom_uc01.png

In your custom Update Center, you have the opportunity to upload different core wars, and select a promoted version. That version will be the one selected to be sent as "upgrade war" to selected controllers.

co_custom_uc05.png

Update all Client controllers using a custom Update Center.

  • Step 1. Create new Cluster Operation.

  • Step 2. In the Source section, select the option Using a specified Update Center this will perform the cluster operation over all the controllers that have the selected Update Center set as their updates source.

co_custom_uc02.png
  • Step 3. In the Filters section, select the option Upgrade Jenkins Supported that will filter the previously selected set of controllers to be updated so that only those that can actually be upgraded appear as valid targets for the operation.

co_custom_uc03.png
  • Step 4. In the Steps section, select the option Upgrade Jenkins that will bring up a section where you can specify the minimum version that the war should have. If you leave it blank, the version used will be the one defined in the Client controller Update Center.

co_custom_uc04.png
  • Step 5. You build the job.

Update all Client controllers connected to Operations Center root

  • Step 1. Create new Cluster Operation.

  • Step 2. In the Source section, select the option From Operations Center Root this will perform the cluster operation over all the controllers that have the selected Update Center set as their updates source.

co_custom_uc02B.png
  • Step 3. In the Filters section, select the option Upgrade Jenkins Supported that will filter the previously selected set of controllers to be updated so that only those that can actually be upgraded appear as valid targets for the operation.

co_custom_uc03.png
  • Step 4. In the Steps section, select the option Upgrade Jenkins that will bring up a section where you can specify the minimum version that the war should have. If you leave it blank, the version used will be the one defined in the Client controller Update Center.

co_custom_uc04.png
  • Step 5. You build the job.