This topic describes how to build the runtime environment on Ubuntu 16.04 for the Lite edition of Link IoT Edge (LE Lite).
Prerequisites
The remote access feature of Link IoT Edge depends on the SSH service of the device. You must have the SSH service enabled on the device. For more information about SSH, see OpenSSH.
Ensure that the local loopback port of the device is open. You can run the ping 127.0.0.1 command on the device, the port is open if the returned result is normal.
Create an edge instance and a gateway
- Log on to the Link IoT Edge console.
- In the left-side navigation pane, click Edge Instances.
- Create an edge instance.
- Click Create Instance. In the Create Instance dialog box, enter an instance name.Note The instance name must be 1 to 20 characters in length, and can contain letters, digits, underscores (_), and hyphens (-).
- In the Gateway Products section, click Create Gateway Product to create a gateway for the instance.Gateways in Link IoT Edge provide edge computing capabilities. Each instance must be associated with a gateway device. A gateway device can be associated with only one edge instance at a time.
- In the Create Product dialog box, set the required parameters and click OK.Create Gateway Product in Link IoT Edge inherits the features ofin the IoT Platform console. The procedure to create a product is simplified. You can create gateway products that are applicable to Link IoT Edge in a quick manner.
Table 1. Parameters Parameter Description Product Name The name of the gateway product. You can search or identify gateway products by name. The name must be 4 to 30 characters in length, and can contain letters, digits, and underscores (_). Product Description Enter a description for the product. The description must be 1 to 100 characters in length. This parameter is optional. After the product is created, you are redirected to the Create Instance dialog box. The created gateway product appears in the drop-down list of the Gateway Products section.
- In the Create Instance dialog box, click Add Gateway Device in the Gateway Devices section.Create Gateway Device in Link IoT Edge inherits the features ofin the IoT Platform console.
- Set the required parameters as prompted and click OK.
Table 2. Parameters Parameter Description Product The gateway product to which the device that you want to create belongs. The system automatically specifies the new gateway for this parameter. Device Name The name of the gateway device. Each device name must be unique in the product. If you do not specify this parameter, the system generates a random device name. Note The device name must be 4 to 32 characters in length, and can contain letters, digits, hyphens (-), underscores (_), at signs (@), periods (.), and colons (:). - Select the required specifications for the Link IoT Edge product based on the environment that you build. For more information, see Specifications.
- Optional. In the Tag Information section, click Add Tag to add tags to the instance. Tags provide an efficient method to identify and group instances. This parameter is optional.To set an instance tag, you must enter a tag key and tag value.
Table 3. Parameters Parameter Description Tag Key You must specify a tag key for each tag. The tag key must be 1 to 20 characters in length, and can contain letters. The key of each tag is unique for an instance. Tag Value You must specify a tag value for each tag. The tag value must be 1 to 20 characters in length, and can contain letters, digits, underscores (_), and hyphens (-).
- Click Create Instance. In the Create Instance dialog box, enter an instance name.
- After you configure the required parameters, click OK.
Install and launch Link IoT Edge
After you create an edge instance and a gateway, you must install and start Link IoT Edge on the gateway.
- On the Edge Instances page, click Install Software in the Actions column of the required edge instance.
Specify the parameters for the installation command based on the environment, and then click Installation Command.
Table 1. Parameters Parameter
Description
Edge Gateway CPU Architecture
The CPU architecture of your device system. In this example, select x86-64.
Instance Type
The Link IoT Edge edition that you specified when you created the edge instance. In this dialog box, you cannot change the Link IoT Edge edition.
Edge Version
The Link IoT Edge version for installation.
Operating System
The operating system of your device. In this example, select Linux.
Copy the installation command for subsequent use.
Log on to your Ubuntu 16.04 machine.
Run the command that you copied in Step 3 in the command line.
You can run the command to download, configure, and launch the Link IoT Edge service. After the command is executed, the link-iot-edge.sh script is downloaded and saved in the current directory.
NoteIf you are not launching Link IoT Edge for the first time, you can run the link-iot-edge.sh script that has been downloaded to manage the Link IoT Edge service. For example, you can relaunch or stop the Link IoT Edge service. You can also retrieve the status of the service or change the configuration parameters of the service. The command details are described in the following figure.
If the system displays the following information, the Link IoT Edge service is launched.
You can also check the gateway status by performing the following steps: Log on to the Link IoT Edge console. In the left-side navigation pane, click Edge Instances. On the page that appears, find the edge instance that you created and click View in the Actions column. On the Gateways tab of the Instance Details page, check the gateway status.
- Optional. Authorize other Alibaba Cloud users to perform the required operations on the instance.On the Edge Instances page, click Authorize in the upper-left corner of the page. In the dialog box that appears, click Add Authorization. In the dialog box that appears, set the required parameters as prompted.
Table 6. Parameters Parameter Description Authorized User UID The Alibaba Cloud account ID of the user that you want to authorize. Authorized Instance The edge instance on which you want to authorize the Alibaba Cloud account to perform remote O&M.
What to do next
- On the Instance Details page, click the Configurations tab. In the Instance Information section, turn on Remote Access.
- On the Instance Details page, click the Gateways tab. Find the new gateway and click Remote SSH Terminal, or Share Remote SSH Terminal in the Actions column to remotely manage the gateway and files on the gateway. For more information, see Remote service access.