CDM data model
Summarize
Summary of CDM data model
The CDM (Configuration Data Management) data model provides a standardized structure to manage configuration data throughout the software delivery lifecycle, including automation, quality validation, and alignment with CSDM (Common Service Data Model). It supports importing existing config data (JSON, YAML, INI, XML, etc.), validating it against user-defined policies, and exporting validated config data into your organization’s DevOps pipeline for deploying applications, services, and infrastructure.
Show less
Important to note, starting with the Washington DC release, DevOps Config is being phased out—no longer installed on new instances but still supported on existing ones.
Key Features
- Version and Change Control: Rigorous versioning and transparent change control for configuration data changes.
- Security: Encryption and access controls ensure sensitive configuration data is protected.
- Automated Validation: Config data is validated by executing policies against snapshots of deployables.
- Reusable Config Structures: Variables and overlays enable reuse and customization of config data across environments and releases.
Data Structure Components
- Application: Represents the full set of configuration data for a service or infrastructure element in the CMDB.
- Components: Building blocks representing logical elements like apps, microservices, servers, or templates. Components can contain variables and nested components, and shared components can be managed in libraries for reuse across applications.
- Collections: Assemblies of components defining a release or version, allowing version-specific variables and overlays that modify or add config settings.
- Deployables: Environment-specific datasets (e.g., Development, Test, Production) composed of collections and environment-specific variable overrides, ready for deployment via CI/CD pipelines. Each deployable corresponds to a service configuration in the CMDB.
- Variables: Defined at component, collection, or deployable levels, with deployable variables having the highest precedence, allowing environment-specific customization.
- Changesets and Snapshots: Changes are saved as changesets; snapshots are generated for deployables to validate and prepare config data for export and deployment.
- File Nodes: Enable attaching files of any supported MIME type to components or applications for richer configuration context.
- Contextual Variables: Predefined variables provided by ServiceNow to dynamically define config data based on node context.
Practical Use and Benefits for ServiceNow Customers
ServiceNow customers can leverage the CDM data model to unify and standardize configuration data management for software delivery. By structuring configuration data into components, collections, and deployables, organizations can efficiently manage multiple application versions and environment-specific settings with clear version control and validation. This model enhances automation and governance of configuration data, reduces deployment errors, and promotes reuse and consistency across releases and environments. The integration with the CMDB ensures that all deployed services are accurately represented and managed within your ServiceNow ecosystem.
The CDM data model is a standardized data structure that supports the broader life cycle of software delivery — automation, quality validation, and CSDM. CDM imports existing config data, validates it using policies that you define, and exports valid config data to your organization's existing DevOps pipeline to implement applications, services, and infrastructure.
CDM data model overview
- Implements rigorous and transparent version and change control.
- Enables you to encrypt sensitive data and ensures appropriate access control for the data.
- Enables automated validation of config data.
- Enables you to reuse config data structures by using variables, including values, and overlaying values.
Structure of the CDM data model
An application in CDM is the full collection of config data for an application service, application model, or dynamic CI group [infrastructure] in the CMDB. The CDM user creates an application record that includes the following empty folders in a standard hierarchical structure. After the system ingests your existing config data, you structure the data into components in the appropriate folder. You create collections of the components and then combine the collections into a deployable — a config dataset (for a development, test, or production environment) that can be deployed by your delivery process. Each component, collection, variable, and deployable is a node in the structure.
- Components
- Components are the building blocks that typically represent the config data for a
logical element of an application or a part of an infrastructure service. For example, a
monolithic app, a micro-service, a physical server, or a Docker template.
A component can include descendent components, either direct or included. A component can include variables that can take on different values in collections and deployables.
You can group components into a library of shared components.
Tip:It is often useful to define a default value for a variable in a component or collection. This is a powerful strategy because you can create a broad variety of deployables from a small set of components and collections. Deployables that inherit a component or collection can use overrides, overlays, and variable settings to meet the needs of the environment type. For example, the Development deployable can use the same components and collections as the Test deployable. Development uses the default database variable value. Test, in contrast, uses a different value that is appropriate for the test environment. - Components Vars folder
- The components Vars folder can contain variables that any CDI in the Components folder can use. There is only one components Vars folder.
- Collections
A collection is the set of components that together define a release — You can think of a collection as a release composition.
A collection can include variable or override settings that are specific to the particular version. For example, the VM config data used in release-1 is different from the data used in release-2. release-1 might use the value
2Gbfor the memory setting ("memory": "2Gb") and release-2 might specify a different value ("memory": "4Gb"). In addition, a collection might include config settings that do not appear in its components. Such values are called overlays.A collection might represent a particular version of an application, localization, or feature set. For example, a collection named collection-2 might include the set of components or component versions that represent the Release 2.0 functionality for the application. In contrast, a collection named collection-3 that represents the Release 3.0 functionality might include the same set of components or component versions, additional components or component versions, and other variable, override, and overlay settings.
- Collections Vars folder
- The collection Vars folder can contain variables that any CDI in the Collections folder can use. Each collection has one collection Vars folder. A collection variable has higher precedence than a component variable.
- Deployables
You add and configure deployables in the data structure. A deployable is a config dataset (for a DEV, TEST, or PROD environment) that can be deployed by your delivery process. Each deployable in an application represents the configuration of a service in the CMDB.
A deployable is made up of the collection or set of collections that define the release for a particular environment. The combination of collections+environment link to an application service in the CMDB or to an infrastructure service.
A deployable can include variable or override settings that are specific to the environment. For example, the
databasevariable has one value in the development environment and a different value in the production environment. An override value in the production deployable might specify a required container parameter that is not needed in the development environment.An example deployable named DEV-2 would include the collection-2 collection and would specify variable, override, and overlay settings that are specific to the development environment for release 2.0. In contrast, the deployable named PROD-2 would also include the collection-2 collection but, instead, would specify settings that are specific to the production environment for release 2.0.
When you are happy with a changeset, you can save and commit the changes. The system checks for conflicts with the committed changesets of other users. If there are no conflicts, the system persists the changes and then generates a snapshot of every deployable that is affected by the changes. A snapshot represents a potential exportable config data set. The system validates config data by executing policies against each snapshot and returning the validation results.
- Deployable Vars folder
- The deployable Vars folder can contain variables that any CDI in the Deployables folder can use. Each deployable has one deployable Vars folder. A deployable variable has higher precedence than a collection variable.
Example
- Components are grouped to form collections that represent environments or versions of environments. The FS2 (feature set 2) collection has config data for Core version 2 of the application that is currently being developed and tested. FS1, in contrast, holds the earlier Core version 1 that has been thoroughly tested and is currently running the application in the production environment.
- In the example, both FS2 (the collection that is used in test environments) and FS1 (the collection that is used in the production environment) use config data for both S3 and a particular VM template. Both the FS1 and FS2 collections, therefore, inherit these two components. Because the collections represent different feature sets, it is probably the case that FS1 and FS2 use variables or overrides to specify a few different settings for the components.
- Each deployable includes the collection that is appropriate for its environment (development, test, or production). In the example, the TEST deployable uses the FS2 collection, the newer version of the feature set and
other config settings that is used in test environments. The PROD deployable, in contrast, uses FS1 in the production environment. FS1 is the earlier version of the collection of config data that had been validated for
production.
In each deployable, variables are set to values that are appropriate for the environment. For example, in PROD, the database variable is set to prod1 (the production database). The TEST deployable, however, specifies one of the databases that is used by the testing team, test3.
Definitions
- CDI
- A config data item (CDI) is simple a key-value node.
- Variable
- A variable is a key-value item that can be referenced within a CDI.
- Parent nodes and child (leaf) nodes
- CDIs and variables are key-value items. CDIs and variables can only be child nodes.
- Components, collections, deployables, and folders nodes can be parent nodes—nodes that can have key-value items or other parent nodes.
Note:Starting with Configuration Data Management version 4.2, you can define a node using any UTF-8 character, including the forward slash (/).
- Name path
- The name path is the complete folder path of the selected node in the list. In REST API, you can provide name path in array in the following formats:
- Backslash format: For example - testApp/deployables/Development1/cdi1Note:If your node name contains a backslash ("/"), you can't use this format.
- Backend name path with replacement characters: For example - testApp�deployables�Development1�cdi1
- Array: For example - ['testApp','deployables','Development1','cdi1']
- Backslash format: For example - testApp/deployables/Development1/cdi1
- Components
- Components are the building blocks that typically represent the config data for a logical element of an application or a part of an infrastructure service. For example, a monolithic app, a micro-service, a physical
server, or a Docker template.
A component can contain variables that can take on different values in collections and deployables. More detailed instructions appear in Define or update a component.
- Collections
A collection is the set of components that together define a release — You can think of a collection as a release composition.
A collection can contain variable or override settings that are specific to the particular version. For example, the VM config data used in release-1 is different from the data used in release-2. release-1 might use the value
2Gbfor the memory setting ("memory": "2Gb") and release-2 might specify a different value ("memory": "4Gb"). In addition, a collection might include config settings that do not appear in its components. You might think of such values as "overlays".- Deployables
A deployable is a config dataset (for a development, test, or production environment) that can be deployed into your CI/CD pipeline as a service. Each deployable in an application configures a service in the CMDB. For example, you might create three deployables, one for each environment type: Development, Test, and Production.
A deployable is made up of the collection or set of collections that define the release for a particular environment. The combination of collections+environment link to an application service in the CMDB or an infrastructure service.
A deployable can contain variable or override settings that are specific to the environment. For example, the
databasevariable has one value in the development environment and a different value in the production environment. An override value in the production deployable might specify a required container parameter that is not needed in the development environment.- Changesets and Snapshots
- When you commit changes to a CDM application, the system persists the changes as a changeset of the application. The system then also generates a snapshot of every deployable that is affected by the changes. A snapshot represents a potential exportable config data set. The system validates config data by executing policies against each snapshot and returning the validation results. Snapshots that pass validation and that are published can be exported to the release pipeline as config data.
- Shared components and Component libraries
- Shared components in Configuration Data Management enables you to use a component across several applications.
For better organization, these shared components are managed in Component libraries. These component libraries improve consistency and maintainability by ensuring a single source of truth for a component's config data across applications.
- File nodes
- A file node is created when you attach a file to the config data model of a CDM app or a component library. It contains a link to the attached file. Using file nodes, you can attach files of any MIME type supported on ServiceNow AI Platform.