In Enterprise Distributed Application Service (EDAS), you can use an application template to apply the same application configurations to multiple applications across Kubernetes clusters. This allows you to implement cross-cluster application release and management and continuous application O&M.

Prerequisites

Create an application template

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Application Templates. On the Application Template page, click Create Template.
  3. In the Basic Information step of the Create Template wizard, set the parameters that are described in the following table and click Next.
    Parameter Description
    Select Application The runtime environment of an application. You must select a runtime environment based on the type of the deployment package that you want to use.
    • Custom: Select this option if you want to use an image to deploy an application. If you select Custom, you do not need to select a runtime environment. The image that you use specifies a runtime environment.
    • Java: Select this option if you want to use a universal JAR package to deploy a Dubbo or Spring Boot application. You can set the Java Environment parameter after you select this option.
    • Tomcat: Select this option if you want to use a universal WAR package to deploy a Dubbo or Spring application. You can set the Java Environment and Container Version parameters after you select this option.
    • EDAS-Container (HSF): Select this option if you want to use a WAR or fat JAR package to deploy a High-Speed Service Framework (HSF) application. You can set the Java Environment, Pandora Version, and Ali-Tomcat Version parameters after you select this option.
    Service Registration and Discovery The O&M method for your service registry. For more information, see Select an O&M method for your service registry.
    Monitoring and Governance Solution The microservices monitoring and governance solution. By default, a Java agent is mounted to the application runtime environment for a Kubernetes cluster to implement fine-grained monitoring. In addition, EDAS provides complete solutions for microservices governance, such as canary releases, service authentication, and throttling and degradation.
  4. In the Template Configuration step, configure basic information for the application template.
    • Create an application template by using a custom image
      Parameter Description
      Template Name The name of the application template. The name must start with a lowercase letter and can contain lowercase letters, digits, and hyphens (-). The name can be up to 63 characters in length.
      Template Description The description of the application template. The description can be up to 128 characters in length.
      Select Image
      • The image that you want to use to create the application template. You can set the Alibaba Cloud Container Registry parameter to Current Account.

        In this case, you must also set the Region, Container Registry, Image Repository Namespace, and Image Repository Name parameters and select an image and its version.

      • You can also set the Alibaba Cloud Container Registry parameter to Other Alibaba Cloud Accounts.
      Note Before you use the images in a repository of Container Registry Enterprise Edition to deploy applications as a RAM user, the RAM user must obtain the required permissions from the relevant Alibaba Cloud account. For more information, see Configure policies for RAM users to access Container Registry.
      Total Pods The number of pods on which you want to deploy an application.
      Single-pod Resource Quota The amount of CPU and memory resources that you want to reserve for a pod. To set a limit, enter a numeric value. The default value 0 indicates that no limit is set on the CPU and memory quotas.
    • Create an application template by using a JAR package, a WAR package, or a deployment package of another type
      Parameter Description
      Template Name The name of the application template. The name must start with a lowercase letter and can contain lowercase letters, digits, and hyphens (-). The name can be up to 63 characters in length.
      Template Description The description of the application template. The description can be up to 128 characters in length.
      File Uploading Method The method that you want to use to upload a package.
      • If you set the Select Application parameter to Java, set the following parameters:
        • Upload JAR Package: Select and upload the JAR package that you have downloaded.
        • JAR Package Address: Enter the path of the JAR package.
      • If you set the Select Application parameter to Tomcat, you can use one of the following methods:
        • Upload WAR Package: Select and upload the WAR package that you have downloaded.
        • WAR Package Address: Enter the path of the WAR package.
      • If you set the Select Application parameter to EDAS-Container (HSF), you can use one of the following methods:
        • Upload Deploy Package: Select and upload the deployment package that you have downloaded.
        • Deploy Package Address: Enter the path of the deployment package.
      Version The application version number. You can specify a custom version number or click Use Timestamp as Version Number to generate a version number.
      Time Zone The time zone for an application. If you set the Select Application parameter to EDAS-Container (HSF), this parameter is not available.
      Total Pods The number of pods on which you want to deploy an application.
      Single-pod Resource Quota The amount of CPU and memory resources that you want to reserve for a pod. To set a limit, enter a numeric value. The default value 0 indicates that no limit is set on the CPU and memory quotas.
  5. Click Next. In the Template Advanced Configuration step, set parameters as required to configure the advanced settings such as scheduling rules, startup commands, and environment variables, and click Next. In the The template is created step, confirm the information about the application and click Confirm.
    For more information about the advanced settings of an application template, see the following topics:

    If you do not need to configure the advanced settings, click Create Template in the Template Configuration step.

  6. In the Note message, click OK.
    On the Application Template page, you can view the created application template.

What to do next

On the Application Template page, you can perform the following operations as required:
  • View the details of an application template: Find the application template that you want to view and click Details in the Actions column.
  • Use an application template to create one or more applications: Find the application template that you want to use and click Create Application in the Actions column. For more information, see Applications are created across clusters by using an application template..
  • Modify an application template: Find the application template that you want to modify and click Edit in the Actions column. For more information, see Step 5 and Step 6 in this topic.
    Note
    • After you modify an application template, applications that have been created based on this template before the modification are not updated until the applications are deployed.
    • For an application that is created based on an application template, if you first modify specific settings of the application and then modify the corresponding settings in the application template, the modification of the application template does not take effect on the application.
  • Delete an application template: Find the application template that you want to delete and click Delete in the Actions column.
    Note Before you delete an application template, you must delete the applications that are deployed across clusters based on the application template.