Getting Started with CloudBees DevOptics Deliver

CloudBees DevOptics Deliver collects and correlates data across software delivery pipelines into a comprehensive live view, creating a single point of reference on the status of application delivery. 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 Deliver allows organizations to measure, analyze, and manage DevOps.

Concepts

A CloudBees DevOptics Deliver application is a visual model of the delivery process for that application. It represents applications as a series of interconnected gates or steps that deliver value to a customer. Those application delivery steps are presented in the "delivery stream view". The delivery stream view allows you to:

  • Track application changes

  • Detect stalled and delayed changes

  • Identify failures and blockages

  • Find components ready for testing

  • View components contributing to an application

The delivery stream view shows the development status of your application.

00 delivery view overview

Applications

A CloudBees DevOptics Deliver application is a visual model of the delivery process for that application. Applications are defined using phases, gates, and tickets. Application progress is tracked based on changes to tickets, commits, and artifacts.

Phases

Phases represent the flow of code from its initial implementation to its delivery to a customer. The names of the phases and the number of phases can be customized for each application.

In simpler applications, phase definitions might be lifecycle centered, like "Development", "Testing", "Deployment", and "Maintenance". In more complex applications, phase definitions might be architecture centered, like "Libraries", "Services", "Integration", and "Deploy".

00 delivery view phases

Gates

Gates are the Jenkins projects that create and package application 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 delivery stream view of your application.

00 delivery view gates

Tickets

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

Tickets move from gate to gate as application 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 application source code. 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 Deliver 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 Deliver gathers information from multiple sources into a single delivery stream view. The delivery stream view presents a summary of application development. Multiple Jenkins masters can contribute to a delivery stream view. It shows application development phases, development gates within those phases, Jira® tickets, and project results. It uses commits and artifacts to track tickets as they move through application development.

Installation

CloudBees DevOptics Deliver combines data from Jenkins projects, Jira® tickets, and Git commits to provide a holistic view of application delivery. Install a license, a UI plugin, and an events plugin, and you are ready to define your first application.

The events plugin must be installed on each master that runs Jenkins projects related to applications. Managed Masters and Team Masters should all have the events plugin.

The UI plugin needs to be installed on Operations Center and may be installed on Managed Masters and Team Masters as needed. Managed Masters and Team Masters only need the UI plugin if users do not commonly visit Operations Center.

Install license

CloudBees DevOptics Deliver is a licensed product. It can be installed on CloudBees Jenkins Enterprise, CloudBees Jenkins Team, and other CloudBees solutions. Obtain your product license from the CloudBees licensing team or your sales representative. Each license is connected to a specific instance ID.

The instance ID is available from Jenkins  Manage Jenkins  Manage License.

00 instance id

Once you’ve received your license key, open the license management page from Jenkins  Manage Jenkins  Manage Licenses.

01 manage license

Enter the license key and license certificate assigned to your instance.

Check the update center

After the license key is installed, open the Update Center from Jenkins  Manage Jenkins  Manage Plugins and check for new plugins by pressing Check now. An update check shows the most recent plugin versions available.

03 check for updates

Install the UI plugin

The CloudBees DevOptics Deliver user interface is activated when the "CloudBees DevOptics Deliver UI plugin" has been installed and activated. The user interface plugin must be installed on those masters where application status will be viewed. Operations Center users should install the UI plugin on the Operations Center, and may optionally install it on other masters. CloudBees Jenkins Team users should install the UI plugin on their master.

Operations Center users must install the Blue Ocean plugin. CloudBees Jenkins Team users that did not install the recommended plugins must install the Blue Ocean plugin. CloudBees Jenkins Team users that installed the recommended plugins already have the Blue Ocean plugin installed.

Install the "CloudBees DevOptics Deliver 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 Deliver UI Plugin". Press Download now and install after restart.

05 available plugins

Install the events plugin

The CloudBees DevOptics Deliver event handling plugin needs to be installed on every master which hosts projects assigned to gates. The event handling plugin only needs to be installed on those Jenkins instances which host projects assigned to gates. Operations Center users should install the events plugin on each master. Operations Center users do not need to install the events plugin on the Operations Center. CloudBees Jenkins Team users should install the events plugin on their master.

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 Deliver Events Plugin". Press Download now and install after restart.

06 available plugins

After the restart, CloudBees DevOptics Deliver is ready for you to define your first application.

The events plugin reports the status of its connection to the CloudBees DevOptics Deliver service through Jenkins  Manage Jenkins  DevOptics (by CloudBees).

07 manage jenkins with devoptics

The plugin reports "Connected" and "This master is connected to the DevOptics service" when the plugin is correctly licensed, configured, and operating correctly.

08 devoptics delivering events

If the plugin is unable to connect to the CloudBees DevOptics Deliver service, it reports "Not Connected" and "This master is NOT connected to the DevOptics service". Additional diagnostic information is included with the failure message, including the error message and the instance ID.

System configuration

CloudBees DevOptics Deliver tracks the development of an application. Most applications are assembled from multiple components, and multiple teams. CloudBees DevOptics Deliver helps you visualize development progress on your applications across multiple components and teams.

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

10 configure system

Configure Jira® server

The delivery 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 Deliver needs to know the Jira® servers you use. Add the Jira® server URL in the DevOptics Deliver section of Jenkins  Manage Jenkins  Configure System.

11 define jira server and credentials

Define an application

To help you explore CloudBees DevOptics Deliver, define a sample application using two projects. The two projects are:

Once the two projects are defined, create the:

Application build

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

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

  • 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 delivery

A Jenkins Pipeline is used to deliver the application. The delivery Pipeline 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

CloudBees DevOptics Deliver application

The delivery stream view uses a JSON file to describe your application. The JSON file defines key components of your application, including:

Phases

the milestones or stages used to deliver the application

Gates

the projects which create and package application artifacts

Projects

the Jenkins projects which construct the application components

Open the CloudBees DevOptics Deliver editor with New Application:

13 no devoptics application

Name the application, paste the application definition JSON into the editor, and press Apply:

The application definition JSON should look like the following, except replace the "master" value with the URL of your master, and replace the "job" value with the paths to your projects created earlier):

{
    "phases": [ {
        "id": "build-phase-id",
        "name": "Application Build Phase",
        "gates": [ {
            "id": "build-gate-id",
            "name": "Build Gate",
            "master": "https://jenkins.example.com/cjoc/app-team/",
            "job": "DevOptics/application-build",
            "feeds": "deploy-gate-id"
        } ]
    },
    {
        "id": "deploy-phase-id",
        "name": "Application Deploy Phase",
        "gates": [ {
            "id": "deploy-gate-id",
            "name": "Deploy Gate",
            "master": "https://jenkins.example.com/cjoc/app-team/",
            "job": "DevOptics/application-deploy"
        } ]
    } ]
}

40 define the application

The application is now defined with two gates, a "Build Gate", and a "Deliver Gate".

41 app defined

Each gate is associated with a Jenkins project.

  • View the associated Jenkins project by clicking the gate in the delivery 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

Commit a ticket reference

CloudBees DevOptics Deliver combines Git commit messages, Jira® tickets, and project results in the delivery 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 delivery 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 delivery stream

CloudBees DevOptics Deliver shows progress of changes through the application delivery process. When a commit is built that references a Jira® ticket, that ticket is included in the delivery 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.

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 delivery 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