How to update a Managed controller with a Cluster Operation

Article ID:360030573532
2 minute readKnowledge base

Issue

  • I would like to update a Managed controller with a Cluster Operation

Resolution

Common Steps

The first part is common to the two updates. From the Operation Center, create a new Job of type Cluster Operations. In the Operations section, choose Managed controller then select the Managed controller you wish to apply the operation on.

CAUTION As with any update, you need to make a backup before triggering an update. You can do so by clicking on Add Step and then Backup controller in the Steps section.

Specific Steps

There are two kinds of updates available:

  • Jenkins updates: when the core of Jenkins is updated. For instance when you update from version 2.164.3.2 to 2.176.1.4.

  • Revisions: these are update of the envelope of plugins coming with Beekeeper. For instance, when you update from 2.164.3.2 revision 2 to 2.164.3.2 revision 3.

Given the above, there are two kind of operations depending on whether you wish to make a Jenkins update or make a revision update.

Jenkins Update

The steps are covered in the documentation.

Revision Update

In the case of a revision update, there is no docker image change. We can trigger the update nonetheless with some groovy code: In the Steps section, choose Add Step then Execute Groovy Script on controller. Then add the following script:

com.cloudbees.jenkins.plugins.assurance.CloudBeesAssurance.get().getUpgradeAction().getUpgrade().with { if (isIncrementalUpgrade()) { pick(false, null) } }

In order for the update to complete, you will also need to add a second step: in the Steps section, choose Add Step then Safe Restart.

Tested product/plugin versions