All Products
Search
Document Center

Function Compute (2.0):Manage applications

Last Updated:Oct 26, 2023

Serverless Application Center allows you to create and import applications based on your business scenarios. This topic describes how to manage scenario-based applications in Serverless Application Center in the Function Compute console, including how to create, import, view, update, and delete an application.

Create an application

On the Create Applications page in the Function Compute console, various scenarios and scenario-based applications are displayed. You can click Details on the card of an application to view the application details and select an application based on your business requirements.

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

  2. (Optional) On the Applications page, click Create Application.

    This step is required only for users that have existing applications.

  3. On the Create Application page, click Use a Template to Create an Application. In the template section, find the application template that you want to use to create an application, move the pointer over the card of the template, and then click Create Now.

  4. On the Create Application page, select a deployment type and follow the on-screen instructions to configure the parameters.

    • Deploy from Code Repository

      The code is pushed to the specified repository to trigger the pipeline to deploy the application. When you update the project, you can push the code to the remote repository for secure release.

      1. After you grant permissions to the code repository, confirm the basic information such as the repository and trigger mode.choose-github-createapp1

      2. Confirm the configurations in the Advanced Settings and Environment Configurations sections.choose-github-createapp2

    • Directly Deploy

      The code is automatically deployed online. When you maintain or update the project, you must manually manage function resources. For example, you must configure capabilities such as continuous integration (CI) and continuous delivery (CD).

      If you use the Directly Deploy method to deploy your application, you do not need to grant permissions to a code repository because Function Compute does not store the code in a specific code repository. This method is suitable only for quick trial on applications.

      choose-direct-createapp
  5. Click Create and Deploy Default Environment.

    • Deploy from Code Repository

      If you selected this method, the following steps are included in the application creation process: synchronize the template to the specified code repository, create an application, create an environment, and trigger a pipeline.

      create-pro1

      The preceding example describes how to use a code repository to quickly deploy an application. In actual usage scenarios, you can specify custom content for the pipeline for more advanced settings. For example, you can configure environment variables for the builder and publisher or the execution process.

    • Directly Deploy

      Compared with the Deploy from Code Repository method, the Directly Deploy method allows you to create applications in fewer steps.

      create-pro2

    The application deployment takes a few minutes to complete. After the application is deployed, you are redirected to the Application Details page. On the Application Details page, you can view the basic information and environment information about the application. You can also click Access Domain Name in the Actions column to log on to the application.result1

Import an application

You can host existing serverless applications that comply with the Serverless Devs specification to Serverless Application Center in Function Compute.

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

  2. (Optional) On the Applications page, click Create Application.

    This step is required only for users that have existing applications.

  3. On the Create Application page, select Import an Application from a Repository and then follow the on-screen instructions to configure parameters.

    import-app

    You need to only grant permissions to a repository and select the repository.

    Important

    Follow the on-screen instructions to select a standard Serverless Devs application repository. The repository must contain the s.yaml file. You cannot select a repository that is associated with another application.

  4. Click Create and Deploy Default Environment.

    The application deployment takes a few minutes to complete. After the application is deployed, you are redirected to the Application Details page. On the Application Details page, you can view the basic information and environment information about the application. You can also click Access Domain Name in the Actions column to log on to the application.

View and update an application

On the Applications page in the Function Compute console, you can view all existing applications. You can also click the name of an application to view the application details.

An application is a combination of logical resources. Information about an application includes the basic information and environments. The details of an application include the basic information such as the description, code source configurations, creation time, and environments.

On the Application Details page in the Function Compute console, you can update the information about an application by following the on-screen instructions. If the code source is changed, the deployment of the application is affected, and you cannot roll back the application to an earlier version. For information about how to update the business logic, environment-related configurations, or pipeline-related configurations of an application, see Manage the environment of an application and Manage pipelines.update-app

Delete an application

To delete an application, perform the following steps: Log on to the Function Compute console. In the left-side navigation pane, click Applications. On the page that appears, find the application that you want to delete and click Delete in the Actions column.delete-app

In the Delete Application dialog box, you can view the resources in the application, including pipelines, Function Compute services and functions, and code repository resources.

Warning
  • If other modules depend on the resources that you created in an application, errors may occur when you delete the application. We recommend that you take necessary precautions when you delete an application. For example, if a function in an application is being used by a client or in another business logic, errors may occur in the business logic that uses the function if you delete the application.

  • If the resources in an application are changed, we recommend that you take necessary precautions when you delete the application. For example, if you create a Function Compute service in an application by using the Function Compute console but a function by using a method other than the console, you cannot delete the service. In this case, you can determine whether the resource change meets your business requirements. If the resource change does not affect your business, you can manually delete the service.