Serverless Application Center allows you to create applications based on your business scenarios. You can also import existing applications to Serverless Application Center. 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 of Serverless Application Center, various scenarios and application templates of different scenarios are displayed. You can click Details on the card of an application template to view the details and select an application template based on your business requirements.
Log on to the Function Compute console. In the left-side navigation pane, click Applications.
(Optional) On the Applications page, click Create Application.
This step is required only for users that have existing applications.
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.
On the Create Application page, select a deployment type and follow the on-screen instructions to configure parameters.
Deploy from Code Repository
Code is pushed to the specified repository to trigger a pipeline to deploy the application. When you update the project, you can push code to the remote repository for secure release.
After you grant permissions in the code repository, confirm the basic information such as the repository and trigger mode.
Confirm settings in the Advanced Settings and Environment Configurations sections.
Directly Deploy
Code is directly deployed. You must manage function resources if you want to maintain or update the project. Capabilities such as continuous integration and continuous deployment (CI/CD) must be manually configured.
If you select Directly Deploy to deploy your application, you do not need to grant permissions in a code repository because Function Compute does not store code in a specific code repository. This method is suitable only for a quick trial of an application.
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.
The preceding example describes how to use a code repository to quickly deploy an application. In actual usage scenarios, you can specify more custom settings for pipelines. For example, you can configure environment variables for builders and publishers and specify 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.
The application deployment takes a few minutes to complete. After the application is deployed, you can view the basic information and environment information about the application on the Application Details page. You can also click Access Domain Name in the Actions column to log on to the application system.
Import an application
You can host existing serverless applications that comply with Serverless Devs specifications to Serverless Application Center in Function Compute.
Log on to the Function Compute console. In the left-side navigation pane, click Applications.
(Optional) On the Applications page, click Create Application.
This step is required only for users that have existing applications.
On the Create Application page, select Import an Application from a Repository and then follow the on-screen instructions to configure parameters.
You need to only grant permissions in a repository and select the repository.
ImportantFollow 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.
Click Create and Deploy Default Environment.
The application deployment takes a few minutes to complete. After the application is deployed, you can view the basic information and environment information about the application on the Application Details page. You can also click Access Domain Name in the Actions column to log on to the application system.
View and update an application
On the Applications page in Serverless Application Center, you can view all existing applications. You can also click the name of an application to view details of the application.
An application is a combination of logical resources. Basic information and environments of the application are displayed on the application details page. Details of an application include the basic information such as the description, code source configurations, creation time, and environments.
On the Application Details page, 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, and pipeline-related configurations of an application, see Manage the environment of an application and Manage pipelines.
Delete an application
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.
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.
If other modules depend on the resources that you created in an application, errors may occur if you delete the application. Proceed with cautions. For example, if a function of an application is being used by a client or in another business logic, errors occur in the business logic that uses the function if you delete the application.
If resources in an application are changed by other entities, we recommend that you take necessary precautions when you delete the application. For example, an application creates a service in Function Compute, and a user creates other functions in this service. In this case, the service fails to be deleted. 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.