How to configure Update Center Upstream Sources?

Article ID:224186907
2 minute readKnowledge base

Issue

  • How to configure the upstream source of my custom update center(s)?

  • I have several version of Jenkins in my CJP cluster, how to manage my update centers?

Environment

  • CloudBees Jenkins Operations Center

  • Operations Center Update Center Plugin

  • CloudBees Update Center Plugin

Resolution

The CloudBees Update Center Plugin provides the ability to host and manage your own Update Center(s). In order to best manage your update center, you need to ensure that you track the correct upstream source:

Upstream sources

Version Configuration

In the Upstream Source configuration, you can specify the Jenkins version to track.

  • If you leave the version blank then the version of the Jenkins instance that is hosting Custom Update Center is used by default.

  • If you leave the version with a two segment version number, e.g. 1.642, then the core updates will be the OSS HEAD line

  • If you leave the version with a three segment version number, e.g. 1.642.1, then the core updates will be the OSS LTS line and plugin updates will be restricted to those declaring a core dependency that is not greater than the current OSS LTS line.

  • If you leave the version with a four segment version number, e.g. 1.642.1.1, then the core version will be the CJE version and plugin updates will be restricted to those declaring a core dependency that is not greater than this CJE version.

Note: If you are running CJE, in most cases you want to define a specific version

Multiple controllers / Different Versions

In the case where you have a CJP cluster with Client controllers running different version, what you want to have is an update center for each CJE version line that you have client controllers in. The version you specify should be the lowest version in that line.

So if you have any CJE 15.11 client controllers, that is the 1.625.. line, so their update center should be pulling with the version specified as 1.625.1.1 even though the CJE controllers are running a mix of say 1.625.2.2 or 1.625.3.1.

How it Works

When Jenkins requests the update center data from the update center, the request is made with a query parameter added to the update center URL. That query parameter will be ?version=... where the ... is the version of Jenkins.

The CloudBees Update Center Plugin uses this to route each Jenkins version line to the correct update center data. You can see this using CURL:

$ curl -I -L https://jenkins-updates.cloudbees.com/update-center.json?version=1.609.1.1 HTTP/1.1 302 Found Content-Length: 0 Date: Tue, 12 Jul 2016 08:37:49 GMT Last-Modified: Mon, 11 Jul 2016 21:00:11 GMT Location: /updateCenter/fgr6EFfA/update-center.json Server: Apache-Coyote/1.1 Connection: keep-alive HTTP/1.1 200 OK Content-Length: 912824 Content-Type: application/javascript;charset=UTF-8 Date: Tue, 12 Jul 2016 08:37:49 GMT Last-Modified: Mon, 11 Jul 2016 21:00:11 GMT Server: Apache-Coyote/1.1 Connection: keep-alive

This allows us to filter the plugins that a specific Jenkins line will see such that only the versions that are compatible with that line are available.