CloudBees Core on modern cloud platforms upgrade guide
This guide describes the upgrade process for CloudBees Core on Kubernetes installations.
|Helm is the preferred method of managing CloudBees Core. CloudBees provides a Helm Chart for CloudBees Core, and recommends migrating existing installations to use the Helm Chart. For instructions on how to migrate your non-Helm installation to Helm, see Migrating existing Kubernetes CloudBees Core installations to Helm.|
|You can only use Helm to upgrade your CloudBees Core instance if you’re already using Helm to manage the instance. If you need to migrate a CloudBees Core instance that wasn’t installed using Helm, we provide instructions in Migrating existing Core installations to Helm.|
One of the most useful features of Helm is a streamlined upgrade and update process for your CloudBees Core installation.
helm upgrade command allows you to upgrade your CloudBees Core release.
This can be new setting, such as an updated
OperationCenter.HostName value or a new version of CloudBees Core.
If you are using the NGINX installation option, you MUST set the
nginx-ingress.Enabled=true value or the NGINX Controller will be deleted. CloudBees strongly recommends you use a Custom Values file.
For more details around Helm Issue 2948, see Helm Issue 2948 on GitHub.
CloudBees recommends using a Custom Values File to upgrade CloudBees Core using Helm. For more information on custom values files, see GitOps and custom values files.
To upgrade your installation using a custom values file:
$ helm upgrade -f example-values.yaml --dry-run --debug (1) (2)
helm upgradecommand with the
-fargument to use the
examples-value.yamlfile. Replace the
examples-value.yamlfilename with the name of your values file.
--dry-run --debugruns a dry run of the installation without making changes.
The following example upgrade custom values file is based on examples in the cloudbees-examples GitHub repository.
# A helm example values file for standard Kubernetes install. # An nginx-ingress controller is not installed and ssl isn't installed. # Install an nginx-ingress controller nginx-ingress: Enabled: false <1> OperationsCenter: # Set the HostName for the Operation Center HostName: 'cloudbees-core.example.com' <2> Ingress: tls: ## Set this to true in order to enable TLS on the ingress record Enable: false <3> SecretName: core-example-com-tls Host: jenkins.cluster.local
If you want NGINX Ingress controller installed, change this value to
cloudbees-core.example.comwith your domain name.
If you want to enable TLS, set this value to
true. See Performing an install with HTTPS support.
The CloudBees Core YAML has changed, because it is now generated from the CloudBees Core Helm Chart. Both the format and the order of the file have changed. If you intend to use the YAML file as your basis for the upgrade (instead of Helm), you must manually update the field values in cloudbees-core.yml to match the values in your previous installation.
As a best practice, CloudBees recommends backing up your Operations Center and
JENKINS_HOMEprior to upgrading. For more information, see the Backup and Restore guide.
If you previously attempted to upgrade CloudBees Core and got an error message reading
To upgrade CloudBees Core:
Download the installer from the Downloads site.
In a local directory on your workstation, unpack the installer:
$ tar xvf name-of-installer.tgz
Modify the extracted cloudbees-core.yml to match the values of your previous installation. There are two options for this step:
Manually edit cloudbees-core.yml values to match the values from the previous installation (IMPORTANT: the YAML file format has changed).
cjocstatefulset (this does not remove the associated volume or data):
$ kubectl delete sts cjoc
Confirm that the CJOC statefulset has been deleted:
$ kubectl get sts cjoc Error from server (NotFound): statefulsets.apps "cjoc" not found (1)
This error confirms that the
cjocstatefulset has been deleted.
Run the installer:
$ kubectl apply -f cloudbees-core.yml
Check the status of the Operations Center roll-out:
$ kubectl rollout status sts cjoc
Once the new Operations Center version has been rolled out, log into Operations Center and upgrade your Managed Masters.
Online version published by CloudBees, Inc. under the Creative Commons Attribution-ShareAlike 4.0 license.
CloudBees and CloudBees DevOptics are registered trademarks and CloudBees Core, CloudBees Flow, CloudBees Flow Deploy, CloudBees Flow DevOps Insight, CloudBees Flow DevOps Foresight, CloudBees Flow Release, CloudBees Accelerator, CloudBees Accelerator ElectricInsight, CloudBees Accelerator Electric Make, CloudBees CodeShip, CloudBees Jenkins Enterprise, CloudBees Jenkins Platform, CloudBees Jenkins Operations Center, and DEV@cloud are trademarks of CloudBees, Inc.
Most CloudBees products are commonly referred to by their short names—Accelerator, Automation Platform, Flow, Deploy, Foresight, Release, Insight, and eMake—throughout various types of CloudBees product-specific documentation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. Read more at www.cloudbees.com/jenkins/about.
Apache, Apache Ant, Apache Maven, Ant and Maven are trademarks of The Apache Software Foundation. Used with permission. No endorsement by The Apache Software Foundation is implied by the use of these marks.
Other names may be trademarks of their respective owners. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this content, and CloudBees was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this content, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.