Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Create new configurations.

  • Apply to existing configurations to update or modify them.

Creating a Template Configuration

To create Creating a template configuration in CDCM, follow these steps. Before starting, ensure that you have set up the necessary types for both the unit and the configuration.

Prerequisites:

  1. Unit Type with Template Property: Ensure there is a Unit Type with the "is template" property set to true. This can only be done when creating the unit type.

  2. Configuration Type for Templates:
    Confirm that there is a Configuration Type that also has the “is template” property set to true. This type must be associated with the unit template type created in the previous step.

  3. Associate Unit Type with Configuration Area:
    The Unit Type (which is a template type) must be associated with the Configuration Area where you plan to create the templates.

Steps to Create the Template Configuration:

  1. Create a Unit with the Template Type:
    After ensuring that the correct unit type is available, create a new unit using the template unit type.

  2. Create a Configuration within the Unit:
    Once the unit is created, proceed to create a Configuration within that unit.

  3. Baseline the Configuration:
    A template configuration has to be a baseline. Create a baseline from the newly created configuration.

  4. Transition the baseline to the "Valid Template" State:
    Template configurations must be in a "Valid Template" state in order to be used.

    • This state is a special type of "Closed Baseline" state, meaning all the rules and prerequisites for transitioning to a closed baseline also apply here.

    • The "is template" types come with a built-in "Valid Template" state and a default transition from the initial state to the "Valid Template" state. Additional valid template states and transitions can be created and configured as needed.

Once the template is created, users can modify its properties or add configuration items. Some modifications can only be done before the configuration transitions to the "Valid Template" state, as this state is also a "Closed Baseline" state.

Using the Template in a Configuration Area:

To use a template configuration within a specific configuration area, perform the following:

  • Associate the Unit with the Configuration Area:
    The unit containing the template configuration must be associated as an "Associated Template" in the configuration area where the template will be used.

After this the template can be used to create new configurations via the “add configuration” dialog in a unit:

...

Or it can be used to apply it to a existing configuration in the configuration context menu:

...

required administrative permissions. The process is described here.

Basic Template Use

After a template is created and enabled it can be used to create new configurations via the add configuration dialog in a unit:

...

Or it can be used to apply it to a existing configuration in the configuration context menu:

...

Template Tailoring

When creating a configuration from a template there are two options after the title for the new configuration was entered and a template configuration was selected.

image-20241204-153030.pngImage Added

When clicking create in the template usage dialog all configuration item that exist in the template configuration will be copied into the newly created configuration.

image-20241204-153538.pngImage Addedimage-20241204-153628.pngImage Added

As shown in the image above, when tailoring the template usage process, individual configuration items can be excluded. These will then not be copied from the template configuration. For each excluded configuration item a reason must be given.

Template Use Protocol

Template usage is documented in a separate tab on the configuration. There it is possible to see which template was used as well as the reasons for excluding configuration items.

...

Baseline Types

As described here baseline types are basically a label for configuration items. When using a template the baseline types can indicate if a configuration item came from a template or if it was manually added later.

...

In the image shown above the baseline types that are shown with a blue checkmark were present in those configuration items in the template configuration (e.g. Quality gate A, y and X for “Config Item C”). The baseline types shown with a green checkmark were added manually on this configuration (e.g. Quality gate y in “Config item E”)

Template Use and Concept Types

There are three factors that can influence the outcome when applying a template or using a template to create a new configuration:

  • the concept type of the configuration that was newly created or where the template was applied

  • the configuration concept type property “Associated Configuration Item Type”

  • the configuration concept type property “Associated Configuration Item Type From Template”

The sections shows how each of these influence the resulting configuration when using or applying a template.

Configuration Type

The type that a configuration will have when it is created by using a template is not determined by the template. It is configured in the type of the parent units concept type by setting the “Associated Configuration Type” property.

...

This configuration concept type decides which property values from the template will be copied to the new configuration. All property types, complex property types and reference types that appear in both the configuration concept type of the template and in the configuration concept type of the new configuration will be copied when the new configuration is created from the template.

“Associated Configuration Item Type” and “Associated Configuration Item Type From Template”

(warning)This section is about the two properties “Associated Configuration Item Type” and “Associated Configuration Item Type From Template”. Both mean the properties on the configuration concept type of new configuration that gets created when using a template. Not on the configuration concept type of the template itself (warning)

The configuration item concept type set in the “Associated Configuration Item Type” property is the type that configuration items have when:

  • they are created manually (so without the template process)

  • they are created via the template use (see section “Template tailoring”) but the “Associated Configuration Item Type From Template” property on the configuration concept type is empty

  • a template is applied to a configuration and there is no configuration item with the same title in the template configuration

If a configuration item concept type is set in the “Associated Configuration Item Type From Template” property in the configuration concept type then configuration items have this type in these two cases:

  • they are created when a new configuration is created from a template

  • they have the same title as a configuration item in the template when a template is applied

The image below illustrates the different scenarios:

...

Manually Set the Template Protocol

The template use protocol displayed in the “Template protocol” tab in the configuration is usually automatically created when a configuration is created by using a template or when a configuration was updated by applying a template. But because it is possible to create configurations directly by calling the cdcm API (see https://smartfacts.atlassian.net/wiki/spaces/CDCM/pages/174424065/Architecture#CDCM-Rest-backend) it is possible to manage information about how configurations should look like outside of cdcm (so called “external templates”). It is then possible when creating a configuration via the api to manually set the template protocol.

In that case the following three values when creating a configuration are relevant:

  • externalTemplateTitle - The title of the template that will be displayed in the “template use” tab on the configuration

  • externalTemplateLink - A link that leads to information about the used template

  • externalProtocolHtml - HTML for the content of the “template use” tab