CADT templates
Introduction
Cloud Architect Design Tool (CADT) saves some typical or common application configurations as templates. You can quickly create applications based on templates without the need to start from scratch. This way, you can save time and improve work efficiency.
Types
Currently, CADT provides the following three types of templates:
Official templates: The CADT service team develops official templates based on their customer service experience in cloud migration and provides the official templates for you to use.
Custom templates: You can save your own commonly used applications and configurations as templates so that you can use the templates in your own projects. You can share your templates with specified users by using the template sharing feature.
Partner templates: Partners of Alibaba Cloud provide CADT templates for you to use.
Template variables
Background information
When you create an application based on a template, the application copies the resource configurations in the template. Therefore, all applications created based on the same template have the same configurations. However, you may want to deploy different applications based on your diverse requirements of production environments. For example, you want two applications created based on the same template to have different Elastic Compute Service (ECS) configurations and different disk volumes. If a template needs to be re-customized due to different configurations of certain resources in an application architecture, the original purpose of templates is defeated.
Solution
Template variables are introduced to help you flexibly configure templates. Certain properties of resources are defined as variables in templates. When you use templates to create applications, you can set values for these variables to create applications with different configurations.
Template variables are applicable for only creating applications by calling the API operations of CADT. CADT supports the following types of template variables:
Local template variable: A local variable is bound to a certain property of a resource. For example, the name of an ECS instance or the billing method of an ApsaraDB RDS instance can be defined as a local variable.
Global template variable: A global variable is not bound to a certain property of a resource. However, a global variable can be used to specify values for multiple local variables in different nodes. For example, you set the ${sys} global variable to ERP. You can use ${sys} to specify values for the ${name} local variable in both ECS nodes and RDS nodes at a time. Then, the same suffix is added to the names of the corresponding instances.
For more information about how to configure template variables, see Configure template variables.