Install CloudBees CI on modern cloud platforms with CloudBees Analytics

7 minute read

CloudBees CI installations on modern cloud platforms can integrate CloudBees Analytics to track critical CloudBees CI metrics. Using CloudBees Analytics, you can create, view, and export reports based on realtime performance metrics collected from your CloudBees CI environment.

On modern cloud platforms, CloudBees Analytics is bundled as part of the CloudBees CD/RO Helm charts. To install CloudBees Analytics, you must install CloudBees CD/RO.

The CloudBees CD/RO Helm chart includes the following components:

  • CloudBees Analytics server

  • CloudBees CD/RO web server

  • CloudBees CD/RO bound agent

  • Built-in MariaDB database

Additionally, ingress configurations for communication between CloudBees CI and CloudBees Analytics are included.

The CloudBees CD/RO version installed as part of this process is only a demo version. CloudBees CD/RO plugins and the CloudBees CD/RO artifact repository are not installed as part of this deployment. Additionally, CloudBees CD/RO is installed with only the local bound agent and the built-in database to support CloudBees Analytics by retrieving data from CloudBees CI. This configuration is not designed for running jobs within CloudBees CD/RO and cannot support a CloudBees CD/RO production environment.

To install a CloudBees CD/RO production environment, an enterprise license specifically for it. For more information on licenses, refer to Licenses, or contact your CloudBees sales representative.

Important information

Before you install CloudBees Software Delivery Automation analytics, review the following information:

  • An NGINX Ingress is required in the cluster to provide a centralized entry point for application traffic. Both CloudBees CI and CloudBees CD/RO require the ingress for communication as part of CloudBees Software Delivery Automation.

    You can install and configure your own ingress-nginx, or use the built-in CloudBees CD/RO ingress-nginx. Instructions to use the CloudBees CD/RO ingress are included in Install CloudBees CD/RO Helm chart.

    If you are using your own ingress-nginx, you must also complete the instructions in Configure ingress-nginx for CloudBees CD/RO.
  • Before you proceed with this process, ensure you are using CloudBees CI version 2.263.4.2 or later.

    If you are not using CloudBees CI version 2.263.4.2 or later, you must update to a CloudBees Software Delivery Automation supported version prior to performing these steps.
  • CloudBees recommends backing up your instance before performing these procedures. While this process should not affect any data, a backup may be required to prevent data loss if cluster issues arise.

  • This process installs CloudBees CD/RO and CloudBees Analytics on the same Kubernetes cluster and within the same namespace as your CloudBees CI deployment. You must have the necessary cluster permissions to complete this process.

  • For CloudBees CI, the following plugins are required:

    • CloudBees Unified Data Plugin

    • CloudBees Unified UI Plugin

    • CloudBees Platform Common Plugin

      The CloudBees Unified Data Plugin, the CloudBees Unified UI Plugin, and the CloudBees Platform Common Plugin are installed on both controllers and the operations center. There is no need to configure the CloudBees Platform Common Plugin on a controller because that plugin’s configuration in the operations center is automatically propagated to all connected controllers.
  • For CloudBees Analytics, the required plugins are included in the CloudBees Assurance Program, and are automatically installed when managed controllers or team controllers are provisioned.

  • During Helm chart configuration, you must configure the credentials required to enable communication between CloudBees CI and CloudBees Analytics. This step is described in the CloudBees CD/RO chart configuration section.

Install CloudBees Software Delivery Automation

To install CloudBees Software Delivery Automation on modern cloud platforms:

Create CloudBees Software Delivery Automation namespace

  1. Add the CloudBees Helm chart repository:

    helm repo add cloudbees https://public-charts.artifacts.cloudbees.com/repository/public/ helm repo update
  2. Create a Kubernetes namespace for the CloudBees Software Delivery Automation deployment:

    kubectl create namespace cloudbees-sda

Install CloudBees CI Helm chart

To install the CloudBees CI deployment:

  1. Create a copy of the following values file named ci-values.yaml:

    The commands on this page use ci-values.yaml as the file name for the CloudBees CI values file. If you use a different name, update the command as applicable.
    ci-values.yaml
    # sda activates flags in the cloudbees-flow chart to start up by default in SDA mode, work in a single namespace & ingress host with CloudBees CI, and preconfigure the location of CI operations center sda: true OperationsCenter: # Your ClouBees SDA URL HostName: cloudbees-sda.example.com Ingress: Class: "nginx" tls: Enable: true # Your ClouBees CI Operations Center Ingress tls Secret Name SecretName: sda-tls
  2. Update OperationsCenter.HostName with your host URL.

  3. (OPTIONAL) If you are going to use the built-in CloudBees CD/RO ingress, and will change the default ingress-nginx class name, update Ingress.Class with the name you will use.

    The ingress-nginx values must be the same for:

    • OperationsCenter.Ingress.Class in ci-values.yaml,

    • ingress-nginx.ingressClassResource.name in cd-values.yaml, and

    • ingress.class in cd-values.yaml.

    Failing to sync these values will result in the components not being able to communicate as expected.

  4. Install the CloudBees CI Helm chart by running:

    helm install cloudbees-core cloudbees/cloudbees-core -f ci-values.yaml -n cloudbees-sda --timeout 10000s

Install CloudBees CD/RO Helm chart

To install the CloudBees CD/RO and CloudBees Analytics deployment:

  1. Create a copy of the following values file named cd-values.yaml:

    The commands on this page use cd-values.yaml as the file name for the CloudBees CD/RO values file. If you use a different name, update the command as applicable.
    cd-values.yaml
    ingress-nginx: # ingress-nginx.enabled set to true would install its own copy of the ingress controller enabled: false controller: ingressClassResource: name: "nginx" repository: # repository.enabled need not be set for Analytics (only used by full CD/RO) enabled: false web: # web.sharedPluginEnabled need to be set to # avoid the requirement for shared storage between flow-web and flow-server sharedPluginEnabled: false # clusteredMode need not be set for Analytics (required for full CD/RO in production) clusteredMode: false database: dbName: "flowdb" dbUser: "flow" dbType: "mariadb" dbPort: 3306 clusterEndpoint: "mariadb" mysqlConnector: enabled: false mariadb: # mariadb.enabled and associated flags preconfigure the Analytics services to use in-cluster MariaDB (external RDB required for full CD/RO in production) enabled: true db: user: "flow" # sda activates flags in the cloudbees-flow chart to start up by default in SDA mode, work in a single namespace & ingress host with CloudBees CI, and preconfigure the location of CI operations center sda: true ingress: class: "nginx" # Update your CloudBees SDA URL host: cloudbees-sda.example.com certificate: existingSecret: sda-tls
  2. Update ingress.host. with your host URL.

  3. Configure your ingress-nginx configuration:

    • If you want to use the built-in CloudBees CD/RO ingress, update ingress-nginx.enabled from false to true.

      • When using the built-in ingress, if you change ingress-nginx.ingressClassResource.name in cd-values.yaml, you must also update the following with the new name:

      • Update ingress.class in cd-values.yaml.

      • Update OperationsCenter.Ingress.Class in ci-values.yaml.

        The ingress-nginx values must be the same for:

        • OperationsCenter.Ingress.Class in ci-values.yaml,

        • ingress-nginx.ingressClassResource.name in cd-values.yaml, and

        • ingress.class in cd-values.yaml.

        Failing to sync these values will result in the components not being able to communicate as expected.

    • If you are using your own NGINX Ingress, you must configure the TCP ports for CloudBees CD/RO. Refer to Configure ingress-nginx for CloudBees CD/RO for instructions.

      If you are using your own NGINX Ingress, ensure the following values use the value of controller.ingressClassResource.name from your ingress-nginx Helm chart:

      • OperationsCenter.Ingress.Class in ci-values.yaml

      • ingress.class in cd-values.yaml.

      Failing to sync these values will result in the components not being able to communicate as expected.

  4. Install the CloudBees CD/RO Helm chart by running:

    helm install cloudbees-flow cloudbees/cloudbees-flow -f cd-values.yaml -n cloudbees-sda --timeout 10000s
  5. Get the CloudBees Software Delivery Automation IP by running:

    kubectl get ingress -n cloudbees-sda
  6. Update the CloudBees Software Delivery Automation IP in your DNS.

Verify your cluster installation

  1. Run the following command for your Kubernetes cluster:

    kubectl get pods
  2. Verify pods with the following prefixes appear:

    • cjoc

    • flow-bound-agent

    • flow-analytics

    • flow-server

    • flow-web

    • mariadb

    Additionally, ensure that pods corresponding to your managed controllers are also present.

Sign in to CloudBees CI

  1. Run the following command to retrieve your CloudBees CI admin user password:

    kubectl exec cjoc-0 -- cat /var/jenkins_home/secrets/initialAdminPassword
  2. Open a browser to https://cloudbees-sda.example.com/cjoc/, replacing "cloudbees-sda.example.com" with your instance.

  3. Sign in with the username admin and password you retrieved.

Verify your CloudBees Software Delivery Automation connection

You may need to sign in to CloudBees CD/RO and obtain a license to verify the connection.
  1. From your CloudBees CI operations center, go to Manage Jenkins  Configure System, and then scroll down to Connection to CloudBees Software Delivery Automation.

  2. In URL of the CloudBees Software Delivery Automation server, verify that the URL for the CloudBees Software Delivery Automation server has been configured. For example, https://your.hostname/. This should be the same as the CloudBees CI operations center URL minus the cjoc/ suffix.

  3. Check that Connected successfully is displayed.

Do not change the Allow analytics events to be sent and Send analytics events to this URL fields. These fields are populated automatically to enable analytics events to flow from CloudBees CI to CloudBees Software Delivery Automation.

Sign in to CloudBees Software Delivery Automation

  1. Go to https://your.host/flow/, replacing your.host with your host name, and sign in using the username admin and the password obtained after installing CloudBees CD/RO. If you need the password, run the following command to retrieve it:

    kubectl get secrect --namespace flow cloudbees-cd-demo-flow-credentials -o jsonpath="{.data.CBF_SERVER_ADMIN_PASSWORD}" | base64 --decode; echo
  2. On the You do not have a license to CloudBees Analytics screen, select If you have a license add it here.

  3. On the Licenses screen, select There are no licenses.

  4. On the Import License screen, enter your license data. The license will be processed.

  5. In the left pane, go to Administration  Configurations  CI Configurations, and verify that there is an entry for the CloudBees CI operations center URL.

CloudBees strongly suggests to update the admin user password based on your security requirements. To do so:

  1. Go to Administration  Users.

  2. Select the admin user.

  3. Enter the default password in the Current Password field.

  4. Enter a new password in the New Password field, and confirm the password in the Retype Password.

  5. Select OK to save the new password.

  6. Log out by selecting the user profile in the upper right, and log back in using the admin user and new password.

Upgrade CloudBees CI components

After configuring CloudBees CI as part of CloudBees Software Delivery Automation, upgrading CloudBees CI and its components follows the same process as a standard CloudBees CI upgrade. For more information, refer to Upgrading CloudBees CI on modern cloud platforms.

Upgrade CloudBees CD/RO components

After configuring CloudBees CD/RO as part of CloudBees Software Delivery Automation, upgrading CloudBees CD/RO and its components follows the same process as a standard CloudBees CD/RO upgrade. For more information, refer to Upgrade Kubernetes on Kubernetes.