百度智能云

All Product Document

          Intelligent Edge

          Node Pre-configuration

          Feature Introduction

          The node pre-configuration is mainly used for the scenario in which the edge devices are registered and activated in batch. You can create the product batch, and then register and activate a batch of edge nodes under this product in various ways. The activated nodes of the same product batch have the same tag, to facilitate you to operate and manage these nodes subsequently.

          Design description

          In actual edge deployment scenarios, we often need to register, activate and manage the devices in batch. The node pre-configuration function provides the ability to create and manage the product batches, manage the device registration and generate the initialization deployment commands.

          • The main operation process is shown as follows:

            1. Create product batch
            2. Register and manage device fingerprint
            3. Deploy and install on the device side
            4. View the activation state and the activation node details in the cloud.

          Service process

          Click Edge - Node Pre-configuration in the left menu on the Instance Details page, and you will see the interface as follows:

          image.png

          Click the Create Product button to enter the Create Product interface.

          image.png

          • [Name] indicates the name of products created.
          • [Whitelist] indicates whether the whitelist function is enabled, i.e., whether you need to perform the pre-registration for the device fingerprint. When the whitelist switch is on, you need to enter the fingerprint of devices to be activated on the subsequent Product Details page in advance. If required to activate the device, compare the fingerprint provided by the activated device to determine whether it is in the pre-registration list. You can have the devices activated in the pre-registration list only. When the whitelist switch is off, you do not need to enter the device fingerprint on the Product Details page. When the device attempts to be activated, the Baidu AI cloud will automatically register the device fingerprint submitted by the device into the list and activate it to create the corresponding node.
          • [Activation mode] indicates how the device fingerprint is collected and submitted for activation on the device side. At present, the activation modes supported include SN file, manual input, system Hostname, system BootID, SystemUUID, and system MachineID. When you select the SN file, you will be required to specify 【SN file path and name】, and the default path is>/var/lib/baetyl/sn/fingerprint.txt. When you select the manual input, you will be required to specify【Field Name】for the Web page collection, which is sn by default. When you select other modes, the system will automatically collect relevant information from the device without additional configuration.
          • [Description] indicates the literal description of products.

          There are many options for the creation and activation of products. The following introduces the process in [Whitelist Switch Turned off, But Activated by File] or [Whitelist Switch Turned on, and Activated Manually] mode.

          1) Whitelist turned off but activated by file

          Click the [Create Product] button.

          image.png

          Turn off the [Whitelist, select the SN file as [Activation Mode] (Users can create the file in the specified directory and add the file content). Then, use the default [SN File Path and Name] or specify the SN file storage location ([Note] In the Mac system, you need to store the SN files in the user directory but not in the system directory). Click "OK" to create the products.

          image.png

          Click the product name or [View] to enter the Product Details page, and click [Delete] to delete the products without registration record. Here, click [View] to enter the page as follows.

          image.png

          Click [Get Installation Mode] and copy the online installation command.

          image.png

          Under the SN file path of the edge device, place the file recording the device fingerprint as shown in the figure below.

          image.png

          Execute the online installation command copied previously on the device terminal and display a similar installation process.

          image.png

          In case of no k3s environment for operation on the device, the system will ask whether to install k3s when executing the installation command. Then, you can select it according to your needs.

          After installing the command is successful, you can view the deployment status through the kubectl command.

          image.png

          image.png

          image.png

          If the device is activated normally, you will see that the system module [baetyl-core] [baetyl-function] is activated and run.

          At this time, you can see the registration and activation of devices on the Cloud Product Details page.

          image.png

          You can also find the corresponding node in the [Edge Node] list.

          image.png

          You can click to view the node details.

          image.png

          You can see that the node has been registered and activated normally and started to report the information. At this point, the registration and activation are complete.

          2) Whitelist switch turned on and activated manually

          Click the [Create Product] button.

          image.png

          Select to turn on [Whitelist], select the Manual Input as 【Activation Mode】, and use the default [Field Name]. Click "OK" to create the products.

          Click the product name or [View] to enter the Product Details page.

          image.png

          Because this product enables the whitelist verification, we need to add the device fingerprint registration record firstly. Here, we provide the single record addition mode and batch record addition mode. The following introduces them one by one.

          a. Manual add of a single record

          Click 【Add Registration Record】, and you can select to add the registration ID by the system generation. At this time, you can select to specify the node name. Otherwise, the Registration ID will be used as the node name subsequently.

          image.png

          image.png

          You can manually enter the device fingerprint as the registration ID as shown in the figure below.

          image.png

          image.png

          b. Batch add

          Click the [Batch Add] button to generate the specified number of records automatically. That is to say, the system can add the specified registration records.

          image.png

          image.png

          You can also add a certain number of records through the file import.

          image.png

          image.png

          image.png

          image.png

          You can modify the node name by clicking the [Edit] button on the right side of the registration record before activation.

          image.png

          image.png

          You can delete the registration record by clicking the [Delete] button on the right side of the registration record before activation.

          image.png

          By clicking the "Download" button as shown in the figure, download the existing registration record information to facilitate your subsequent batch operation.

          image.png

          image.png

          After adding the registration record, click the [Get Installation Mode] button on the right side of the product name so that you can get the online installation command.

          image.png

          Execute the online installation command copied previously on the device terminal and display a similar installation process.

          image.png

          After the installation, you can view the module operation condition through the kubectl get pod -n baetyl-edge-system command.

          image.png

          For the activation mode of [Manual Input] is used this time, you need to activate it on the browser access page http: //127.0.0.1: 30007.

          image.png

          Enter the registered device fingerprint in the input box corresponding to [SerialNumber], and enter the description information in the input box corresponding to [Description] selectively, and then click [Activate].

          image.png

          image.png

          If the "Successful Activation" appears, it means that the activation has been complete, and you can view the module deployment and startup status through the following command.

          image.png

          Finally, you can see that the baetyl-core module and the baetyl-function module run properly.

          You can view the activation status in the cloud.

          image.png

          Click the blue node name or view the node details on the Edge Node page.

          image.png

          image.png

          At this point, the node registration and activation are complete when the whitelist switch is on.

          3) Description of other activation modes

          You can also select the system Hostname, system BootID, SystemUUID, and system MachineID as the device fingerprint collection mode on the [Create Product] pop-up page.

          image.png

          You can view the system Hostname on the edge device in the following ways.

          image.png

          Here, the node name under the master role is the hostname collected during activation.

          You can view the system BootID, SystemUUID, and system MachineID in the following ways.

          image.png

          image.png

          During the execution of the online installation command on the edge device, the module will collect the corresponding information for activation automatically.

          Previous
          Service Call
          Next
          Edge Application