This topic describes how to use local files to create edge applications.
- Log on to the IoT Platform console. In the left-side navigation pane, choose .
- On the Applications page, click Create Application.
- On the page that appears, specify the parameters as prompted and click Confirm.
- Application Information
Table 1. Parameters Parameter Description Application Name The name of the edge application. The application name must be 1 to 128 characters in length, and can contain letters, digits, and underscores (_). Application Type The method that is used to create the edge application. The valid values are described as follows:
- Function Compute: This value indicates that the edge application is created by using Function Compute.
- Container Image: This value indicates that the edge application is created by using Container Registry.
- Local Upload: This value indicates that the edge application is created by using locally developed functions.
In this example, select Local Upload.
Programming Language The programming language that you use to develop the function. The supported programming languages are Node.js, Python, and C.Notice The functions that are created by using the Python programming language can be used only in edge instances of Link IoT Edge Pro Edition. Application Version The version number of the edge application. You cannot specify two identical version numbers for an edge application. Code Package The code file that you want to upload. To upload the code file that is locally created, click Upload File.Notice You can upload only a file that is in the .zip file format. Version Description The description of the edge application version. For example, you can specify the version features. This parameter is optional.
- Container Configurations
Table 2. Parameters Parameter Description Host Mode Specifies whether to isolate the container network from the host network. The valid values are described as follows:
- Yes: This value indicates that the container network is the same as the host network.
- No: This value indicates that the container network is isolated from the host network. If you select this option, you must configure the Network Port Mapping settings.
Network Port Mapping The mappings between host network ports and container network ports. This parameter is available only when Host Mode is set to No. The network where the function runs is isolated from the host network. You can map the listening port of the function in the container to a host network port. This allows client programs on various hosts to access the services that are provided by the function. You can specify a maximum of 10 entries.
For example, the
fc-http-serverfunction runs in a host container, and provides services by using socket port 80. The client programs on other hosts cannot access the
fc-http-serverfunction by accessing port 80 on the current host. To enable the client programs on other hosts to access the
fc-http-serverfunction, you must map the network port (port 80) in the container where the function runs to a host network port, such as port 8080. Then, the client programs on other hosts can access the
IP address:port 8080in the host network, and use the services provided by the
Specifies whether to enable the privilege mode. Root users of containers can access host services only as general users. If you want to change the system time or run the mount command in containers, you must be granted the required root permissions. In this scenario, you must enable the privilege mode for the containers.Note If you enable the privilege mode, applications and programs in the containers are granted the host root permissions, and all the host devices are mapped to the containers. Therefore, you do not need to configure the Device Mapping settings.
Device Mapping The device mappings. This parameter is available only when you select No for Privilege Mode. The network where the device management system resides is isolated from the host network. To enable a function to access a host device such as a serial interface, you must map the device to the container where the function runs. You can specify a maximum of 10 entries. Volume Mapping The volume mappings. The network where the file system resides is isolated from the host network. To enable a function to access a host file, you must map the file to the container where the function runs. You can specify a maximum of 10 entries.
- Application Information
- View the edge application that you have created. You can choose Applications page. You can also manage the edge application by clicking the options in the Actions column.
, and view the edge application on the
- Manage versions
To manage versions, click Version Management. On the page that appears, you can create, modify, or delete versions based on your business requirements.
- Delete the edge application
To delete the edge application, click Delete. If you delete the edge application, all versions of the edge application are deleted. Proceed with caution.
- Manage versions