Registering an Edge Node
Function
This API is used to register an edge node.
After the API is successfully called, use Base64 to decode the node.package field in the response body to a tar.gz file. Then, download EdgeCore from the console and install it on the edge node to enable IEF to manage the node.
URI
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
Request
Request parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). The default value application/json is recommended. |
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
node |
Yes |
Table 4 object |
Parameters about the edge node. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Edge node name. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. This parameter is mandatory and must be unique in the account. |
description |
No |
String |
Edge node description. The description contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
enable_gpu |
No |
Boolean |
Whether to enable the Graphics Processing Unit (GPU) on the edge node. Default value: false. |
log_configs |
No |
Array of Table 2 objects |
Log configuration of the edge node. |
device_infos |
No |
Array of Table 3 objects |
Information about bound end devices. |
enable_npu |
No |
Boolean |
Whether NPU is enabled on the edge node. The value true indicates that NPU is enabled, and the value false indicates that NPU is not enabled. The default value is false. |
npu_type |
No |
String |
NPU type. NUP type supports D310.
|
attributes |
No |
Array of Table 26 objects |
Properties of the edge node. An edge node can be associated with a maximum of 32 properties. |
enable_docker |
No |
Boolean |
Whether Docker is enabled on the edge node. The default value is true. |
tags |
No |
Array of Table 27 objects |
Tags of the edge node. An edge node can be configured with a maximum of 20 tags. |
mqtt_config |
No |
Table 38 object |
MQTT configuration. |
Example request
{ "node": { "name": "node_test", "description": "This is a test node", "enable_gpu": false, "log_configs": [ { "component": "app", "type": "local", "level": "debug", "size": 100, "rotate_num": 5, "rotate_period": "daily" } ] } }
Response
Parameter |
Type |
Description |
---|---|---|
node |
Table 1 object |
Details about the edge node. |
Example response
{ "node": { "id": "86715318-a5a7-4507-a289-7238d53d5fed", "project_id": "05041fffa40025702f6dc009cc6f8f33", "name": "node_test", "description": "This is a test node", "created_at": "2020-08-11T01:23:55.527805447Z", "updated_at": "", "state": "UNCONNECTED", "master_addr": "https://ief2-placement.cn-north-4.myhuaweicloud.com:443", "arch": "", "enable_gpu": false, "gpu_info": [], "gpu_num": 0, "memory": 0, "os_version": "", "os_name": "", "device_infos": [], "os_type": "", "pause_docker_image": "swr.cn-north-4.myhuaweicloud.com/huawei-ief-internal-app/pause", "host_name": "", "cpu": 0, "log_configs": [ { "level": "", "rotate_num": 5, "component": "app", "rotate_period": "daily", "type": "local", "id": "9b795f5e-01b7-47e8-b1ae-6dc59b9c0005", "size": 100 }, { "level": "false", "rotate_num": 5, "component": "app", "rotate_period": "daily", "type": "LTS", "id": "e419ab7f-17ea-4757-b62e-311fc777af69", "size": 50 }, { "level": "", "rotate_num": 5, "component": "system", "rotate_period": "daily", "type": "local", "id": "56dabbb7-4fb1-46cc-85df-dc80a2bd24f8", "size": 50 }, { "level": "false", "rotate_num": 5, "component": "system", "rotate_period": "daily", "type": "LTS", "id": "0f6935c1-e59d-4b0d-a0db-1ba07b2ac8d1", "size": 50 } ], "host_ips": [], "edged_version": "", "deployment_num": 0, "device_num": 0, "upgrade_history": [], "ief_node_version": "", "comment": "", "ca": "", "relation": "", "certificate": "", "private_key": "", "attributes": [], "package": "", "tags": null, "product_id": "", "mqtt_mode": "internal", "mqtt_internal": "tls://docker0:8883,tls://127.0.0.1:8883", "mqtt_external": "", "enable_npu": false, "docker_enable": true, "npu_num": 0, "npu_info": [], "node_type": "", "ntp_configs": null, "nics": [], "error_reason": "", "container_runtime_version": "" } }
Error Codes
For details, see Error Codes.
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