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 |
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
helm upgradecommand 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.