Deploying the Function Application Using a Template
Application Center uses Resource Formation Service (RFS) to deploy peripheral resources (including functions, agencies, and triggers) required by applications so that these resources can cooperate with each other to execute tasks
Overview
FunctionGraph provides function templates for different scenarios. When you create a function using a template, the template automatically configures the function code, environment variables, and triggers.
You can filter function templates by runtime and scenario. Click Learn More of a function template to view the usage description and precautions of the template as shown in Figure 1.
Billing
You are not charged for creating applications. However, other cloud service resources may be created during application creation. For details about the billing of other cloud services, see the billing description of each cloud service.
Notes and Constraints
Currently, the application center is supported only in the CN North-Beijing4, CN East-Shanghai1 regions.
Prerequisites
If FunctionGraph needs to access other cloud services such as LTS and VPC, you need to create an agency and assign permissions by referring to Creating a Function Agency
Creating an Application
- Log in to the FunctionGraph console. In the navigation pane, choose Apps.
- Click Create in the upper right corner. The Templates page is displayed.
- The Django template is used as an example. After selecting the template, click Create Application, as shown in Figure 2. The application configuration page is displayed.
- On the Create Application page, set basic information by referring to Table 1 and click Create Now.
Table 1 Parameters in the Django template Parameter
Description
Example Value
Template
The selected function template is displayed by default.
To change it, click Reselect.
Django
Region
Region where the function application is created.
By default, the current region is selected. To change it, return to the FunctionGraph console and switch the region in the upper left corner.
CN East-Shanghai1
Application Name
Enter a function application name.
The value can contain 2 to 60 characters, starting with a letter and ending with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed.
django-framework
Runtime
The runtime language of the function application template, which cannot be changed.
http
Agency
Select an agency for FunctionGraph.
If Use no agency is selected, the system will use agency fgs-app-adminagency, or create it if not available.
fgs-app-adminagency
Create Repository
When enabled, you can create a code repository in CodeArts Repo to update and deploy your application code.
Enabled
Project
The CodeArts Req project where a code repository will be created. A new project will be created if this is not specified.
-
Description
Enter a description of the application. The description can contain a maximum of 1,024 characters.
-
APIG Instance
Select an available APIG gateway. If no gateway is available, click Create Instance on the right to go to the creation page.
apig-fg
- After the application is created, the required function resources and gateway resources are automatically created, as shown in Figure 3. You can click the link under Physical Resource Name/ID to go to the resource details page.
Common Problems and Troubleshooting Methods
Issue |
Troubleshooting Method |
---|---|
The code repository fails to be created, and the message shown in Figure 4 is displayed.
|
Check whether CodeArts is enabled for your account. For details, see Login Methods to check and enable CodeArts. If the problem persists, submit a service ticket to contact Huawei Cloud FunctionGraph engineers for further help. |
The stack fails to be deployed, and the message shown in Figure 5 is displayed.
|
|
If the permission is insufficient, the message shown in Figure 9 is displayed.
|
If an error message indicating insufficient permissions is displayed when you create an application for the first time, configure the agency permission for the current account by referring to Configuring Agency Permissions and try again. |
If the deletion fails, the message shown in Figure 10 is displayed.
|
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot