Issue Summary

Article ID:360044970731
3 minute readKnowledge base

On June 22nd, 2020, the certificate used to sign all existing CloudBees licenses for Jenkins-based products expires. This certificate is used to verify the authenticity of the customer’s CloudBees license.

Customers must install a new license (generated with the new certificate) before June 22, 2020. Existing licenses will become invalid as of June 22, 2020.

If you did not update your licenses prior to June 23rd, 2020, the following licensing screen will appear:

image::common-kb::licenses/license-screen.png[]

Figure 1. CloudBees Jenkins-based Product Licensing Screen

Prerequisites

The steps in this article assume that you have access to an environment that has the Kubernetes command line tools (kubectl) installed, and that you have sufficient access to perform administrative actions on the pods in your cluster.

Before you begin applying the update, it is important to determine the currently installed version of the cloudbees-license plugin for each Jenkins instance. You will need to know the version numbers so that you can download/apply the correct update for each instance. If the versions of your Jenkins instances are not heterogeneous across your environment, care must be taken to ensure that the correct plugin version is installed on each instance.

Regardless of the deployment platform, the following steps must be performed on all CloudBees Jenkins instances. This includes Operation Center, connected controllers, and standalone controllers.

Update the cloudbees-license plugin

Choose one of the methods below to update the cloudbees-license plugin:

Methods

Details

Using a bash script

The simplest way to update CloudBees Jenkins instances deployed on modern platforms is via a bash script provided by CloudBees. This script automates the process of determining which version of the plugin needs to be installed, backing up the current plugin, and installing the update across all the active pods in your cluster.

Manually

The manual steps are primarily provided as a reference for those who want to understand what the scripted approach is doing.

To update each instance using a bash script:

  1. Download core-modern-unbreak.sh from https://raw.githubusercontent.com/cloudbees/jenkins-scripts/master/license-upgrade/core-modern-unbreak.sh.

  2. Ensure that you are operating under the correct namespace for the cluster you would like to update.

  3. Run core-modern-unbreak.sh

$ ./core-modern-unbreak.sh Executing core-modern-unbreak.sh version 1591273737 Using PLUGIN_ROOT defined as /var/jenkins_home/plugins Checking to see if required tools are present Verifying command [awk] is installed... Confirmed command [awk] present. Verifying command [grep] is installed... Confirmed command [grep] present. Verifying command [tr] is installed... Confirmed command [tr] present. Verifying command [kubectl] is installed... Confirmed command [kubectl] present. Checking for wget or curl.... Verifying command [wget] is installed... Confirmed command [wget] present. Checking all pods... ----------------- Checking pod cjoc-0 Current plugin version is [9.42] Currently installed plugin version 9.42 already supports the new license. No upgrade necessary ----------------- Checking pod controller1-0 Current plugin version is [9.33] Using JENKINS_USER defined as jenkins Using JENKINS_GROUP defined as jenkins Backing up the currently installed license plugin Downloading updated plugin from https://jenkins-updates.cloudbees.com/download/plugins/cloudbees-license/9.33.1/cloudbees-license.hpi

Once all of your instances have been updated you can contact support by going to https://support.cloudbees.com/ and opening a ticket or contact CloudBees Customer Success (csm-help@cloudbees.com) for an updated license.

To update each instance manually:

NOTE: The steps below must be performed on the pod running CloudBees Core Operations Center as well as any Client and Managed controllers.

Determine your currently installed plugin version

  1. Get a list of running pods.

    kubectl get pods --selector='com.cloudbees.cje.tenant' --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE cloudbees-core cjoc-0 1/1 Running 0 24m cloudbees-core controller1-0 1/1 Running 0 16m cloudbees-core controller2-0 1/1 Running 0 7d23h
  2. Determine the current version of the cloudbees-license plugin.

$ kubectl exec cjoc-0 -it -- cat /tmp/jenkins/plugins/cloudbees-license/META-INF/MANIFEST.MF | grep Plugin-Version Plugin-Version: 9.33

In this example, you can see that the currently installed plugin version is 9.33. Based on this, you will then look up the version of the plugin you need to upgrade to in this article: Upgrading for the new CloudBees License Certificate. For the example above, you would need to update to version 9.33.1

Manually upgrade the cloudbees-license plugin

  1. Back up the currently installed version of the cloudbees-license plugin.

    kubectl exec cjoc-0 -it -- mv /var/jenkins_home/plugins/cloudbees-license.jpi /var/jenkins_home/plugins/cloudbees-license.bak
  2. Download the updated version of the cloudbees-license plugin to your local system.

    wget <https://jenkins-updates.cloudbees.com/download/plugins/cloudbees-license/9.33.1/cloudbees-license.hpi>
  3. Copy the updated plugin to the CloudBees Jenkins instance you are updating.

    kubectl cp /home/users/downloads/cloudbees-license.hpi cjoc-0:/var/jenkins_home/plugins/cloudbees-license.jpi
  4. Restart Jenkins.

    kubectl delete pod cjoc-0

Once all of your instances have been updated you can contact support by going to https://support.cloudbees.com/ and opening a ticket or contact CloudBees Customer Success (csm-help@cloudbees.com) for an updated license.