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
-
Click , select your application template, and then click .
-
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.
-
Provide the following information:
-
Specify a description.
- Required:
In the Resource Template list, select the resource template to use for
the environment.
-
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.
-
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.
-
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.
-
To prevent changes to snapshots in this environment after you deploy them, select the
Lock Snapshots check box.
-
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.
-
Select a color to apply to the environment.
-
To apply the component version and snapshot cleanup settings 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 snapshots, see Cleaning up snapshots.
To apply the component version cleanup settings 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 component versions. For
more information about cleaning up component versions, see Cleaning up component versions.
-
To apply deployment history cleanup, select the Use Deployment History
Cleanup checkbox.
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. For more information about cleaning up deployment history, see
Cleaning up deployment history files.
-
To apply process step logs cleanup, select the Use Process Step Log
Cleanup checkbox.
You can use the default settings that are specified on the
Systems
Settings page by clicking
Use Default Step Log
Retention, or in
Days to Retain Step Logs you can
specify a number of days to retain step logs. For more information about cleaning up
process step log, see
Cleaning up process step log files.
-
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.