Deploy .NET Core applications

更新时间:
复制 MD 格式

Package your .NET Core application into a ZIP file that meets Serverless App Engine (SAE) requirements, and then deploy the package to SAE.

Procedure

  1. On the SAE Application List page, select the target region and namespace in the top navigation bar, and then click Create Application.

  2. Select an application edition.

    Important

    The Lightweight Edition and Professional Edition are in an invite-only beta testing phase. If you are not part of the beta test, the application is created as the Standard Edition, and you do not need to select an edition.

    • Lightweight Edition: Provides the minimum feature set required to run an application. It does not support the Application Monitoring or Microservices Governance features.

    • Standard Edition: Includes the Basic Application Monitoring feature. The Advanced Application Monitoring and Microservices Governance features must be enabled and purchased separately.

    • Professional Edition: Includes the Advanced Application Monitoring and Microservices Governance features. They do not need to be enabled or purchased separately.

  3. On the Create Application page, set the Application Name and configure the following parameters.

    1. Select the namespace type for the application. A namespace is equivalent to a Kubernetes namespace and can be used to isolate resources in different environments. You cannot change the namespace of an application after it is created. Plan accordingly.

      • System Created: Use the default namespace, vSwitch, and security group created by the system in the current region.

      • Existing Namespace: Select the Namespace, vSwitch, and Security Group that you previously created.

    2. For Application Deployment Method, select Code Package-based Deployment and click Configure Code Package-based Deployment on the right. For Technology Stack Programming Language, select .NET Core. Select a .NET Core environment that is compatible with your code. Configure the following parameters and click OK.

      Parameters - Configure a .NET Core ZIP package

      Parameter

      Description

      Upload Method

      Upload a local code package or enter the URL of a code package.

      Version

      Enter a version number for the application or select Use Timestamp as Version Number.

      Time Zone Settings

      Select the time zone for the application.

      Startup Command

      Enter a startup command. Example:

      # The startup script ./start.sh in the ZIP package corresponds to /home/admin/start.sh in the SAE application instance runtime environment.
      /home/admin/start.sh

      Custom Runtime Environment Settings

      (Optional) After you enable this feature, you can pre-install tools, download or modify files, and install runtime dependencies or extensions for the application as needed.

      Customize The Runtime Environment Using The Command Line: The following are examples.

      CentOS-based runtime environment

      #!/bin/bash
      
      # Install vim
      yum install -y vim

      Debian-based runtime environment

      #!/bin/bash
      
      # Install vim
      apt install vim

      Alpine-based runtime environment

      #!/bin/bash
      
      # Install vim
      apk add vim
    3. In the Capacity Settings section, set Resource Type, Single Instance Type, and Instances.

      Metric description - Resource Type

      Resource Type includes Default and Hygon. Hygon is in an invite-only beta testing phase. If you are not part of the beta test, Resource Type is automatically set to Default, and you do not need to select it manually.

      To deploy an application using Hygon resources, contact the relevant technical staff in the DingTalk group (ID: 32874633) to enable it. You also need to select a region and zone that support Hygon resources:

      • Shanghai region: Supports Zone B, Zone G, and Zone L.

      • Beijing region: Supports Zone H and Zone I.

      • Hangzhou region: Supports Zone B.

  4. (Optional) Click Next: Advanced Settings and configure the required features.

    • Runtime Environment and Lifecycle Management

    • Network Access and Service Invocation

    • Data Persistence

      You can store application data in NAS, OSS, or a database to prevent data loss when an application is changed or stopped. Note: NAS, OSS, and databases require additional fees.

    • Logging and Monitoring

      • After you deploy an application, you can view real-time logs and view resource usage and payload without any additional configuration. You can also output logs to SLS or Kafka for centralized management and analysis. Note: SLS and Kafka require additional fees.

      • ARMS Monitoring helps you monitor your application's running status, quickly locate faulty and slow interfaces, identify performance bottlenecks, and reproduce invocation parameters. This significantly improves the efficiency of diagnosing online issues.

        • For Standard Edition applications, you can view ARMS Basic Edition monitoring data after deployment without additional configuration. In addition, you can purchase ARMS Premium Edition monitoring.

        • For Professional Edition applications, after you enable Application Monitoring in the Advanced Settings and complete the deployment, you can View ARMS Premium Edition Monitoring Data. No additional fees are required.

    • Other features

      • Microservices Governance provides Graceful Start and Shutdown, Traffic Protection, End-to-end Canary Release, and Intra-zone Provider First for Java applications.

        • For Standard Edition applications, you can go to the application details page after deployment to enable and purchase the MSE Microservices Governance feature.

        • For Professional Edition applications, after you enable Microservices Governance in the Advanced Settings, you can configure Graceful Shutdown and Graceful Start. For more features, go to the application details page after deployment. No additional fees are required.

      • You can enable the CPU Burst feature (available only for Standard and Professional editions) to prevent resource waste. This feature is useful when an application requires higher CPU specifications during its startup and loading phase than during normal operation.

      • You can decouple and standardize non-business features from the main container by adding a Sidecar container.

      • You can enable RRSA identity authentication to implement instance-level API permission control and avoid the risk of key leakage from traditional key-based authentication methods.

  5. Click Create Application with One Click or Create Application.

    • The application takes about 1 to 2 minutes to create. You can check the change records to verify that the deployment was successful. If the deployment fails, an application instance is not created. You can troubleshoot the issue using the error message in the Change Details.

    • You can view the created application on the Applications > Applications page. To change the application configuration after deployment, click the target application to go to its details page. Then, in the top navigation bar, click Deploy Application or Modify Application Configurations. Note that the application automatically restarts for the new configuration to take effect. We recommend that you perform this operation during off-peak hours.

    • You can log on to an application instance using Webshell and interact with the application instance using console commands.

    • After you create an application, you can manually adjust the number of instances and the instance type, or automatically adjust the number of instances by configuring an Auto Scaling policy. You can also reduce costs by enabling idle mode.