Installing CloudBees Jenkins Team

This section will cover installing and upgrading instances running CloudBees Jenkins Team.

CloudBees Jenkins Team can run as a stand-alone Java process, inside of a Java servlet container engine such as Jetty, or even as a Docker container. Regardless of the configuration, please ensure the machine running CloudBees Jenkins Team has met the system requirements before continuing on to Installation from scratch

In order to upgrade an existing Jenkins® instance to CloudBees Jenkins Team, please refer to the Upgrade from Jenkins guide.

Installation from scratch

Linux

CloudBees distributes a number of "native packages" for CloudBees Jenkins Team on Linux. These native packages automatically install system dependencies, such as a Java runtime environment, set up init.d scripts for running the CloudBees Jenkins Team service, and configure the /var/log/cjt logging directory.

For each supported Linux distribution, a repository and key must be imported before CloudBees Jenkins Team can be installed on the desired Linux machine using this repository.

Red Hat / CentOS

Adminstrators running Red Hat-based distributions, such as Red Hat Enterprise Linux, Fedora, Oracle Linux, and CentOS, must first add an rpm repository using the following commands:

wget -O /etc/yum.repos.d/cjt.repo https://downloads.cloudbees.com/cjt/rolling/rpm/cjt.repo
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x38E2F5F39FF90BDA"

If the CloudBees key has already been imported on the machine, the rpm --import command will fail. This error can be safely ignored. Once the repository and key have been set up, CloudBees Jenkins Team can be installed with yum via:

yum install cjt

After the installation has completed, CloudBees Jenkins Team will start automatically and be available on port 8080 by default, and the Post-Install process can be started.

Upgrading

Upgrading CloudBees Jenkins Team on Red Hat-based distributions can be accomplished with:

yum upgrade cjt

Debian / Ubuntu

Administrators running Debian-based distributions such as Debian or Ubuntu will need to add an Apt repository and key in order to install CloudBees Jenkins Team:

In order to add the repository source to /etc/apt/sources.list.d/ execute:

echo "deb https://downloads.cloudbees.com/cjt/rolling/debian binary/" > /etc/apt/sources.list.d/cloudbees.list

Then the CloudBees GPG key must be added to Apt with:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 38E2F5F39FF90BDA

With the key and repository source properly configured, CloudBees Jenkins Team can be installed using:

apt-get update && apt-get install cjt

Once the installation has completed, CloudBees Jenkins Team will start automatically and be available on port 8080 by default, and the Post-Install process can be started.

Caution

Older versions of Debian and Ubuntu do not provide a Java 8 package and CloudBees Jenkins Team may fail to install as a result. Using newer versions of these distributions which provide Java 8 is strongly recommended.

Upgrading

Upgrading CloudBees Jenkins Team on Debian-based distributions can be accomplished with:

apt-get update && apt-get install cjt

openSUSE / SUSE Linux

In order to install CloudBees Jenkins Team on openSUSE-based distributions, the zypper command should be used to add the CloudBees rpm repository:

zypper addrepo -f https://downloads.cloudbees.com/cjt/rolling/opensuse/ cjt

With the repository added to the system, CloudBees Jenkins Team can be installed with:

zypper install cjt

Once the installation has completed, CloudBees Jenkins Team will start automatically and be available on port 8080 by default, and the Post-Install process can be started.

Upgrading

Upgrading CloudBees Jenkins Team on openSUSE can be accomplished with:

zypper install cjt

Windows

In order to run CloudBees Jenkins Team on a Windows server, a Windows Installer is available from the CloudBees Jenkins Team download site.

Download the cjt.zip file, and the SHA256 checksum file.

The checksum file can be used to verify that the cjt.zip is correct. Compare the contents of cjt.zip.sha256 with the output of the following PowerShell command:

$(CertUtil -hashfile D:\Users\USER\Downloads\cjt.zip SHA256)[1] -replace " ",""

Assuming the cjt.zip file is correct, unpack it and execute the CloudBees Jenkins Team installer.

Note

The CloudBees Jenkins Team Windows Installer\requires a 64-bit operating system and a compatible .NET framework (2.0, 3.5.1, 4.0) in order to be installed as a service. Most Windows versions install a compatible framework by default.

After the installation has completed, CloudBees Jenkins Team will start automatically and be available on port 8080 by default, and the Post-Install process can be started.

Upgrading

In order to upgrade CloudBees Jenkins Team on Windows servers, a new cjt.zip must be downloaded and installed.

Stand-alone .war

CloudBees Jenkins Team can run as a stand-alone .war executable on either Linux or Windows, assuming the machine meets the System Requirements. This is not recommended for most users because there is no built-in upgrade facility when running .war files on their own.

Download cjt.war and the checksum file cjt.war.sha256.

For Linux users, verify the integrity of cjt.war with:

sha256sum cjt.war

Windows users can verify the integrity of cjt.war by comparing cjt.war.sha256 with the output of the following Powershell command:

$(CertUtil -hashfile D:\Users\USER\Downloads\cjt.warSHA256)[1] -replace " ",""

Starting CloudBees Jenkins Team can then by done by executing:

java -jar cjt.war

Once CloudBees Jenkins Team has started properly, it will be available on port 8080 by default and the Post-Install process can be started.

Upgrading

In order to upgrade CloudBees Jenkins Team when running it as a stand-alone .war file, you must download and run a new cjt.war.

Servlet Container

In order to deploy CloudBees Jenkins Team in an existing Java Servlet Container, such as Jetty, follow the Stand-alone .war instructions for downloading and verifying cjt.war. Similar to the stand-alone process, there is no automatic upgrade facility for CloudBees Jenkins Team compared to native packages.

Caution

While CloudBees Jenkins Team can be deployed into a Java Servlet Container, this is not recommended if other options are available.

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

When using servlet containers, CloudBees Jenkins Team 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.

Apache Tomcat

When deploying CloudBees Jenkins Team on Apache Tomcat, the system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH should be set to true so encoded slashes are allowed.

Post-Install

CloudBees Jenkins Team is initially configured to be secure on first launch. During the first boot, a security token is generated and printed in the console log. This token must be used to unlock the instance:

Getting Started Token Prompt
/var/log/cjt/cjt.log
*************************************************************

CloudBees Jenkins Team initial setup is required. A security token is required to proceed.
Please use the following security token to proceed to installation:

41d2b60b0e4cb5bf2025d33b21cb

*************************************************************

The install instructions for each of the platforms above include the default location where an administrator can find this log output. The token information must be entered by the administrator into the "Setup Wizard" the first time CloudBees Jenkins Team is launched.

After the instance has been unlocked, you must select a trial or paid license for it.

Activating the CloudBees Jenkins Team license

The "Setup Wizard" will install the initial plugins for CloudBees Jenkins Team. The suggested plugins are curated based on the most common use cases, but there is no comprehensive list of plugins available for CloudBees Jenkins Team. After installation is complete, administrators may add additional plugins, see the Managing Plugins section for more details.

Suggested plugins for new CloudBees Jenkins Team instances

After installing some initial plugins, adminstrators are prompted to create a "First Admin user". While this step can be skipped, skipping it is not recommended. The generated access token serves as the default password for the user 'admin' if the user creation step is skipped.

Create a First Admin User in CloudBees Jenkins Team

At the completion of the Setup Wizard, the CloudBees Jenkins Team instance is ready for work! Continue on to the Managing Plugins section for more information about Beekeeper Upgrade Assistant, CloudBees Assurance Program, and other features for CloudBees Jenkins Team.