mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-12 19:30:25 +08:00
实现远程升级节点
This commit is contained in:
@@ -5,6 +5,8 @@ type NodeStatus struct {
|
|||||||
BuildVersion string `json:"buildVersion"` // 编译版本
|
BuildVersion string `json:"buildVersion"` // 编译版本
|
||||||
ConfigVersion int64 `json:"configVersion"` // 节点配置版本
|
ConfigVersion int64 `json:"configVersion"` // 节点配置版本
|
||||||
|
|
||||||
|
OS string `json:"os"`
|
||||||
|
Arch string `json:"arch"`
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
HostIP string `json:"hostIP"`
|
HostIP string `json:"hostIP"`
|
||||||
CPUUsage float64 `json:"cpuUsage"`
|
CPUUsage float64 `json:"cpuUsage"`
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -57,6 +57,9 @@ service NodeService {
|
|||||||
// 安装节点
|
// 安装节点
|
||||||
rpc installNode (InstallNodeRequest) returns (InstallNodeResponse);
|
rpc installNode (InstallNodeRequest) returns (InstallNodeResponse);
|
||||||
|
|
||||||
|
// 升级节点
|
||||||
|
rpc upgradeNode (UpgradeNodeRequest) returns (UpgradeNodeResponse);
|
||||||
|
|
||||||
// 启动节点
|
// 启动节点
|
||||||
rpc startNode (StartNodeRequest) returns (StartNodeResponse);
|
rpc startNode (StartNodeRequest) returns (StartNodeResponse);
|
||||||
|
|
||||||
@@ -75,6 +78,9 @@ service NodeService {
|
|||||||
// 列出所有未安装的节点
|
// 列出所有未安装的节点
|
||||||
rpc findAllNotInstalledNodesWithClusterId (FindAllNotInstalledNodesWithClusterIdRequest) returns (FindAllNotInstalledNodesWithClusterIdResponse);
|
rpc findAllNotInstalledNodesWithClusterId (FindAllNotInstalledNodesWithClusterIdRequest) returns (FindAllNotInstalledNodesWithClusterIdResponse);
|
||||||
|
|
||||||
|
// 列出所有需要升级的节点
|
||||||
|
rpc findAllUpgradeNodesWithClusterId (FindAllUpgradeNodesWithClusterIdRequest) returns (FindAllUpgradeNodesWithClusterIdResponse);
|
||||||
|
|
||||||
// 读取节点安装状态
|
// 读取节点安装状态
|
||||||
rpc findNodeInstallStatus (FindNodeInstallStatusRequest) returns (FindNodeInstallStatusResponse);
|
rpc findNodeInstallStatus (FindNodeInstallStatusRequest) returns (FindNodeInstallStatusResponse);
|
||||||
|
|
||||||
@@ -223,6 +229,14 @@ message InstallNodeResponse {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 升级节点
|
||||||
|
message UpgradeNodeRequest {
|
||||||
|
int64 nodeId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpgradeNodeResponse {
|
||||||
|
}
|
||||||
|
|
||||||
// 启动节点
|
// 启动节点
|
||||||
message StartNodeRequest {
|
message StartNodeRequest {
|
||||||
int64 nodeId = 1;
|
int64 nodeId = 1;
|
||||||
@@ -275,6 +289,23 @@ message FindAllNotInstalledNodesWithClusterIdResponse {
|
|||||||
repeated Node nodes = 1;
|
repeated Node nodes = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 列出所有需要升级的节点
|
||||||
|
message FindAllUpgradeNodesWithClusterIdRequest {
|
||||||
|
int64 clusterId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FindAllUpgradeNodesWithClusterIdResponse {
|
||||||
|
repeated NodeUpgrade nodes = 1;
|
||||||
|
|
||||||
|
message NodeUpgrade {
|
||||||
|
Node node = 1;
|
||||||
|
string os = 2;
|
||||||
|
string arch = 3;
|
||||||
|
string oldVersion = 4;
|
||||||
|
string newVersion = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 读取节点安装状态
|
// 读取节点安装状态
|
||||||
message FindNodeInstallStatusRequest {
|
message FindNodeInstallStatusRequest {
|
||||||
int64 nodeId = 1;
|
int64 nodeId = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user