Configuring the operations center on modern platforms using CasC

2 minute readScalabilityAutomation

Once you have created a CasC bundle, you can use it to create a ConfigMap to configure the operations center on CloudBees CI on modern cloud platforms.

You should not use dockerImageDefinitionConfiguration with CasC because the entire configuration becomes hardcoded, including the name, version number, and Docker image. When upgrading, this prevents helm upgrade from overwriting these values and they must be manually updated within the ConfigMap for each new CloudBees CI release. When upgrading CloudBees CI on modern cloud platforms, CloudBees recommends using helm upgrade to automatically overwrite the default Docker image using the Master.Image.dockerImage key.

To configure the operations center using CasC:

  1. Create a ConfigMap based on the CasC bundle. For more information on creating ConfigMaps from directories, refer to the Kubernetes documentation. For example:

    apiVersion: v1 kind: ConfigMap metadata: name: oc-casc-bundle namespace: default data: bundle.yaml: | # bundle.yaml file content jenkins.yaml: | # jenkins.yaml file content plugins.yaml: | # plugins.yaml file content items.yaml: | # item.yaml file content rbac.yaml: | # rbac.yaml file content
    • The default name of the ConfigMapName in the CloudBees values.yaml file is oc-casc-bundle. You can use this default name to easily add the ConfigMap YAML file to your Kubernetes cluster.

    • When creating the ConfigMap, you can manage the bundle files as separate files by using the --from-file argument, where the source is the directory containing the bundle files. For example: kubectl create configmap oc-casc-bundle --from-file=casc/oc.

  2. Install the operations center on modern cloud platforms. For more information, refer to CloudBees CI installation on Kubernetes.

  3. Issue the kubectl apply command to add the ConfigMap you created to your Kubernetes cluster. For example:

    kubectl apply -f oc-casc-bundle.yaml
  4. To enable CasC for the operations center, overwrite the Enabled: false value with Enabled: true within the CloudBees value.yaml file. For example:

    OperationsCenter: CasC: Enabled: true
  5. If using a custom ConfigMap name, overwrite ConfigMapName: oc-casc-bundle with the appropriate ConfigMap name. For example:

    OperationsCenter: CasC: Enabled: true ConfigMapName: custom-configmap-name
  6. Issue the helm upgrade command to enable CasC within your Kubernetes cluster. For example:

    helm upgrade [RELEASE] [CHART] --values /path/to/values.yaml

    For example, if [RELEASE] is cloudbees-core, [CHART] is cloudbees/cloudbees-core, your namespace is cjoc, and your values.yaml file is in the current directory, your command would be:

helm upgrade cloudbees-core cloudbees/cloudbees-core --namespace cjoc --values values.yaml

Once the helm upgrade command has been issued, the operations center should automatically restart.

CasC bundle validation is automatically performed when the instance is started and the bundle is applied. If an error is returned, the instance does not start and the validation error is included in the operations center’s log file. For more information, refer to Troubleshooting CasC for the operations center.
In August 2020, the Jenkins project voted to replace the term master with controller. We have taken a pragmatic approach to cleaning these up, ensuring the least amount of downstream impact as possible. CloudBees is committed to ensuring a culture and environment of inclusiveness and acceptance - this includes ensuring the changes are not just cosmetic ones, but pervasive. As this change happens, please note that the term master has been replaced through the latest versions of the CloudBees documentation with controller (as in managed controller, client controller, team controller) except when still used in the UI or in code.