Manage applications

更新时间:
复制 MD 格式

The Alibaba Cloud Serverless Application Center provides scenario-based application creation and import capabilities. This topic describes how to manage applications in the Serverless Application Center of the Function Compute console. Tasks include creating, importing, viewing, updating, and deleting applications.

Create an application

On the Create Application page in the Application Center, you can view multiple scenarios and scenario-based applications. Click Details on any application card to view its details, then choose a suitable application based on your business needs.

  1. Log on to the Function Compute console. In the navigation pane on the left, click Applications.

  2. Optional: On the Applications page, click Create Application.

    Only users who have previously created an application need to perform this step.

  3. On the Create Application page, select Create Application from Template. In the template area below, find your target application template, hover over its card, then click Create Now.

  4. On the Create Application page, select a deployment type and fill in the configuration items as prompted.

    • Deploy from Code Repository

      Push code to a specified code repository to trigger pipeline deployment. For future updates, push code directly to the remote repo for secure publishing.

      1. After authorizing the code repository, confirm basic information such as Repository and Trigger Method. Set Repository Type to Github, enter the Repository Owner/Organization, and in New Repository, enter png-compress-awmu and check Set as Private Repository. For Trigger Method, select Push code to default branch (master). Enter png-compress-awmu for Application Name and High-quality PNG image compression based on pngquant for Description. Use AliyunFCServerlessDevsRole for Role Name. This role includes multiple access policies such as AliyunOSSFullAccess and AliyunFCFullAccess.

      2. Confirm advanced and environment configurations. In the Advanced Configuration section, set Region to China (Hangzhou) and enter png-compress for both Service Name and Function Name. In the Environment Configuration section, select Quick Setup for Pipeline Configuration Scheme and Push to Specified Branch to Trigger for Application Deployment Trigger Method, then enter master for the branch.

    • Direct Deployment

      Code is deployed online immediately. For future updates and maintenance, you must manually manage functions and other resources and integrate CI/CD capabilities yourself.

      Direct deployment does not require code repository authorization, and the Function Compute platform does not store sample code in any specified repository. Use this method only for quick application testing.

      Select Direct Deployment as the deployment type. Enter an Application Name (for example, png-compress-t3t5) and a Description (for example, "High-quality PNG image compression based on pngquant"). The default Role Name is AliyunFCServerlessDevsRole, which is associated with access policies including AliyunOSSFullAccess, AliyunECSFullAccess, AliyunNASFullAccess, and AliyunFCFullAccess. Click Add Policy as needed. In the Advanced Configuration section, select a Region (for example, China (Hangzhou)) and enter a Service Name and Function Name (for example, png-compress).

  5. Click Create and Deploy Default Environment.

    • Deploy from Code Repository

      The application creation process includes synchronizing the code repository (syncing the template to your specified repository), creating the application, creating the environment, and triggering the pipeline.

      The process also includes creating a webhook and creating a version. After completion, the system automatically redirects to the deployment page.

      The preceding steps show how to quickly deploy an application using a code repository. During actual operations, you can customize pipeline content for more advanced configurations. For example, configure a DingTalk Robot, set environment variables for build and release machines, or configure execution flows.

    • Direct Deployment

      Compared with Deploy from Code Repository, Direct Deployment involves fewer steps and deploys faster.

      After the application is created, the page displays success messages in sequence: Application created successfully, Pipeline created successfully, and Deployment version created successfully. The system then automatically redirects to the deployment page (or click Go Now to redirect manually).

    After a few minutes, the application deployment completes. On the application details page, you can view basic and environment information. You can also click Endpoint in the Actions column to log on to the corresponding application system. After deployment, in the environment list on the application details page, the Default Environment shows Test as the environment type and Deployed Successfully as the deployment status.

Import an application

Function Compute also supports hosting existing Serverless applications that comply with the Serverless Devs specification in the Serverless Application Center.

  1. Log on to the Function Compute console. In the navigation pane on the left, click Applications.

  2. Optional: On the Applications page, click Create Application.

    Only users who have previously created an application need to perform this step.

  3. On the Create Application page, select Import Application from Repository, then fill in the configuration items as prompted.

    Configuration items include the following: Repository Type (supports Github, Gitee, public GitLab, internal GitLab, and Apsara DevOps Codeup), Repository Owner/Organization, Repository Name, Trigger Method (default: Push code to default branch (master)), Application Name (must start with a letter; can contain letters, digits, and hyphens; case-sensitive; less than 64 characters), Description, and Role Name (default: AliyunFCServerlessDevsRole, associated with multiple access policies including AliyunOSSFullAccess, AliyunFCFullAccess, AliyunLogFullAccess, AliyunNASFullAccess, AliyunVPCFullAccess, AliyunECSFullAccess, and AliyunContainerRegistryFullAccess; click + Add Policy to append more).

    You only need to complete repository authorization and select the target application repository.

    Important

    Select a standard Serverless Devs application repository as instructed by the interface. It must contain the s.yaml file and must not be associated with another application.

  4. Click Create and Deploy Default Environment.

    After a few minutes, the application deployment completes. On the application details page, you can view basic and environment information. You can also click Endpoint in the Actions column to log on to the corresponding application system.

View and update an application

On the Application Center page, you can view all applications in the application list. Click any application name to view its details.

An application is a logical resource that represents basic application information and one or more environments. Application details include basic information such as description, code source configuration, creation time, and environment information.

On the application details page, update basic application information as guided by the interface. Changing the code source affects actual application deployment and makes historical deployment versions unrecoverable. To update business logic, environment-specific settings, or pipeline configurations for a specific environment, see Manage environments and Manage pipelines. On the Edit Application Basic Information page, enter a Description (for example, "Short URL generator"), select a Repository Type (supports Github, Gitee, public GitLab, internal GitLab, and Apsara DevOps Codeup), and configure the Repository Owner/Organization and Repository Name (for example, anycodes/dwz-onl; status must show "Active"). Note the yellow warning: changing the code source affects actual deployment and makes historical versions unrecoverable.

Delete an application

Log on to the Function Compute console. In the navigation pane on the left, click Applications, then click Delete in the Actions column next to the target application. Follow the prompts to delete applications you no longer need. On the confirmation page, the system lists associated resources (such as Environments and Pipelines) and displays a yellow warning that these resources might be reused by other applications—proceed with caution. Check the associated resources you want to delete, then check I understand the risks of deleting these resources and still want to delete the selected resources, and click Delete Application and Selected Resources to complete the operation.

In the deletion dialog box, you can view all resources involved, including pipelines, Function Compute services and functions, and code repository resources.

Warning
  • If resources created by the application are depended on by other modules, delete them with caution. For example, if an application creates a function currently used by a client or other business logic, deleting the function breaks that logic.

  • If resources involved in the application have been modified, delete them with caution. For example, if an application creates a Function Compute service and you later add other functions to that service through another channel, deleting the service fails. In this case, manually verify whether the resource changes match your expectations. Only delete the service manually if it does not affect existing business.