Purchased drivers

更新时间:
复制 MD 格式

This topic describes how to view and use purchased drivers.

Prerequisites

An edge instance has been created and its gateway is online. For more information, see Environment setup.

Limits

IoT Edge does not support purchasing new drivers or repurchasing existing drivers. This topic applies only to users who have already purchased drivers.

Procedure

  1. Log on to the IoT Edge console.
  2. In the navigation pane on the left, click Driver Management, and then click the Purchased Drivers tab to view your purchased drivers.
  3. Assign a purchased driver to an edge instance.
    1. In the navigation pane on the left, click Edge Instances. Find the target edge instance and click View in the Actions column.
    2. On the Instance Details page, click the Devices and Drivers tab, and then click the + icon to the right of All Drivers.
    3. In the Assign Driver panel, select Purchased Driver and click Assign next to the driver name.
    4. (Optional) On the Devices and Drivers tab, in the Device List section for the assigned driver, click Driver Configuration to configure the driver. After you complete the configuration, click OK.
      Table 1. Driver configuration parameters
      Parameter Description
      Configuration format The configuration format can be one of the following:
      • Key-value pairs
      • JSON format
      • Configuration file
      Key-value pair table Configuration format is set to Key-value pairs.

      Click Add Configuration and set Configuration Name, Value, and Comment to configure the driver.

      You can add up to 100 key-value pairs.

      Configuration content Configuration format is set to JSON format.

      Enter the configuration content in JSON format. The content size cannot exceed 1 KB. The system automatically validates the format as you type. If the format is incorrect, follow the system prompts to correct it.

      Upload configuration file Configuration format is set to Configuration file.

      You must create a configuration file on your local machine and upload it. For information about how to create a configuration file, see Driver encoding.

    5. (Optional) To the right of Device List, click Container Configuration to configure the container for the driver. After you complete the configuration, click Save.
      Note The Container configuration option is available only for Professional Edition Professional Edition
      Parameter Description
      Use Host Network Specifies whether to isolate the container's network and use the host network environment directly.
      • Yes: The container's network is not isolated. The host network is used directly.
      • No: The container's network is isolated. You must configure Port Mapping.
      Port Mapping This parameter appears when Use Host Network is set to No. The network environment of the function is completely isolated from the host environment. Through port mapping, you can map the listening port of the function in the container to a port on the host. This allows client programs on different hosts to access the service provided by the function. You can map up to 10 network ports.

      For example, the fc-http-server function runs in a container on the host and provides services on port 80. In this case, client programs on other hosts cannot access the fc-http-server function by accessing port 80 of the host. Therefore, you need to map the container port of the fc-http-server function to a port on the host. For example, map port 80 in the container to port 8080 on the host. This allows client programs on other hosts to access the fc-http-server function in the container by accessing Host IP address:8080.

      Enable Privileged Mode

      The root user in a container is actually a regular user on the host. To perform operations that require root permissions inside the container, such as modifying the system time or using the mount command, you must grant the container privileged mode.

      Note In privileged mode, the container has root permissions on the host. All host devices are mapped to the container by default. You do not need to configure Device Mapping.
      Device Mapping This parameter appears when Enable Privileged Mode is set to No. The device management system is completely isolated from the host environment. When a function needs to access a host device, such as a serial port, you must map the device to the container where the function runs. You can add up to 10 device mappings.
      Volume Mapping The file system is completely isolated from the host environment. When a function needs to access a host file, you must map the file to the container where the function runs. You can add up to 10 volume mappings.
      Memory Limit Set the maximum memory for the container.
      • If the container's memory usage exceeds the limit, the container is restarted.
      • If the memory limit is too small, the application in the container may fail to run.

      The default memory is 1024 MB. Increase the memory limit based on the size of the application in the container.

    6. Click Assign Sub-devices to assign sub-devices to the edge instance under the purchased driver.
    7. (Optional) After you assign a sub-device to the edge instance, click Device Configuration in the Actions column for the sub-device. For example, you can set the sub-device serial number to help the driver process information for that specific sub-device.

      Enter the configuration content in JSON format. The content size cannot exceed 1 KB. Click Validate Format. After the format is validated, click OK to complete the configuration.

  4. Deploy the edge instance.
    1. On the Instance Details page, click Deploy in the upper-right corner. In the dialog box that appears, click OK.
    2. The instance is deployed when the deployment status changes to Deployed. You can click View Logs to view the deployment details.