Installing CloudBees Analytics to existing CloudBees CD/RO and CloudBees CI on traditional platforms environments

4 minute readDeveloper productivityData analytics

Existing installations of CloudBees CI on traditional platforms and CloudBees CD/RO can take advantage of the analytics capabilities of CloudBees Analytics.

The installation of CloudBees Analytics to your existing CloudBees CD/RO and CloudBees CI environments is a process involving the following sequential steps:

Pre-installation requirements

  • Contact CloudBees Support to obtain the executable files for the CloudBees Software Delivery Automation and CloudBees Analytics installers.

Upgrading CloudBees CI on traditional platforms

Before upgrading

Take a SNAPSHOT of your CloudBees CI platform. For the Operations Center and every controller:

  • Generate a support bundle. It will help in case there are problems with the upgrade or to know what plugins were upgraded in the process.

  • Backup your instance before starting the upgrade. The minimal backup is a copy of your ${JENKINS_HOME} directory. If the BUILD_DIRECTORY is out of the ${JENKINS_HOME}, you must back it up as well.

Note: In the case something unexpected happens, the rollback process in based on the Backup of your instance.

For client controllers connected to Operations Center:
  • Operations Center must be upgraded first, then client controllers.

  • The client controller connected to the Operations Center does not have to be at the same version.

The version of Operations Center must always be more recent or as old as the version of the client controllers that are connected to the Operations Center (Operations Center >= client controller version).

Recommendations

Setup a test environment

This is ideally a full test environment with the Operations Center and client controllers and requires a test license. If this is not feasible, just having a test controller with representative jobs will work.

Enable CloudBees Assurance Program

Ensure that CloudBees Assurance Program is enabled to avoid plugin dependency issues or incorrect versions installed.

Upgrade to latest version

CloudBees recommends that you always upgrade to the latest version of your CloudBees product, ensuring a wider lifecycle support coverage plus more security patches added (CloudBees Security Advisory), more fixed issues, and more new features included.

Upgrade plugins

CloudBees recommends that you upgrade your plugins before upgrading a Jenkins instance. For instructions on upgrading plugins, see Upgrading plugins from the Plugin Manager. Run tests after upgrading the plugins to ensure that the upgrades are functioning as expected.

Upgrade instance where it is running

CloudBees highly recommends that you upgrade Jenkins to the same location where it is running even if it is in the production environment. Doing a backup of $JENKINS_HOME and the $BUILD_DIR - in case it is outside the default location - should be enough to revert to the previous status.

CloudBees does not recommend that you keep two different instances working at the same time. This is to avoid downtime while performing the upgrade unless you really know what you are doing - it will be very difficult to replicate the exactly same environment.

  • JNLP agent will not work correctly as the $JENKINS_URL location will be different.

  • Credentials might fail in case the secret is not the same on both instances.

  • The OS might not be configured in the same way. i.e ulimit.

  • The CloudBees CI configuration might not be correctly replicated.

Stop using Apache Maven builds (if possible)

The Maven plugin plugin is not recommended as it is considered unreliable by the Community. Therefore, it is recommended that you migrate jobs using this plugin to Pipeline Jobs with the Maven integration.

If (and only if) you are able to migrate your Maven plugin builds, please carefully read the Maven jobs and Java versions compatibility guide.

Upgrade process

Visit CloudBees downloads

Go to the downloads page. Select your desired distribution type, and review the instructions.

  • WAR

  • RPM

  • OpenSuse

  • Debian

  • Microsoft Windows

  • Docker

Installation procedures

WAR

If your CloudBees CI instance is run with the command java -jar cloudbees-core-cm.war or java -jar cloudbees-core-oc.war, you can simply replace the jenkins.war file with the latest version.

Linux
Red Hat / CentOS
  • Controller - yum upgrade cloudbees-core-cm

  • Operations Center - yum upgrade cloudbees-core-oc

RPM/YUM with High Availability

The RPM package contains a post-install script to ensure ownership on several files including JENKINS_HOME. Therefore if High Availability is setup, this could lead to I/O Errors - for example when upgrading one node while another one is still running. More information is available in JENKINS-23273.

To workaround this problem, you can skip this script by adding the property JENKINS_INSTALL_SKIP_CHOWN="true" under /etc/sysconfig/jenkins.

Debian / Ubuntu
  • Controller - apt-get update && apt-get install cloudbees-core-cm

  • Operations Center - apt-get update && apt-get install cloudbees-core-oc

openSUSE / SUSE Linux
  • Controller - zypper install cloudbees-core-cm

  • Operations Center - zypper install cloudbees-core-oc

Servlet container

Once a .war archive has been downloaded, follow the servlet container’s existing application deployment process.

When using servlet containers, CloudBees CI will set the JENKINS_HOME to the $APP_SERVER_USER/.jenkins/ folder. If the servlet container installation does not include write permissions to this folder for this user (sometimes done for security), you either need to grant appropriate permissions or override this setting by adding the "-DJENKINS_HOME=$MY_JENKINSPATH" argument in your servlet container startup. Refer to the servlet container’s documentation for how to add startup arguments.

Tomcat

Use environment variable CATALINA_OPTS to add:

  • -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true.

  • -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true which is needed for Blue Ocean.

CloudBees recommends that you configure it in the script $CATALINA_BASE/bin/setenv.sh (Linux) or %CATALINA_BASE%\bin\setenv.bat (Microsoft Windows) that you’ll create to customize your application server.

Custom container installations

If you use a custom container, you will find the cloudbees-core-cm.war or cloudbees-core-oc.war file in the deploy directory of your container. For example, /usr/local/jboss/server/default/deploy/cloudbees-core-cm.war would be the location for a default JBoss installation.

Microsoft Windows

To upgrade on Microsoft Windows servers, a new .zip must be downloaded from the downloads page and installed.

Post-upgrade notes

In case, JNLP agents (specifically for Microsoft Windows) are not able to connect, review the article Windows agent offline or unable to connect.

Review articles in our Best Practices and apply changes accordingly.

Upgrading CloudBees CD/RO

The next step is to upgrade your existing CloudBees CD/RO environment. This step upgrades the full complement of CloudBees CD/RO components in a production environment.

  1. Review Roadmap for upgrading CloudBees CD/RO.

  2. Start the upgrade by following steps for using the UI upgrade method.

    When presented with the list of components to install, clear the Database checkbox to use an external database in your production environment.

Installing CloudBees Analytics

Now, install CloudBees Analytics. This step installs the CloudBees Analytics server, LogStash, and ElasticSearch components to enable data flow from your CloudBees CI environment.

After the installation is complete, you must set up the analytics server. See Configuring the CloudBees Software Delivery Automation analytics server.