Configuration as Code (CasC)

4 minute readScalabilityAutomation

Built over the Jenkins Configuration as Code plugin, CloudBees Configuration as Code (CasC) is a method of simplifying the configuration of the operations center or controllers by capturing the configuration of the CloudBees CI instance in human-readable declarative YAML files that can be used in a reproducible way.

The set of YAML files that describe a CloudBees CI instance configuration is a Bundle, and in addition to the features provided by the Jenkins Configuration as Code plugin, CloudBees Configuration as Code (CasC) provides the following features:

  • Bundles can contain additional configuration information for:

    • Items like folders, pipelines,freestyle jobs, etc.

    • Plugins to be installed (under the CloudBees Assurance Program(CAP) or by means of plugin catalogs).

    • RBAC (Role-Based Access Control) configurations with users, groups and roles.

  • Bundle Inheritance, that is possible when your operations center provide CasC configuration bundles to your controllers.

CasC Requirements

CloudBees CI Level 2: CasC (Configuration as Code)

Upon completion, learners should understand the concepts, elements, principles, and advantages of using CloudBees CI CasC (Configuration as Code).

The following table contains the plugins required for using CloudBees Configuration as Code (CasC) in your CloudBees CI cluster and where to install them, in the operations center or in the controllers.

Table 1. Plugin requirements for CasC
Plugin operations center controllers

The CloudBees CasC API has been deprecated.

CasC advantages

The use of CloudBees Configuration as Code (CasC) provides the following advantages to your organization:

  • Portability: Storing all your CasC configuration bundles makes it easier to move your CloudBees CI cluster to a new infrastructure.

  • Auditability and Traceability: Using an SCM as a single source of truth for your CasC configuration bundles adds traceability to any change in them.

  • Manageability: Using your operations center, you can manage the configuration bundles applied to the different controllers in your cluster, and CloudBees Configuration as Code (CasC) even allows you to validate a bundle before applying it (pre-validation).

  • Scalability: When you create new controllers in your cluster to match an increasing workload, CloudBees Configuration as Code (CasC) makes this horizontal scalation easier, allowing you to create a new controller with the required configuration stored in a configuration bundle.

CloudBees CasC Client plugin

The CasC Client plugin allows you to export the current CasC configuration and update a CasC bundle.

For more information, refer to:

CloudBees CasC Items API plugin

The CasC Items API plugin allows you to:

CloudBees CasC Items Commons plugin

The CasC Items Commons plugin allows you to:

CloudBees CasC Items Controller plugin

The CasC Items Controller plugin allows you to create Pipeline, Multibranch Pipeline, GitHub Organization, and Bitbucket Teams/Projects items for controllers using the CasC items.yaml file.

For more information, refer to Creating items with CasC for controllers.

The CloudBees CasC Items Controller plugin is not supported for the operations center and should not be installed.

CloudBees CasC Items Server plugin

The CloudBees CasC Items Server plugin allows you to create controller and Cluster Operations items for the operations center using the CasC items.yaml file.

For more information, refer to Creating items with CasC for the operations center.

CloudBees CasC Server plugin

The CloudBees CasC Server plugin allows you to manage controller CasC bundles. The CloudBees CasC Server plugin is installed to the operations center by default.

For more information, refer to Configuring bundle availability for controllers.

CloudBees CasC API plugin (deprecated)

The CloudBees CasC API Plugin has been deprecated in CloudBees CI and CloudBees Jenkins Platform 2.319.1.5 and can be uninstalled. The functionality that was previously available in the CloudBees CasC API plugin is now available in the following plugins:

  • CloudBees CasC Client plugin

  • CloudBees CasC Items API plugin

  • CloudBees CasC Items Commons plugin

  • CloudBees CasC Items Controller plugin

The CasC API plugin allows you to: