Component templates

Component templates enable you to save and reuse component processes and properties, and create new components from them. Template-based components inherit the template properties and processes.

Create component templates

When you have multiple Deployment Automation servers, such as test and production servers, you can create and validate component templates on the test server, then export the templates, and later import them to the production server.

To create a template:

  1. In Deployment Automation, navigate to Management > Components.

  2. Select the Component Template tab and click Create.

  3. In the Create Component Template dialog box, provide the following details:

    Field Description
    Name Enter a name for the template.
    Description

    (Optional) Provide additional information about the template.

    Source Config Type

    (Optional) Select the source configuration type (SCT) to define the location from which to load the artifacts. Then specify the options for the selected SCT. For details, see Use source configuration types.

    All component artifacts must have the same source configuration type.

  4. Click Save.

    To create another component template, click Save and New.

    To start configuring the component template you just created, click Build Out.

You create processes for templates in the same way as for components. For details, see Create and design component processes.

For details on how to create components from templates, see Create components.

Back to top

Add component template properties

Component template properties ensure that every component created from a template has the same properties. You can add properties one at a time or in a batch.

To add component template properties:

  1. In Deployment Automation, navigate to Management > Components > Component Templates.
  2. Select a template and click the Properties tab.
  3. Select the tab for the type of component template properties you want to add:

    Type Description
    Properties These general user-defined properties can be applied in scripts and plugins. Properties inherited from templates cannot be modified on the component level. If you change the value, it is reflected in all components created from the template.
    Component Property Definitions These properties are set for every component. When you create a component using this template, the property is displayed in the Create Component dialog box. A value defined here can be changed by created components.
    Environment Property Definitions These properties are set for every environment that uses a component created by this template. The properties are listed on the environment's Component Mapping page:
    Applications > [select application] > Environments > [select environment] > View Details > Component Mapping > Properties.

    A value defined here can be changed by environment.
    Version Property Definitions These properties are set for every version of the component.
  4. Add one or more properties:

    Note: For component, environment, and version property definitions, you must add properties one by one. For general properties, you can use the Batch Edit option and add multiple properties at once.

    • To add a single property, click Add Property. In the Add Property dialog box, specify the following details:

      Field Description
      Name Enter a name for the property.
      Description (Optional) Enter additional information about the property.
      Label (Optional) For component, environment, and version property definitions, enter a label to be associated with the property in the user interface.
      Required (Optional) For component, environment, ans version property definitions, select this option if you want the property to be required.
      Secure (Optional) For general properties, select this option if you want the property to be secure.

      Secure properties are stored encrypted, and their values are displayed obscured in the Deployment Automation user interface.
      Type

      For component, environment, ans version property definitions, select the type of expected value:

      • Text. Enables you to enter text characters. This is the default type.
      • Text area. Enables you to enter an amount of text.
      • Check box. Displays the check box. If selected, a value of true is used. Otherwise, the property is not set.
      • Select. Requires one or more values to be selected from the list. Enables a single selection.
      • Multi select. Requires one or more values to be selected from the list. Enables multiple selections.
      • Secure. Used for passwords. It is similar to Text, except the values are displayed obscured.
      Value/Default Value (Optional) Enter the value of the property (if any).
    • To add multiple general properties, click Batch Edit. In the Edit Entry dialog box, specify each property on a new line in the following format:

      Format Description
      myProperty
      myProperty=

      Use this syntax to specify properties without values. For example, for the port property, enter:

      port
      or
      port=

      Note: When you save properties without values, the system automatically changes the myProperty syntax to myProperty=

      myProperty=value

      Use this syntax for properties with values, for example:

      host=myServer
      port=8080

      Note: The following batch editing restrictions apply:

      • You cannot set the Secure option. If you want the properties to be secure, edit them individually as described in the earlier section.
      • The value cannot contain the equals sign (=).
  5. Click Save.

To edit a property, click the Edit icon next to the property.

Back to top

Export component templates

When you export a component template, the system creates a JSON file that contains the template's configuration information, properties, and processes.

To export a component template:

  1. In Deployment Automation, navigate to Management > Components.

  2. Select the Component Templates tab.

  3. In the list of component templates, click the Export icon next to the template.

    You can load the file into a text editor or save it. If you save it, a file is created with the same name as the selected component template, for example, helloWorldTemplate.json.

Back to top

Import component templates

When importing a component template, you can create an new template or upgrade an existing one.

To import a component template:

  1. In Deployment Automation, navigate to Management > Components.

  2. Select the Component Templates tab and click Import.
  3. To upgrade an existing template, select Upgrade Template.

    If the template's name in the JSON file (not the name of the file itself) matches an existing template, the template is upgraded. If the name is not found, the command has no effect.

    Note: The template's name is the first parameter in the JSON file, for example:

    "name": "helloWorldTemplate"

  4. From the Process Plugins Import Type list, select how you want to import plugin steps in processes.

    The following options are available.

    Option Description
    Import processes as is Select this option to import processes without changes.

    If a process uses a plugin that is not available on the target sever, the import fails.
    Upgrade processes to latest plugins

    Leave this option selected to upgrade all imported plugin steps to a later plugin version available on the target server.

    You don't need to have current plugin versions if more recent versions are available on the target server.

    This is the default option.

    Ignore missing plugins Select this option to import processes even if they use plugins that are missing from the target server.
  5. In the Choose File field, navigate to the JSON file containing the template.
  6. Click Import.

Back to top

See also: