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
To configure the operations center using CasC:
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
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-fileargument, where the source is the directory containing the bundle files. For example:
kubectl create configmap oc-casc-bundle --from-file=casc/oc.
Install the operations center on modern cloud platforms. For more information, refer to CloudBees CI installation on Kubernetes.
kubectl applycommand to add the ConfigMap you created to your Kubernetes cluster. For example:
kubectl apply -f oc-casc-bundle.yaml
To enable CasC for the operations center, overwrite the
Enabled: falsevalue with
Enabled: truewithin the CloudBees
value.yamlfile. For example:
OperationsCenter: CasC: Enabled: true
If using a custom ConfigMap name, overwrite
ConfigMapName: oc-casc-bundlewith the appropriate ConfigMap name. For example:
OperationsCenter: CasC: Enabled: true ConfigMapName: custom-configmap-name
helm upgradecommand to enable CasC within your Kubernetes cluster. For example:
helm upgrade [RELEASE] [CHART] --values /path/to/values.yaml
For example, if
cloudbees/cloudbees-core, your namespace is
cjoc, and your
values.yamlfile is in the current directory, your command would be:
helm upgrade cloudbees-core cloudbees/cloudbees-core --namespace cjoc --values values.yaml
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.