Function Management
Scenario
FunctionGraph is a serverless function computing service on HUAWEI CLOUD. With IEF, you can quickly deploy functions created in FunctionGraph to edge nodes.
Currently, IEF supports only Python functions.
Creating a Function
Before creating a function on IEF, ensure that the function has been created and a new version has been published on FunctionGraph. For details on how to create a function on FunctionGraph, see Getting Started. For details on how to publish a function version, see Version Management.
- Log in to the IEF console.
- In the navigation pane, choose Edge Applications > Functions. Then, click Create Function in the upper right corner.
- Specify the function details. Figure 1 Creating a function
- Name: Select a function created in FunctionGraph. If there are no functions available, click Create Function on the right to create one.
- Running Mode: Select Remote control or Long-term running.
- Remote control: The function can be enabled or disabled in the cloud and can be managed throughout its lifecycle.
- Long-time running: The function will keep running on edge nodes.
- Click Create. The function is successfully created, and the function list is displayed.
Creating a Dependency
A dependency is a file that a function depends on to run. It can be bound to the function for dynamic updating. IEF supports function dependencies imported from OBS in .zip format. For details on how to use OBS, see Basic Operation Procedure.
- Log in to the IEF console.
- In the navigation pane, choose Edge Applications > Functions. Then, click Create Dependency in the upper right corner.
- Enter a dependency name and an OBS URL. Figure 2 Creating a dependency
- Name: Enter a dependency name.
- Storage Address: Enter the URL of a ZIP dependency file.
- Click Create. After the dependency is created, the dependency list page is displayed.
Configuring a Dependency
Dependencies need to be associated with edge functions so that they can be delivered together to edge nodes during application deployment.
- Log in to the IEF console.
- In the navigation pane, choose Edge Applications > Functions.
- In the Operation column of the function for which you want to configure a dependency, click Associate Dependency. Figure 3 Associating with a dependency
- On the Associate Dependency page, click Add Dependency. Figure 4 Adding a dependency
- On the Select Dependency page, select the dependency to be associated with the function, and click OK.
- Enter the alias of the dependency in Alias, and click OK.
All the associated dependencies are stored in the depends sub-directory of the function work directory on an edge node.

The specified alias is used as the sub-directory name in the depends sub-directory on the edge node. The dependency file is stored in the alias sub-directory.

Configuring Functions for an Edge Node
Functions need to be associated with an edge node before they can be delivered to an edge node.
- Log in to the IEF console.
- In the navigation pane, choose Edge Resources > Edge Nodes.
- Click the edge node to be associated with functions.
- On the node details page, click the Applications tab. Then, click Add in the Functions area. Figure 5 Function configuration
- Select a function name and version and click OK.
- Select the function to be deployed, and click Synchronize to Node. The function will be deployed to the edge node. Figure 6 Deploying a function
After the deployment is successful, the functions change to the Running state regardless of their running mode. A function can be in any of the following states:- Idle: The function is being deployed or failed to be deployed on the edge node.
- Running: The function has started and is running properly.
- Disabled: The function was successfully deployed but it has been stopped.
- Startup error: The function was successfully deployed but failed to start.
Remotely Controlling a Function
IEF allows you to enable and disable functions whose Running Mode is Remote control in the cloud.
On the Applications tab page of the edge node details page, you can use Stop or Enable in the Operation column of a function to disable or enable the function.
Last Article: Health Check Configuration
Next Article: Application Mesh
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.