Getting Started with CloudBees DevOptics

CloudBees DevOptics provides a comprehensive view of the status of software delivery, correlated from data collected across software delivery pipelines. It presents end-to-end software delivery value streams and allows users to identify failures, bottlenecks, and critical dependencies. It uses events directly from the development systems to identify causes of blockages and delays. CloudBees DevOptics allows organizations to measure, analyze, and manage DevOps.

Concepts

A CloudBees DevOptics Value Stream models a complex continuous delivery process. It can be assembled from multiple pipelines. A Value Stream shows a series of interconnected gates or steps that deliver value to a customer. Those steps are presented in the "Value Stream view". The Value Stream view allows you to:

  • Track changes

  • Detect stalled and delayed changes

  • Identify failures and blockages

  • Find components ready for testing

  • View contributing components

00 delivery view overview

Value Streams

A CloudBees DevOptics Value Stream is a visual model of the software delivery process. Value Streams are defined using phases and gates. A gate shows one or more tickets. Value Stream progress is tracked based on changes to tickets, commits, and artifacts.

Phases

Phases represent the flow of changes from initial implementation to delivery (promotion/deployment). The names of the phases and the number of phases can be customized for each Value Stream.

In simpler applications, phase definitions might reference software lifecycle terms like "Development", "Testing", "Deployment", and "Maintenance". In more complex applications, phase definitions might reference architectural elements like "Libraries", "Services", "Integration", and "Deploy".

00 delivery view phases

Gates

Gates are the Jenkins projects (Jobs) that create and package software artifacts. The condition of the gate is indicated by

  • Number of tickets currently in that gate

  • Solid green for success

  • Pulsing blue for running

  • Red for failed

The circle that represents the gate is drawn in colors segmented to show the status of tickets in the gate. Tickets are assigned to a gate when they are mentioned in a commit processed by the Jenkins project of that gate. If a project has built the ticket successfully, a green segment is shown. If a later Jenkins project builds the same ticket and fails, a red segment is added to show the failure. When the build of a project succeeds, all tickets for that project appear as green segments of the circle.

Gate status and ticket status are key parts of the Value Stream view.

00 delivery view gates

Tickets

Tickets are the Jira® issues that describe work to deliver the software. Tickets are assigned to a gate when they are mentioned in a commit.

Tickets move from gate to gate as development progresses. Tickets:

  • Move from one gate to another as artifacts created in that gate are delivered to later gates.

  • Remain in a gate until the artifact created in that gate is used in a later gate.

00 delivery view tickets

Commits

Commits are the changes applied to the software. Commits may reference one or more tickets by mentioning the ticket in the commit message. When a commit references a ticket, the ticket is assigned to the gate that processes the commit. CloudBees DevOptics supports only Git commits. Other source code control systems (Mercurial, Subversion, etc.) are not supported.

Artifacts

Artifacts are generated by Jenkins projects in gates. Artifacts must have a fingerprint computed by Jenkins. A fingerprint is a file content checksum. Tickets are associated with generated artifacts. When an artifact is used in a gate, the ticket is assigned to that gate. Tickets are assigned to the latest gate using the artifact.

CloudBees DevOptics gathers information from multiple sources into a single Value Stream view. The Value Stream view presents a summary of software development. Multiple Jenkins masters can contribute to a Value Stream view. It shows software development phases, development gates within those phases, Jira® tickets, and project results. It uses commits and artifacts to track tickets as they move through software development.

Installation

CloudBees DevOptics combines data from Jenkins projects, Jira® tickets, and Git commits to provide a holistic view of software delivery. Enable a subscription, install plugins, and you are ready for you to define your first CloudBees DevOptics Value Stream.

The events plugin must be installed on each master that runs Jenkins projects related to a Value Stream. Managed Masters, Team Masters, Client Masters, and Jenkins installations should all have the events plugin installed.

The UI plugin must be installed on a dedicated/clean master, separate from other masters.

Installing on Jenkins

CloudBees DevOptics is available for Jenkins. The CloudBees DevOptics plugins are stored in a separate update center.

The "CloudBees DevOptics Installation" plugin must be installed first to add the CloudBees DevOptics update center to Jenkins.

  • Open the Jenkins Plugin Manager from Jenkins  Manage Jenkins  Manage Plugins.

  • Click the "Available" tab of the Plugin Manager and enter "DevOptics" into the filter field

  • Enable the checkbox for the plugin and press Install without restart.

04 enable devoptics installation plugin

After the "CloudBees DevOptics Installation" plugin is installed, click the "Available" tab from "Manage Plugins". The CloudBees DevOptics plugins are visible and ready to install. If the plugins are not visible, press Check Now to refresh the list of plugins.

Required plugin versions

The "CloudBees DevOptics UI plugin" requires Blue Ocean 1.3.x or 1.4.x.

If Blue Ocean is not installed, follow the instructions in the Getting Started Guide to install it.

A dedicated master is required for the "CloudBees DevOptics UI plugin". A separate master allows independent version upgrades without sacrificing any CloudBees DevOptics features.

Install UI plugin

The CloudBees DevOptics user interface is activated when the "CloudBees DevOptics UI plugin" has been installed and activated. The UI plugin will be replaced in an upcoming release by a separate user interface that does not require a Jenkins plugin.

Install the "CloudBees DevOptics UI plugin" on a dedicated/clean master that is not used for builds. A master dedicated to the "CloudBees DevOptics UI plugin" allows simpler install and upgrade and will simplify the transition to future CloudBees DevOptics releases. The dedicated master can be destroyed or repurposed once the "CloudBees DevOptics UI plugin" has been deprecated.

  • CloudBees Jenkins Enterprise users:

    • must provision a new Managed Master for the CloudBees DevOptics user interface

    • must install Blue Ocean on that master

  • CloudBees Jenkins Team users:

    • must install a new CloudBees Jenkins Team for the CloudBees DevOptics user interface

    • must install Blue Ocean on that master

  • Jenkins users:

    • must install a new Jenkins master for the CloudBees DevOptics user interface

    • must install Blue Ocean on that master

Install the "CloudBees DevOptics UI plugin" by opening Jenkins  Manage Jenkins  Manage Plugins.

04 manage plugins

  • Click the "Available" tab and enter a "Filter" value of "DevOptics".

  • Select the checkbox for "CloudBees DevOptics UI Plugin".

  • Press Download now and install after restart.

05 available plugins

Install OC plugin

The "CloudBees DevOptics OC plugin" is installed on the central Operations Center that manages multiple masters. With this plugin, Operations Center replicates CloudBees DevOptics configuration settings from Operations Center to Managed Masters and Team Masters. The "CloudBees DevOptics OC Plugin" should be installed on Operations Center and all masters connected to that Operations Center, including Managed Masters and Team Masters. Do not install it on CloudBees Jenkins Team, or Jenkins.

  • Click the "Available" tab and enter a "Filter" value of "DevOptics".

  • Select the checkbox for "CloudBees DevOptics OC Plugin".

  • Press Download now and install after restart.

cje available plugins

Install Events Plugin

The "CloudBees DevOptics Events Plugin" must be installed on each master that hosts projects assigned to gates. The plugin only needs to be installed on those Jenkins instances that host projects assigned to gates.

  • CloudBees Jenkins Enterprise users:

    • should install the events plugin on each master

    • should not install the events plugin on Operations Center

  • CloudBees Jenkins Team users:

    • should install the events plugin

  • Jenkins users:

    • should install the events plugin

Install the plugin by opening Jenkins  Manage Jenkins  Manage Plugins.

04 manage plugins

  • Click the "Available" tab and enter 'DevOptics' as the "Filter" value.

  • Select the checkbox for "CloudBees DevOptics Events Plugin".

  • Press Download now and install after restart.

06 available plugins

Activate Subscription

CloudBees DevOptics is a licensed product. It can be installed on CloudBees Jenkins Enterprise, CloudBees Jenkins Team, and other CloudBees solutions. It can also be installed on Jenkins. Register your subscription to CloudBees DevOptics through your sales representative or the CloudBees customer success managers.

The events plugin reports the status of its connection to the CloudBees DevOptics service through Jenkins  Manage Jenkins  DevOptics (by CloudBees). The plugin reports "Not Enabled" and "This master is NOT enabled for connection to the DevOptics service" until the subscription is connected.

  • Enable the subscription by pressing Connect.

09 devoptics not subscribed

Open the CloudBees Grand Central login page by pressing Connect.

  • Enter the e-mail address and password you’ve registered with CloudBees Grand Central.

10 grandcentral login

Choose the CloudBees Grand Central account from the list of enabled accounts.

  • Press Connect to complete the registration of the subscription.

11 choose grandcentral account

After completing those steps, the Jenkins master is now connected to the CloudBees DevOptics service.

12 devoptics enabled

Configuration

CloudBees DevOptics tracks software development. Most software is assembled from multiple components by cooperating teams. CloudBees DevOptics helps you visualize software development progress across multiple components and teams.

Configure CloudBees DevOptics global settings from Jenkins  Manage Jenkins  Configure System.

10 configure system

Configure Jira® Server

The Value Stream view combines information from your Jira® tickets, Git commits, and Jenkins project results. It shows project results and the associated Jira® tickets as they flow through your development process.

CloudBees DevOptics needs to know the Jira® servers you use.

11 define jira server and credentials

Define Sample Projects

To help you explore CloudBees DevOptics, define a sample Value Stream using two projects. This sample uses The two projects are:

Application Build

In this example, a Jenkins Pipeline builds the application. Freestyle projects are also fully supported with CloudBees DevOptics. Existing Freestyle projects can be easily included into CloudBees DevOptics by archiving and fingerprinting their build artifacts.

When this example Jenkins Pipeline runs, a file 'application.sh' is created, archived, and fingerprinted. CloudBees DevOptics associates tickets with artifacts by the artifact fingerprint. Artifacts without fingerprints cannot be tracked by CloudBees DevOptics.

  • Create a new GitHub repository for the sample application

  • Create a Jenkinsfile in the GitHub repository

The Jenkinsfile in the GitHub repository should contain:

pipeline {
  agent any
  stages {
    stage('Build') {
      steps {
        writeFile file: "application.sh", text: "echo Built ${BUILD_ID} of ${JOB_NAME}"
        archiveArtifacts artifacts: '*.sh', fingerprint: true
      }
    }
  }
}

Create a Jenkins project with the GitHub sample application repository. From Jenkins, click Jenkins  New Item

24 new item

Create a Pipeline

25 new pipeline

Add the GitHub repository definition and save the Pipeline by pressing Save.

26 add scm to pipeline

Run the Pipeline by pressing Build Now.

27 build now

Build results show the Pipeline completed successfully and generated an artifact, application.sh. The contents of application.sh change each time a build is performed.

28 build results

Application Deploy

A Jenkins Pipeline deploys the application. The project uses the Copy Artifact plugin to copy the results from the build project.

Install the Copy Artifact plugin by opening Jenkins  Manage Jenkins  Manage Plugins.

04 manage plugins

  • Click the "Available" tab and enter a "Filter" value of "copy artifact".

  • Select the checkbox for "Copy Artifact Plugin".

  • Press Download now and install after restart.

31 install copy artifact plugin

Restart Jenkins when the install is complete. The "Copy Artifact plugin" is ready to use.

32 copy artifact installed

Create a Jenkins Pipeline to copy the artifact from the Application Build. From Jenkins, click Jenkins  New Item

33 new item

Create a Pipeline

34 new pipeline

Add the Pipeline definition by pressing Save after inserting the Pipeline script into the editor. The Pipeline script should be:

pipeline {
  agent any
  stages {
    stage('Build') {
      steps {
        step([$class: 'CopyArtifact', projectName: 'application-build'])
        archiveArtifacts artifacts: '*.sh', fingerprint: true
      }
    }
  }
}

The Pipeline copies 'application.sh' archive from the most recent successful Application Build. The 'application.sh' file is archived and a fingerprint is calculated for easy tracking.

35 pipeline copy artifact

Run the Pipeline by pressing Build Now.

36 copy artifact build now

Build results show the Pipeline completed successfully and copied the artifact, application.sh, from the earlier Pipeline. Each run of the deliver Pipeline copies the most recent successfully built application.sh from the Application Build Pipeline.

37 copy artifact complete

Define a Value Stream

A CloudBees DevOptics Value Stream is defined with:

Phases

the milestones or stages used to deliver the software

Gates

the Jenkins projects that create and package artifacts

Open the CloudBees DevOptics editor with Create a Value Stream.

13 no devoptics application

Name the Value Stream, select a job from the list, and press Create Value Stream.

00 visual create

A brief introduction to the Visual Editor will appear. Click Close

01 visual create

The application is now defined with a single gate in the "RELEASE" phase.

Save the application or edit it using the Visual Editor.

02 visual create

Edit the Value Stream

Click the three dots icon in the top right of the screen to edit the Value Stream .

Click Edit to use the Visual Editor.

00 visual editor

Visual Editor

Hover your mouse over a gate and click the plus icon on the left.

01 visual editor

Now drag your mouse to the left to the drop target (dashed circle) until you see "Click to add gate" below the plus icon.

02 visual editor

Click the plus icon and the gate editor dialog will appear. Enter a name, master, job, and phase name for your new gate. Click Save.

03 visual editor

The new gate will appear in the Value Stream.

04 visual editor

To edit a phase name click on the phase header you with to edit, enter your new phase name and press enter or Return on your keyboard.

05 visual editor

Changes in the Visual Editor are not saved until you press Save in the top right of the screen.

Pressing Cancel will undo any changes you have made and revert the Value Stream to its previously saved state.

06 visual editor

Track a Ticket

CloudBees DevOptics combines Git commit messages, Jira® tickets, and project results in the Value Stream view. Git commit message text refers to Jira® tickets by ticket ID. For example, a commit message referring to Jira® ticket EXAMPLE-12345 must include EXAMPLE-12345 in the text. Multiple Jira® tickets may be referenced in a single git commit.

Using the Git repository created earlier, create a commit message that references a Jira® ticket. Commit and push a change to the repository referring to your ticket (for example, EXAMPLE-12345) so that the ticket reference is detected in the commit message.

Return to the gate job page and click Build Now to start a build.

47 Build Now

The Value Stream view is updated to show the ticket progress. Click on the Build Gate to open the ticket panel on the right. The ticket panel shows a summary of ticket status and gate job status. Click the ticket in the ticket panel to see more details.

48 see completed gate and ticket

The ticket panel detail view shows:

  • Description of the ticket (expandable if the description is large)

  • Gate status (success or failure)

  • Number of commits referencing this ticket

  • Summary of each commit

The ticket panel detail view Find commits field filters commits based on text you enter.

49 ticket details and commit

View the Value Stream

CloudBees DevOptics shows progress of changes through the software delivery process. When a commit is built that references a Jira® ticket, that ticket is included in the Value Stream view for the gate associated with that project. When a build succeeds that includes an artifact from a preceding gate, tickets from the preceding gate moves to the successful gate.

Gate Status

The condition of the gate is indicated by:

  • Number of tickets currently in that gate

  • Solid green for success

  • Pulsing blue for running

  • Red for failed

Gate Job

The job associated with a gate can be opened by clicking on the "View gate job" drop down in the gate status pane.

Each gate is associated with a Jenkins project.

  • View the associated Jenkins project by clicking the gate in the Value Stream view.

  • When the "Build Gate" panel appears, click the three dots in the right hand pane.

  • Click View gate job…​ to open a new web browser on the project associated with this gate.

42 view gate job

The gate project is visible with its artifacts and build history.

43 gate job view

Ticket Status

Clicking a gate shows the tickets for that gate. Tickets can be opened by clicking the ticket in the gate status pane.

The Value Stream view time period can be adjusted from the drop down menu in the top right of the page. Multiple time periods are available, including:

  • 24 hours

  • 48 hours

  • 7 days

  • 14 days

  • 30 days

  • 90 days

00 delivery view overview