Creating environment templates

When you create an application template, you can define environment templates that model environments for the applications that you create by using the application template.

Before you begin

Ensure that you have a resource template that describes the resource tree for this environment in the application. Include both the component tags that the application templates uses and agent prototypes. See Resource templates.

Some of the configuration options might be resticted based on the role assigned to you. Check with your administator, if you need a specific option enabled.

Create environment templates as follows:

Procedure

  1. Click Applications > Templates, select your application template, and then click Environment Templates > Create Environment Template.
  2. Specify the environment name.
    If you create an environment from this template, the environment is assigned this name by default. The name is used as part of the deployment process and typically corresponds to the target environment.
  3. Provide the following information:
    1. Specify a description.
    2. Required: In the Resource Template list, select the resource template to use for the environment.
    3. To set the environment security type, from the Type list, select the security type.
      The security type is automatically assigned to environments that you create when you create an application from a template. If you specify an environment template when you add an environment to an existing application, you must manually assign the security type.
    4. To grant teams access to the environment and set the security type for the environment template, click Add Teams, select values from the Team and Type lists, and click Add.
    5. To ensure that components cannot be deployed to the environment without first being approved, specify the Deployment Approvals information. If specified, Deploy enforces an approval process before the deployment can be deployed to the environment. Initial deployments are typically done in uncontrolled environments. After the deployment works as designed, you can configure an approval process as the application moves along the development pipeline. If you are setting up more than one environment, consider creating an approval process for at least one of them.
      You can apply two types of approvals to an environment, that is, external and manual approvals.
      • Specify a Resource Type to Run External Approval. You can select System Default for the values specified in the system settings, an Agent Pool to specify a group of agents, or an Agent.
      • Choose an existing External Approval Process to run. See Managing external approval processes for information about how external approval processes are created.
      • You can Exempt Processes from approvals even if it is required by an environment.
      • Enable Require Manual Approvals to allow approvals from users in a role specified by the approval process created for the environment. See Creating an approval process for information about how manual approval processes are created. To prohibit the user who makes an approval request from approving the same request, select No Self-Approvals.
    6. To prevent changes to snapshots in this environment after you deploy them, select the Lock Snapshots check box.
    7. If you selected the Lock Snapshots check box, from the Snapshot Lock Type list, select the lock type:
      • To lock only component versions, select Only Component Versions.
      • To lock snapshot configurations, select Only Configuration.
      • To lock both component versions and configurations, select Component Versions and Configuration.
      • To use the system default value, select System Default. The default value is determined by the Default Snapshot Lock Type field on the System Settings page. For information about system settings, see System settings.
    8. Select a color to apply to the environment.
    9. To apply the cleanup values that are specified on the System Settings page, select the Use Default Artifact Cleanup Settings check box.
      If this check box is cleared, you must specify how long to keep snapshots and component versions. For more information about cleaning up component versions, see Cleaning up component versions. For more information about cleaning up snapshots, see Cleaning up snapshots.
    10. To use deployment history cleanup, select Use Deloyment History Retention.
      You can use the default settings that are specified on the Systems Settings page by clicking Use Default Deployment History Retention, or in Days to Retain Deployment History you can specify a number of days to retain deployment history records.
  4. Click Save.
    Note:
    • If you create an environment with an environment template and then add component mappings to the resource template, the new component mappings are added to the environment. However, if you remove component mappings from the resource template, the component mappings are not removed from the environment.
    • Changes in a resource template structure are automatically picked up by the resource sync service but any change in the role properties of a resource template will not be synchronized.

Results

The Configuration tab for the environment template is displayed. When you use the application template to create an application, you can create environments by using this environment template.