Registering Nodes in Batches
Scenario
If you need to manage, update, and maintain a large number of edge nodes of the same type, it will be labor-consuming to do so one by one as described in Registering an Edge Node.
IEF provides batch node registration to pre-install required software on edge nodes of the same type so that they can be connected to the network after they are powered on. This one-to-many design improves management efficiency and reduces O&M costs.
Procedure of Registering Nodes in Batches
The procedure for managing edge nodes in batches is as follows:
- Prepare edge nodes that meet certain requirements. Then, configure the environment on the edge nodes by referring to Configuring the Edge Node Environment.
- After creating a batch node registration job, obtain the configuration file and registration software, and pre-install them on the edge nodes. For details, see Batch Management of Edge Nodes. If the registration command is configured in the startup script, the device will be automatically managed as an edge node of IEF after being powered on and connected to the network.
Creating a Batch Node Registration Job
- Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
- In the navigation pane, choose Batch Management > Node Registration Jobs, and click Register Edge Nodes in the upper right corner of the displayed page.
- Configure basic information. The parameters marked with * are mandatory.
- Name: name of the batch node registration job.
- Description: description of the job.
- Tags: Tags can be used to classify resources, facilitating resource management.
- Properties: A property is in key-value pair format. Enter a key and value.
- Click Register in the lower right corner. You can choose to register the edge nodes using a certificate or a token.
- Method 1: registration using a certificate: Download the configuration file, EdgeCore Register, and EdgeCore Installer.
To enhance node security, you must download the configuration file and tools now. The configuration file and tools cannot be retrieved later.
Figure 1 Downloading the configuration file, EdgeCore Register, and EdgeCore Installer
- Click Download cert_1.tar.gz to download the configuration file.
- Select the CPU architecture of your edge nodes, and click Download Node Registration Tool and Download Node Installation Tool.
- Method 2: registration using a token: Download the EdgeCore Installer and save the installation credential.
Figure 2 Downloading EdgeCore Installer
Figure 3 Installation command
- Select the CPU architecture of your edge nodes, and click Download EdgeCore Installer.
- Commands for the two installation methods are displayed. Save either of them.
- Method 1: registration using a certificate: Download the configuration file, EdgeCore Register, and EdgeCore Installer.
- Upload the downloaded file to the edge nodes, and then manage the edge nodes on IEF by referring to Batch Management of Edge Nodes.
Batch Management of Edge Nodes
Follow the procedure of the finish step on the Register Edge Nodes page to perform the batch management operation to the edge nodes.
- Log in to an edge node as a user with sudo permissions.
- Run the following commands to decompress the configuration file, EdgeCore Register, and EdgeCore Installer.
sudo tar -zxvf edge-installer_1.0.10_x86_64.tar.gz -C /opt
sudo tar -zxvf edge-register_2.0.10_x86_64.tar.gz -C /opt
sudo tar -zxvf cert_batchNodes.tar.gz -C /opt/edge-register/ (This command is not required for registration using a token.)
Replace edge-installer_1.0.10_x86_64.tar.gz, edge-register_2.0.10_x86_64.tar.gz, and cert_batchNodes.tar.gz with the names of the files downloaded in Creating a Batch Node Registration Job.
- (Optional) Customize the node information.
For batch node management, the default configuration will be applied for these edge nodes. Where:
- The node name is the combination of the host name and MAC address of the node, that is, Host name_MAC address.
- The GPU and NPU options are disabled.
- The Docker function is enabled.
If you want to customize node information, configure the nodeinfo file. Run the following commands to open the nodeinfo file:
cd /opt/edge-register
vi nodeinfo
Specify the node information in the nodeinfo file. The following example lists all configurable parameters. You can set the parameters based on site requirements and delete the parameters that do not need to be customized.
Parameters such as the node name, descriptions, GPU enabled or not, NPU specifications, log configuration, and attributes are included. For details about the parameters, see API Reference > Registering an Edge Node.
{ "name": "nodename", "description": "", "enable_gpu": false, "enable_npu": true, "npu_type": "***", "enable_docker": true, "attributes": [ { "key": "key1", "value": "value1" } ], "log_configs": [ { "component": "app", "type": "local", "level": "debug", "size": 100, "rotate_num": 5, "rotate_period": "daily" } ], "device_infos": [ { "device_ids": ["15696983-5ee6-43b4-9653-5d8512813dcc"], "relation": "camera", "comment": "devicedescription" } ], "mqtt_config": { "enable_mqtt": false, "mqtts": [] }, "tags": [ { "key": "name", "value": "value" } ] }
- Run one of the following commands to manage the edge nodes:
- For edge nodes registered using tokens:
cd /opt/edge-register; ./register --mode=identifier --identifier=Credential for registration using a token
Replace Credential for registration using a token with the value of identifier field of the installation credential saved in Creating a Batch Node Registration Job.
After the command is executed, check whether the node is successfully registered by referring to Viewing Managed Nodes.
You can also add the registration command cd /opt/edge-register; ./register --mode=cert to the startup script. In this way, the edge node can automatically run the registration command when it is powered on.
If the command output is 0, the edge node is successfully registered on IEF.
- For edge nodes registered using tokens:
Viewing Managed Nodes
You can view the nodes managed in batches on the console.
- Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
- In the navigation pane, choose Batch Management > Node Registration Jobs, and click a job name on the displayed page.
- You can view the managed nodes on the Nodes tab.
Figure 4 Viewing nodes managed in batches
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot