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:
-
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 isoc-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
.
-
-
Install the operations center on modern cloud platforms. For more information, refer to CloudBees CI installation on Kubernetes.
-
Issue the
kubectl apply
command 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: false
value withEnabled: true
within the CloudBeesvalue.yaml
file. For example:OperationsCenter: CasC: Enabled: true
-
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
-
Issue the
helm upgrade
command to enable CasC within your Kubernetes cluster. For example:helm upgrade [RELEASE] [CHART] --values /path/to/values.yaml
helm upgrade \ <release-name> \(1) <chart-name> \(2) --namespace <your-namespace> \(3) --values </path/to/values.yaml>(4)
1 The release name for CloudBees CI. Usually cloudbees-core
.2 The chart name for CloudBees CI. Usually cloudbees/cloudbees-core
.3 The namespace where to install CloudBees CI. Usually cjoc
.4 The path to the values.yaml
file.
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. |