Merge branch 'refs/heads/local-ss'
This commit is contained in:
@@ -13,7 +13,7 @@ type AgentServerInfo struct {
|
||||
ServerIPPbV6 string `json:"serverIpPbV6" yaml:"serverIpPbV6"`
|
||||
ServerIPInV6 string `json:"serverIpInV6" yaml:"serverIpInV6"`
|
||||
City string `json:"city" yaml:"city"`
|
||||
Region string `json:"region" yaml:"region"`
|
||||
Province string `json:"province" yaml:"province"`
|
||||
Country string `json:"country" yaml:"country"`
|
||||
Organization string `json:"organization" yaml:"organization"`
|
||||
TimeZone string `json:"timeZone" yaml:"timeZone"`
|
||||
@@ -31,6 +31,7 @@ type AgentServerInfo struct {
|
||||
PlatformVersion string `json:"platformVersion"` // version of the complete OS
|
||||
KernelVersion string `json:"kernelVersion"` // version of the OS kernel (if available)
|
||||
KernelArch string `json:"kernelArch"` // native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
|
||||
CPUArch string `json:"cpuArch"` // native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
|
||||
IoSpeed string `json:"ioSpeed" yaml:"ioSpeed"`
|
||||
MemoryTotal string `json:"memoryTotal" yaml:"memoryTotal"`
|
||||
SwapTotal string `json:"swapTotal" yaml:"swapTotal"`
|
||||
@@ -39,5 +40,5 @@ type AgentServerInfo struct {
|
||||
Comment string `json:"comment" yaml:"comment"`
|
||||
MachineID string `json:"machineId" yaml:"machineId"`
|
||||
AgentVersion string `json:"agentVersion" yaml:"agentVersion"`
|
||||
TopicName string `json:"topicName" yaml:"topicName"`
|
||||
AgentTopicName string `json:"agentTopicName" yaml:"agentTopicName"`
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ func INIT(octopusAgentConfigFileName string) chan bool {
|
||||
}
|
||||
|
||||
// 建立 运行时 RabbitMQ连接
|
||||
runtimeConnectorQueue := buildAndStartBusinessRuntimeQueue(a_agent.AgentServerInfoCache.TopicName)
|
||||
runtimeConnectorQueue := buildAndStartBusinessRuntimeQueue(a_agent.AgentServerInfoCache.AgentTopicName)
|
||||
|
||||
// 激活子模块
|
||||
activatedOctopusAgentModules()
|
||||
@@ -247,15 +247,10 @@ func buildOctopusTCPConnect(agentConfig *viper.Viper) *rabbitmq.RabbitTCPConnect
|
||||
|
||||
func refreshAgentInfoByStatusInfo(agentInfo *a_status.AgentInfo, agentServerInfo *a_agent.AgentServerInfo) {
|
||||
|
||||
// host info
|
||||
agentServerInfo.ServerName = agentInfo.HostInfo.Hostname
|
||||
agentServerInfo.MachineID = agentInfo.HostInfo.HostID
|
||||
|
||||
// cpu part
|
||||
agentServerInfo.CPUCore = strconv.FormatInt(int64(agentInfo.CPUInfo.NumCores), 10)
|
||||
if len(agentInfo.CPUInfo.CPUInfo) > 0 {
|
||||
marshal, _ := json.Marshal(agentInfo.CPUInfo.CPUInfo[0].ModelName)
|
||||
agentServerInfo.CPUBrand = string(marshal)
|
||||
agentServerInfo.CPUBrand = agentInfo.CPUInfo.CPUInfo[0].ModelName
|
||||
}
|
||||
|
||||
// os info
|
||||
@@ -289,9 +284,146 @@ func refreshAgentInfoByStatusInfo(agentInfo *a_status.AgentInfo, agentServerInfo
|
||||
// network part
|
||||
refreshAgentNetworkInfo(agentInfo, agentServerInfo)
|
||||
|
||||
// host info
|
||||
agentServerInfo.ServerName = uniformAgentServerName(agentInfo, agentServerInfo)
|
||||
agentServerInfo.MachineID = agentInfo.HostInfo.HostID
|
||||
|
||||
// io test
|
||||
agentServerInfo.IoSpeed = testDiskIO()
|
||||
|
||||
log.DebugF("[refreshAgentInfoByStatusInfo] - ok !")
|
||||
}
|
||||
|
||||
func uniformAgentServerName(agentInfo *a_status.AgentInfo, agentServerInfo *a_agent.AgentServerInfo) string {
|
||||
|
||||
hostname := agentInfo.HostInfo.Hostname
|
||||
// Shanghai-amd64-01
|
||||
if strings.Count(hostname, "-") == 2 {
|
||||
split := strings.Split(hostname, "-")
|
||||
if split[1] == getMachineType(agentInfo.HostInfo.KernelArch) {
|
||||
// 第二位是 amd64 arm64
|
||||
return hostname
|
||||
}
|
||||
}
|
||||
|
||||
// 不是标准的AgentName格式
|
||||
city := agentServerInfo.City
|
||||
city = strings.Title(city)
|
||||
if strings.Contains(city, " ") {
|
||||
city = strings.Join(strings.Split(city, " "), "")
|
||||
}
|
||||
// uniform city format
|
||||
agentServerInfo.City = city
|
||||
|
||||
// linux host architecture
|
||||
arch := getMachineType(agentInfo.HostInfo.KernelArch)
|
||||
|
||||
agentServerInfo.CPUArch = arch
|
||||
|
||||
var numS string
|
||||
if agentServerInfo.ServerIPInV4 != "" {
|
||||
split := strings.Split(agentServerInfo.ServerIPInV4, ".")
|
||||
numS = split[3]
|
||||
} else {
|
||||
// Seed the random number generator
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
// Generate a random number between 1 and 999
|
||||
num := rand.Intn(999) + 1
|
||||
|
||||
// Format the number as a string with leading zeros
|
||||
numS = fmt.Sprintf("%03d", num)
|
||||
}
|
||||
|
||||
return city + "-" + arch + "-" + numS
|
||||
}
|
||||
|
||||
func testDiskIO() string {
|
||||
log.InfoF("testDiskIO - start !")
|
||||
|
||||
// Create a temporary file to test disk I/O
|
||||
f, err := os.CreateTemp("", "test_disk_io")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return ""
|
||||
}
|
||||
defer func() {
|
||||
f.Close()
|
||||
|
||||
os.Remove(f.Name())
|
||||
}()
|
||||
|
||||
// Write data to the file
|
||||
data := make([]byte, 10240*10240) // 10MB
|
||||
for i := 0; i < 10; i++ {
|
||||
_, err = f.Write(data)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// Read data from the file
|
||||
startTime := time.Now()
|
||||
buf := make([]byte, 10240*10240) // 10MB
|
||||
for {
|
||||
n, err := f.Read(buf)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
if n == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
elapsedTime := time.Since(startTime).Seconds()
|
||||
|
||||
// Calculate the disk I/O speed in MB/s
|
||||
speed := float64(len(data)) / (elapsedTime * 10240 * 10240)
|
||||
|
||||
sprintf := fmt.Sprintf("%.2f MB/s", speed)
|
||||
|
||||
log.InfoF("testDiskIO - end io speed are => %s", sprintf)
|
||||
return sprintf
|
||||
}
|
||||
|
||||
func getMachineType(arch string) string {
|
||||
|
||||
switch {
|
||||
case strings.HasSuffix(arch, "386") || arch == "i386":
|
||||
return "ia32"
|
||||
case strings.HasSuffix(arch, "amd64") || arch == "x86_64":
|
||||
return "amd64"
|
||||
case arch == "armv5tel":
|
||||
return "arm32"
|
||||
case arch == "armv6l":
|
||||
return "arm32"
|
||||
case arch == "armv7" || arch == "armv7l":
|
||||
return "arm32"
|
||||
case arch == "armv8" || arch == "aarch64":
|
||||
return "arm64"
|
||||
case arch == "mips":
|
||||
return "mips32"
|
||||
case arch == "mipsle":
|
||||
return "mips32le"
|
||||
case arch == "mips64":
|
||||
return "mips64"
|
||||
case arch == "mips64le":
|
||||
return "mips64le"
|
||||
case arch == "ppc64":
|
||||
return "ppc64"
|
||||
case arch == "ppc64le":
|
||||
return "ppc64le"
|
||||
case arch == "riscv64":
|
||||
return "riscv64"
|
||||
case arch == "s390x":
|
||||
return "s390x"
|
||||
default:
|
||||
fmt.Println("error: The architecture is not supported.")
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func refreshAgentNetworkInfo(agentInfo *a_status.AgentInfo, agentServerInfo *a_agent.AgentServerInfo) {
|
||||
|
||||
// 获取Agent的公网服务信息
|
||||
@@ -303,7 +435,7 @@ func refreshAgentNetworkInfo(agentInfo *a_status.AgentInfo, agentServerInfo *a_a
|
||||
|
||||
if publicNetworkInfo.IP != "" {
|
||||
agentServerInfo.ServerIPPbV4 = publicNetworkInfo.IP
|
||||
agentServerInfo.Region = publicNetworkInfo.Region
|
||||
agentServerInfo.Province = publicNetworkInfo.Region
|
||||
agentServerInfo.City = publicNetworkInfo.City
|
||||
agentServerInfo.Country = publicNetworkInfo.Country
|
||||
agentServerInfo.Location = publicNetworkInfo.Loc
|
||||
@@ -377,7 +509,7 @@ func handleInitMsgFromServer(initFromServerMsg *rabbitmq.OctopusMessage, initToS
|
||||
g.G.AgentHasRegister = true
|
||||
|
||||
// 保存真实的AgentTopicName
|
||||
a_agent.AgentServerInfoCache.TopicName = serverInfo.TopicName
|
||||
a_agent.AgentServerInfoCache.AgentTopicName = serverInfo.AgentTopicName
|
||||
|
||||
} else {
|
||||
// 不是自身的 注册回复信息 -- 拒绝 2023年6月19日 此处存在错误! 会死循环Nack 导致异常
|
||||
|
||||
68
agent-go/octopus-agent-cmii.yaml
Normal file
68
agent-go/octopus-agent-cmii.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
server:
|
||||
port: 8000
|
||||
|
||||
logging:
|
||||
level:
|
||||
web: info
|
||||
|
||||
octopus:
|
||||
message:
|
||||
# agent boot up default common exchange
|
||||
init_exchange: InitExchange
|
||||
# server will send message to agent using this common queue
|
||||
init_to_server: InitToServer
|
||||
# agent boot up default common exchange routing key
|
||||
init_to_server_key: InitToServerKey
|
||||
# server will receive message from agent using this common queue
|
||||
init_from_server: InitFromServer
|
||||
# agent boot up default common exchange routing key
|
||||
init_from_server_key: InitFromServerKey
|
||||
# initialization register time out (unit ms) default is 5 min
|
||||
init_ttl: "3000000"
|
||||
# Octopus Exchange Name == server comunicate with agent
|
||||
octopus_exchange: OctopusExchange
|
||||
# Octopus Message To Server == all agent send info to server queue and topic
|
||||
octopus_to_server: OctopusToServer
|
||||
executor:
|
||||
name: executor-functions
|
||||
status:
|
||||
name: octopus-agent
|
||||
healthy:
|
||||
type: cron
|
||||
cron: 10 */1 * * * ? *
|
||||
start-delay: 30
|
||||
metric:
|
||||
pinch: 20
|
||||
agent:
|
||||
executor:
|
||||
# agent执行一条Command的最长超时时间
|
||||
processMaxTimeOut: 60
|
||||
status:
|
||||
app:
|
||||
- Nginx/nginx
|
||||
- MySQL/mysql
|
||||
- Xray/xray
|
||||
- OctopusAgent/octopus-agent
|
||||
- Redis/redis
|
||||
- RabbitMQ/rabbitmq
|
||||
|
||||
spring:
|
||||
main:
|
||||
allow-circular-references: true
|
||||
allow-bean-definition-overriding: true
|
||||
rabbitmq:
|
||||
# host: 42.192.52.227
|
||||
host: 192.168.35.71
|
||||
port: 20672
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
virtual-host: /
|
||||
listener:
|
||||
simple:
|
||||
retry:
|
||||
# ack failed will reentrant the Rabbit Listener
|
||||
max-attempts: 2
|
||||
enabled: true
|
||||
# retry interval unit ms
|
||||
max-interval: 65000
|
||||
initial-interval: 65000
|
||||
@@ -66,26 +66,3 @@ spring:
|
||||
# retry interval unit ms
|
||||
max-interval: 65000
|
||||
initial-interval: 65000
|
||||
|
||||
#spring:
|
||||
# application:
|
||||
# name: octopus-agent
|
||||
# profiles:
|
||||
# active: dev
|
||||
# cloud:
|
||||
# nacos:
|
||||
# config:
|
||||
# group: dev
|
||||
# config-retry-time: 3000
|
||||
# file-extension: yaml
|
||||
# max-retry: 3
|
||||
# # server-addr: "150.230.198.103:21060"
|
||||
# server-addr: "42.192.52.227:21060"
|
||||
# timeout: 5000
|
||||
# config-long-poll-timeout: 5000
|
||||
# extension-configs:
|
||||
# - group: dev
|
||||
# data-id: "common-dev.yaml"
|
||||
#
|
||||
#server:
|
||||
# port: 8000
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
image2 "wdd.io/agent-common/image"
|
||||
@@ -9,9 +10,16 @@ import (
|
||||
)
|
||||
|
||||
var DefaultCmiiOperator = CmiiK8sOperator{}
|
||||
var updateLogPath = "/home/wdd/IdeaProjects/ProjectOctopus/agent-operator/log/cmii-update-log.txt"
|
||||
|
||||
// var updateLogPath = "C:\\Users\\wddsh\\Documents\\IdeaProjects\\ProjectOctopus\\cmii_operator\\log\\cmii-update-log.txt"
|
||||
var updateLogPath = "/home/wdd/IdeaProjects/ProjectOctopus/cmii_operator/log/cmii-update-log.txt"
|
||||
func init() {
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
updateLogPath = "/home/wdd/IdeaProjects/ProjectOctopus/agent-operator/log/cmii-update-log.txt"
|
||||
case "windows":
|
||||
updateLogPath = "C:\\Users\\wddsh\\Documents\\IdeaProjects\\ProjectOctopus\\agent-operator\\log\\cmii-update-log.txt"
|
||||
}
|
||||
}
|
||||
|
||||
// FindAppNotHealthyOrRestartCountGreaterThanN 重启次数大于N的所有Deployment
|
||||
func FindAppNotHealthyOrRestartCountGreaterThanN(cmiiEnv string, restartCount int32) []CmiiDeploymentInterface {
|
||||
|
||||
@@ -252,7 +252,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
|
||||
// 计算20:00的时间
|
||||
now := time.Now()
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 12, 03, 00, 0, now.Location())
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 12, 14, 00, 0, now.Location())
|
||||
|
||||
duration := time.Duration(0)
|
||||
|
||||
@@ -275,10 +275,9 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
|
||||
appNameTagMap := map[string]string{
|
||||
//"cmii-uav-multilink": "5.5.0",
|
||||
"cmii-uav-platform-cms-portal": "5.5.0-042801",
|
||||
"cmii-uav-platform": "5.5.0-042801",
|
||||
"cmii-uav-platform-oms": "5.5.0-042801",
|
||||
"cmii-uav-user": "5.5.0-042801",
|
||||
//"cmii-uav-mqtthandler": "5.5.0",
|
||||
//"cmii-uav-mission": "5.5.0-042901",
|
||||
"cmii-uav-surveillance": "5.5.0-042901",
|
||||
}
|
||||
|
||||
for appName, newTag := range appNameTagMap {
|
||||
|
||||
@@ -443,6 +443,8 @@ func (op *CmiiK8sOperator) DeploymentUpdateTag(cmiiEnv, appName, newTag string)
|
||||
// 更新Cmii BIZ_GROUP
|
||||
tagVersion := newTag
|
||||
if strings.Contains(newTag, "-") {
|
||||
// 5.0.0-1243
|
||||
// 5.0.0-1243-1234
|
||||
tagVersion = strings.Split(newTag, "-")[0]
|
||||
}
|
||||
envList := container.Env
|
||||
|
||||
@@ -1,119 +1,33 @@
|
||||
2024-01-10-14-54-51 uavcloud-demo cmii-uav-platform 5.2.0-011002 5.2.0-011003
|
||||
2024-01-10-14-59-07 uavcloud-devflight cmii-uav-depotautoreturn 123sdsa45678 12345678
|
||||
2024-01-10-15-09-29 uavcloud-demo cmii-uav-platform 5.2.0-011003 5.2.0-011004
|
||||
2024-01-10-17-15-04 uavcloud-test cmii-suav-supervision 5.2.0-validation 5.2.0-011001
|
||||
2024-01-11-11-06-10 uavcloud-demo cmii-uav-platform 5.2.0-011004 5.2.0-011101
|
||||
2024-01-11-11-36-56 uavcloud-demo cmii-uav-waypoint 5.2.0 5.2.0-011101
|
||||
2024-01-11-11-58-15 uavcloud-uavms uavms-lowaltitude-platform 5.1.0 5.2.0-011101
|
||||
2024-01-11-14-00-34 uavcloud-uavms uavms-lowaltitude-platform 5.1.0-011102 5.1.0-011103
|
||||
2024-01-11-14-49-53 uavcloud-demo cmii-uav-waypoint 5.2.0-011101 5.2.0-011102
|
||||
2024-01-11-15-32-28 uavcloud-demo cmii-uav-platform 5.2.0-011101 5.2.0-011102
|
||||
2024-01-11-17-09-44 uavcloud-feature cmii-uav-platform 5.2.0-validation 5.2.0-011102
|
||||
2024-01-11-17-35-47 uavcloud-uavms cmii-uav-surveillance 5.1.0-LAIN05A 5.1.0-011101
|
||||
2024-01-11-17-38-06 uavcloud-uavms uavms-lowaltitude-platform 5.1.0-011103 5.1.0-011102
|
||||
2024-01-11-17-49-09 uavcloud-uavms uavms-lowaltitude-platform 5.1.0-011102 5.1.0-011104
|
||||
2024-01-12-10-38-30 uavcloud-uavms uavms-lowaltitude-platform 5.1.0-011105 5.2.0-011201
|
||||
2024-01-12-12-09-59 uavcloud-uavms uavms-lowaltitude-platform 5.2.0-011201 5.2.0-011202
|
||||
2024-01-12-17-13-32 uavcloud-test cmii-suav-supervision 5.2.0-011001 5.2.0-011201
|
||||
2024-01-12-17-22-47 uavcloud-demo cmii-uav-platform 5.2.0-011102 5.2.0-011201
|
||||
2024-01-15-11-56-33 uavcloud-test cmii-suav-supervision 5.2.0-011201 5.2.0-011501
|
||||
2024-01-16-10-22-02 uavcloud-test cmii-suav-supervision 5.2.0-011501 5.2.0-011601
|
||||
2024-01-16-11-40-31 uavcloud-uavms uavms-lowaltitude-platform 5.2.0-011202 5.2.0-snapshot
|
||||
2024-01-16-11-58-30 uavcloud-test cmii-suav-supervision 5.2.0-011601 5.2.0-011602
|
||||
2024-01-16-13-55-32 uavcloud-test cmii-suav-supervision 5.2.0-011602 5.2.0-011603
|
||||
2024-01-16-14-51-05 uavcloud-test cmii-suav-supervision 5.2.0-011603 5.2.0-011604
|
||||
2024-01-17-16-13-39 uavcloud-test cmii-suav-supervision 5.2.0-011604 5.2.0-0117
|
||||
2024-01-19-14-17-03 uavcloud-test cmii-suav-supervision 5.2.0-0117 5.2.0-011901
|
||||
2024-02-23-09-31-21 uavcloud-demo cmii-uav-device 5.4.0 5.4.0-26906
|
||||
2024-02-23-10-55-14 uavcloud-demo cmii-uav-device 5.4.0-26906 5.4.0-26906-01
|
||||
2024-02-23-14-32-05 uavcloud-devflight cmii-uav-device 5.2.0-validation 5.4.0-26906-01
|
||||
2024-02-28-17-09-55 uavcloud-demo cmii-uav-device 5.4.0 5.4.0-26905
|
||||
2024-03-04-17-33-02 uavcloud-demo cmii-uav-platform 5.4.0-25263 5.4.0-hotfix
|
||||
2024-03-08-12-02-18 zyga cmii-uav-oauth 8033/cmii/cmii-uav-oauth5.4.0
|
||||
2024-03-08-12-02-19 zyga cmii-uav-user 8033/cmii/cmii-uav-user5.4.0
|
||||
2024-03-08-12-02-21 zyga cmii-uav-cms 8033/cmii/cmii-uav-cms5.3.0
|
||||
2024-03-08-12-02-22 zyga cmii-uav-industrial-portfolio 8033/cmii/cmii-uav-industrial-portfolio5.4.0-27348-1
|
||||
2024-03-08-12-02-23 zyga cmii-uav-surveillance 8033/cmii/cmii-uav-surveillance5.4.0-25916
|
||||
2024-03-08-12-02-24 zyga cmii-uav-mission 8033/cmii/cmii-uav-mission5.4.0-26462-0307
|
||||
2024-03-08-12-02-26 zyga cmii-admin-gateway 8033/cmii/cmii-admin-gateway5.4.0
|
||||
2024-03-08-12-02-27 zyga cmii-uav-alarm 8033/cmii/cmii-uav-alarm5.4.0
|
||||
2024-03-08-12-02-28 zyga cmii-uav-emergency 8033/cmii/cmii-uav-emergency5.3.0
|
||||
2024-03-08-12-02-30 zyga cmii-uav-material-warehouse 8033/cmii/cmii-uav-material-warehouse5.4.0
|
||||
2024-03-08-12-02-31 zyga cmii-uav-airspace 8033/cmii/cmii-uav-airspace5.4.0
|
||||
2024-03-08-12-02-33 zyga cmii-uav-brain 8033/cmii/cmii-uav-brain5.4.0
|
||||
2024-03-08-12-02-34 zyga cmii-uav-process 8033/cmii/cmii-uav-process5.4.0
|
||||
2024-03-08-12-02-36 zyga cmii-uav-notice 8033/cmii/cmii-uav-notice5.4.0
|
||||
2024-03-08-12-02-37 zyga cmii-uav-waypoint 8033/cmii/cmii-uav-waypoint5.4.0-26768
|
||||
2024-03-08-12-02-38 zyga cmii-uav-autowaypoint 8033/cmii/cmii-uav-autowaypoint4.1.6-cm
|
||||
2024-03-08-12-02-40 zyga cmii-uav-data-post-process 8033/cmii/cmii-uav-data-post-process5.4.0
|
||||
2024-03-08-12-02-41 zyga cmii-admin-data 8033/cmii/cmii-admin-data5.4.0
|
||||
2024-03-08-12-02-42 zyga cmii-uav-cloud-live 8033/cmii/cmii-uav-cloud-live5.4.0
|
||||
2024-03-08-12-02-43 zyga cmii-uav-gateway 8033/cmii/cmii-uav-gateway5.4.0
|
||||
2024-03-08-12-02-45 zyga cmii-uav-logger 8033/cmii/cmii-uav-logger5.4.0
|
||||
2024-03-08-12-02-46 zyga cmii-uav-mqtthandler 8033/cmii/cmii-uav-mqtthandler5.4.0-25916
|
||||
2024-03-08-12-02-47 zyga cmii-admin-user 8033/cmii/cmii-admin-user5.4.0
|
||||
2024-03-08-12-02-54 zyga cmii-suav-supervision 8033/cmii/cmii-suav-supervision5.2.0
|
||||
2024-03-08-12-02-55 zyga cmii-uav-developer 8033/cmii/cmii-uav-developer5.4.0
|
||||
2024-03-08-12-02-57 zyga cmii-uav-integration 8033/cmii/cmii-uav-integration5.4.0-25916
|
||||
2024-03-08-12-02-58 zyga cmii-open-gateway 8033/cmii/cmii-open-gateway5.4.0
|
||||
2024-03-08-12-02-59 zyga cmii-uav-device 8033/cmii/cmii-uav-device5.4.0-25916
|
||||
2024-03-08-14-06-05 zyga cmii-uav-cloud-live 8033/cmii/cmii-uav-cloud-live5.4.0
|
||||
2024-03-08-14-06-07 zyga cmii-uav-mqtthandler 8033/cmii/cmii-uav-mqtthandler5.4.0-25916
|
||||
2024-03-08-14-11-26 zyga cmii-uav-industrial-portfolio 8033/cmii/cmii-uav-industrial-portfolio5.4.0-27348-1
|
||||
2024-03-08-14-11-29 zyga cmii-open-gateway 8033/cmii/cmii-open-gateway5.4.0
|
||||
2024-03-08-14-11-31 zyga cmii-uav-developer 8033/cmii/cmii-uav-developer5.4.0
|
||||
2024-03-08-14-11-33 zyga cmii-admin-user 8033/cmii/cmii-admin-user5.4.0
|
||||
2024-03-08-14-11-35 zyga cmii-uav-mqtthandler 8033/cmii/cmii-uav-mqtthandler5.4.0-25916
|
||||
2024-03-08-14-11-37 zyga cmii-uav-user 8033/cmii/cmii-uav-user5.4.0
|
||||
2024-03-08-14-11-40 zyga cmii-uav-airspace 8033/cmii/cmii-uav-airspace5.4.0
|
||||
2024-03-08-14-11-42 zyga cmii-uav-logger 8033/cmii/cmii-uav-logger5.4.0
|
||||
2024-03-08-14-11-44 zyga cmii-uav-process 8033/cmii/cmii-uav-process5.4.0
|
||||
2024-03-08-14-11-48 zyga cmii-uav-notice 8033/cmii/cmii-uav-notice5.4.0
|
||||
2024-03-08-14-11-55 zyga cmii-uav-surveillance 8033/cmii/cmii-uav-surveillance5.4.0-25916
|
||||
2024-03-08-14-12-04 zyga cmii-uav-waypoint 8033/cmii/cmii-uav-waypoint5.4.0-26768
|
||||
2024-03-08-14-12-13 zyga cmii-uav-brain 8033/cmii/cmii-uav-brain5.4.0
|
||||
2024-03-08-14-12-20 zyga cmii-uav-cms 8033/cmii/cmii-uav-cms5.3.0
|
||||
2024-03-08-14-12-22 zyga cmii-uav-material-warehouse 8033/cmii/cmii-uav-material-warehouse5.4.0
|
||||
2024-03-08-14-12-24 zyga cmii-admin-gateway 8033/cmii/cmii-admin-gateway5.4.0
|
||||
2024-03-08-14-12-26 zyga cmii-uav-emergency 8033/cmii/cmii-uav-emergency5.3.0
|
||||
2024-03-08-14-12-28 zyga cmii-uav-gateway 8033/cmii/cmii-uav-gateway5.4.0
|
||||
2024-03-08-14-12-31 zyga cmii-uav-integration 8033/cmii/cmii-uav-integration5.4.0-25916
|
||||
2024-03-08-14-12-37 zyga cmii-admin-data 8033/cmii/cmii-admin-data5.4.0
|
||||
2024-03-08-14-12-40 zyga cmii-suav-supervision 8033/cmii/cmii-suav-supervision5.2.0
|
||||
2024-03-08-14-12-42 zyga cmii-uav-autowaypoint 8033/cmii/cmii-uav-autowaypoint4.1.6-cm
|
||||
2024-03-08-14-12-44 zyga cmii-uav-cloud-live 8033/cmii/cmii-uav-cloud-live5.4.0
|
||||
2024-03-08-14-12-46 zyga cmii-uav-mission 8033/cmii/cmii-uav-mission5.4.0-26462-0307
|
||||
2024-03-08-14-12-48 zyga cmii-uav-oauth 8033/cmii/cmii-uav-oauth5.4.0
|
||||
2024-03-08-14-12-50 zyga cmii-uav-alarm 8033/cmii/cmii-uav-alarm5.4.0
|
||||
2024-03-08-14-12-53 zyga cmii-uav-data-post-process 8033/cmii/cmii-uav-data-post-process5.4.0
|
||||
2024-03-08-14-12-55 zyga cmii-uav-device 8033/cmii/cmii-uav-device5.4.0-25916
|
||||
2024-03-08-14-12-57 zyga cmii-uav-platform-cms-portal 8033/cmii/cmii-uav-platform-cms-portal5.4.0
|
||||
2024-03-08-14-13-01 zyga cmii-uav-platform-detection 8033/cmii/cmii-uav-platform-detection5.4.0
|
||||
2024-03-08-14-13-15 zyga cmii-uav-platform-emergency-rescue 8033/cmii/cmii-uav-platform-emergency-rescue5.2.0
|
||||
2024-03-08-14-13-19 zyga cmii-uav-platform-media 8033/cmii/cmii-uav-platform-media5.4.0
|
||||
2024-03-08-14-13-32 zyga cmii-uav-platform-open 8033/cmii/cmii-uav-platform-open5.4.0
|
||||
2024-03-08-14-13-37 zyga cmii-uav-platform-splice 8033/cmii/cmii-uav-platform-splice5.4.0
|
||||
2024-03-08-14-13-50 zyga cmii-uav-platform 8033/cmii/cmii-uav-platform5.4.0-25263
|
||||
2024-03-08-14-13-54 zyga cmii-uav-platform-ai-brain 8033/cmii/cmii-uav-platform-ai-brain5.4.0
|
||||
2024-03-08-14-14-08 zyga cmii-uav-platform-armypeople 8033/cmii/cmii-uav-platform-armypeople5.4.0
|
||||
2024-03-08-14-14-12 zyga cmii-uav-platform-oms 8033/cmii/cmii-uav-platform-oms5.4.0
|
||||
2024-03-08-14-14-26 zyga cmii-uav-platform-base 8033/cmii/cmii-uav-platform-base5.4.0
|
||||
2024-03-08-14-14-30 zyga cmii-uav-platform-mws 8033/cmii/cmii-uav-platform-mws5.4.0
|
||||
2024-03-08-14-14-44 zyga cmii-uav-platform-visualization 8033/cmii/cmii-uav-platform-visualization5.2.0
|
||||
2024-03-08-14-14-48 zyga cmii-suav-platform-supervision 8033/cmii/cmii-suav-platform-supervision5.4.0
|
||||
2024-03-08-14-15-01 zyga cmii-uav-platform-logistics 8033/cmii/cmii-uav-platform-logistics5.4.0
|
||||
2024-03-08-14-15-06 zyga cmii-uav-platform-securityh5 8033/cmii/cmii-uav-platform-securityh55.4.0
|
||||
2024-03-08-14-15-19 zyga cmii-suav-platform-supervisionh5 8033/cmii/cmii-suav-platform-supervisionh55.4.0
|
||||
2024-03-08-14-15-23 zyga cmii-uav-platform-security 8033/cmii/cmii-uav-platform-security4.1.6
|
||||
2024-03-08-14-15-37 zyga cmii-uav-platform-seniclive 8033/cmii/cmii-uav-platform-seniclive5.2.0
|
||||
2024-03-08-14-15-41 zyga cmii-uav-platform-share 8033/cmii/cmii-uav-platform-share5.4.0
|
||||
2024-03-08-14-15-55 zyga cmii-uav-platform-multiterminal 8033/cmii/cmii-uav-platform-multiterminal5.4.0
|
||||
2024-03-08-15-16-14 uavcloud-demo cmii-uav-platform 5.4.0-25263 5.4.0
|
||||
2024-03-11-11-20-15 zyga cmii-uav-surveillance 5.4.0 5.4.0-leaflet
|
||||
2024-03-11-15-42-15 uavcloud-demo cmii-uav-platform 5.4.0 5.4.0-25263-0311
|
||||
2024-03-19-17-37-53 uavcloud-demo cmii-uav-tower 5.4.0 5.4.0-0319
|
||||
2024-03-19-17-39-21 uavcloud-demo cmii-uav-airspace 5.4.0 5.4.0-0319
|
||||
2024-03-20-09-11-35 uavcloud-demo cmii-uav-mqtthandler 5.4.0-25916-1 5.4.0-25916-032001
|
||||
2024-03-20-09-12-29 uavcloud-demo cmii-uav-industrial-portfolio 5.4.0-27348-2 5.4.0-27348-032001
|
||||
2024-03-20-09-14-23 uavcloud-demo cmii-uav-platform 5.4.0-031901 5.4.0-25263-ai-032001
|
||||
2024-03-20-09-21-51 uavcloud-demo cmii-uav-platform 5.4.0-25263-ai-032001 5.4.0-031901
|
||||
2024-04-18-17-20-00 uavcloud-demo cmii-uav-integration 5.5.0 5.5.0-0418
|
||||
2024-04-19-09-30-00 uavcloud-demo cmii-uav-platform-open 5.5.0 5.5.0-0419
|
||||
2024-04-22-09-18-00 uavcloud-demo cmii-uav-airspace 5.5.0 5.5.0-0422
|
||||
2024-04-22-14-20-00 uavcloud-demo cmii-uav-airspace 5.5.0-0422 5.5.0-042201
|
||||
2024-04-22-16-57-00 uavcloud-demo cmii-uav-airspace 5.5.0-042201 5.5.0-042202
|
||||
2024-04-23-09-27-00 uavcloud-demo cmii-uav-device 5.5.0 5.5.0-042301
|
||||
2024-04-23-11-15-00 uavcloud-demo cmii-uav-platform 5.5.0 5.5.0-042301
|
||||
2024-04-23-11-17-00 uavcloud-demo cmii-suav-platform-supervision 5.5.0 5.5.0-042301
|
||||
2024-04-23-16-28-06 uavcloud-dev cmii-suav-platform-supervision 5.2.0-test 5.5.0-042301
|
||||
2024-04-23-17-35-00 uavcloud-dev cmii-uav-platform-armypeople 5.5.0-validation 5.5.0-042301
|
||||
2024-04-23-17-36-00 uavcloud-demo cmii-uav-platform-armypeople 5.5.0-042201 5.5.0-042301
|
||||
2024-04-24-12-00-00 uavcloud-demo cmii-uav-platform 5.5.0-042301 5.5.0-042401
|
||||
2024-04-24-12-00-07 uavcloud-demo cmii-uav-airspace 5.5.0-042202 5.5.0-042401
|
||||
2024-04-24-12-01-47 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-042201 5.5.0-042401
|
||||
2024-04-24-12-03-14 uavcloud-demo cmii-uav-surveillance 5.5.0 5.5.0-042401
|
||||
2024-04-24-17-30-00 uavcloud-demo cmii-uav-platform 5.5.0-042401 5.5.0-042402
|
||||
2024-04-24-17-30-07 uavcloud-demo cmii-uav-cloud-live 5.5.0 5.5.0-042401
|
||||
2024-04-24-17-31-51 uavcloud-demo cmii-uav-mission 5.5.0 5.5.0-042401
|
||||
2024-04-25-09-36-00 uavcloud-demo cmii-uav-platform 5.5.0-042402 5.5.0-042501
|
||||
2024-04-25-09-37-12 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-042401 5.5.0-042501
|
||||
2024-04-25-17-42-00 uavcloud-demo cmii-uav-platform 5.5.0-042501 5.5.0-042503
|
||||
2024-04-25-17-42-06 uavcloud-demo cmii-uav-platform-splice 5.5.0 5.5.0-042501
|
||||
2024-04-25-17-45-00 uavcloud-demo cmii-uav-data-post-process 5.5.0 5.5.0-042501
|
||||
2024-04-26-17-55-00 uavcloud-demo cmii-uav-platform-splice 5.5.0-042501 5.5.0-042601
|
||||
2024-04-28-12-03-00 uavcloud-demo cmii-uav-platform-cms-portal 5.5.0 5.5.0-042801
|
||||
2024-04-28-12-03-05 uavcloud-demo cmii-uav-platform 5.5.0-042503 5.5.0-042801
|
||||
2024-04-28-12-03-10 uavcloud-demo cmii-uav-platform-oms 5.5.0 5.5.0-042801
|
||||
2024-04-28-12-03-13 uavcloud-demo cmii-uav-user 5.5.0 5.5.0-042801
|
||||
2024-04-29-11-25-00 uavcloud-demo cmii-uav-platform 5.5.0-042801 5.5.0-042901
|
||||
2024-04-29-12-08-01 uavcloud-demo cmii-uav-mqtthandler 5.5.0 5.5.0-042901
|
||||
2024-04-29-12-13-03 uavcloud-demo cmii-uav-mission 5.5.0-042401 5.5.0-042901
|
||||
2024-04-29-12-14-37 uavcloud-demo cmii-uav-surveillance 5.5.0-042401 5.5.0-042901
|
||||
2024-04-29-12-14-38 uavcloud-demo cmii-uav-mqtthandler 5.5.0-042901 5.5.0
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
2024-04-18-17-20-00 uavcloud-demo cmii-uav-integration 5.5.0 5.5.0-0418
|
||||
2024-04-19-09-30-00 uavcloud-demo cmii-uav-platform-open 5.5.0 5.5.0-0419
|
||||
2024-04-22-09-18-00 uavcloud-demo cmii-uav-airspace 5.5.0 5.5.0-0422
|
||||
2024-04-22-14-20-00 uavcloud-demo cmii-uav-airspace 5.5.0-0422 5.5.0-042201
|
||||
2024-04-22-16-57-00 uavcloud-demo cmii-uav-airspace 5.5.0-042201 5.5.0-042202
|
||||
2024-04-23-09-27-00 uavcloud-demo cmii-uav-device 5.5.0 5.5.0-042301
|
||||
2024-04-23-11-15-00 uavcloud-demo cmii-uav-platform 5.5.0 5.5.0-042301
|
||||
2024-04-23-11-17-00 uavcloud-demo cmii-suav-platform-supervision 5.5.0 5.5.0-042301
|
||||
2024-04-23-16-28-06 uavcloud-dev cmii-suav-platform-supervision 5.2.0-test 5.5.0-042301
|
||||
2024-04-23-17-35-00 uavcloud-dev cmii-uav-platform-armypeople 5.5.0-validation 5.5.0-042301
|
||||
2024-04-23-17-36-00 uavcloud-demo cmii-uav-platform-armypeople 5.5.0-042201 5.5.0-042301
|
||||
2024-04-24-12-00-00 uavcloud-demo cmii-uav-platform 5.5.0-042301 5.5.0-042401
|
||||
2024-04-24-12-00-07 uavcloud-demo cmii-uav-airspace 5.5.0-042202 5.5.0-042401
|
||||
2024-04-24-12-01-47 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-042201 5.5.0-042401
|
||||
2024-04-24-12-03-14 uavcloud-demo cmii-uav-surveillance 5.5.0 5.5.0-042401
|
||||
2024-04-24-17-30-00 uavcloud-demo cmii-uav-platform 5.5.0-042401 5.5.0-042402
|
||||
2024-04-24-17-30-07 uavcloud-demo cmii-uav-cloud-live 5.5.0 5.5.0-042401
|
||||
2024-04-24-17-31-51 uavcloud-demo cmii-uav-mission 5.5.0 5.5.0-042401
|
||||
2024-04-25-09-36-00 uavcloud-demo cmii-uav-platform 5.5.0-042402 5.5.0-042501
|
||||
2024-04-25-09-37-12 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-042401 5.5.0-042501
|
||||
2024-04-25-17-42-00 uavcloud-demo cmii-uav-platform 5.5.0-042501 5.5.0-042503
|
||||
2024-04-25-17-42-06 uavcloud-demo cmii-uav-platform-splice 5.5.0 5.5.0-042501
|
||||
2024-04-25-17-45-00 uavcloud-demo cmii-uav-data-post-process 5.5.0 5.5.0-042501
|
||||
2024-04-26-17-55-00 uavcloud-demo cmii-uav-platform-splice 5.5.0-042501 5.5.0-042601
|
||||
2024-04-28-12-03-00 uavcloud-demo cmii-uav-platform-cms-portal 5.5.0 5.5.0-042801
|
||||
2024-04-28-12-03-05 uavcloud-demo cmii-uav-platform 5.5.0-042503 5.5.0-042801
|
||||
2024-04-28-12-03-10 uavcloud-demo cmii-uav-platform-oms 5.5.0 5.5.0-042801
|
||||
2024-04-28-12-03-13 uavcloud-demo cmii-uav-user 5.5.0 5.5.0-042801
|
||||
@@ -91,7 +91,7 @@ public class FakeDataUtils {
|
||||
|
||||
ServerInfoVO serverInfoVO = ServerInfoVO
|
||||
.builder()
|
||||
.topicName(agentTopicName)
|
||||
.agentTopicName(agentTopicName)
|
||||
.serverName(serverName)
|
||||
.serverIpPbV4(publicIpV4)
|
||||
.serverIpPbV6(publicIpV6)
|
||||
|
||||
@@ -118,7 +118,7 @@ public class AppFuncScheduler {
|
||||
|
||||
String masterTopicName = projectDeployContext
|
||||
.getMasterNode()
|
||||
.getTopicName();
|
||||
.getAgentTopicName();
|
||||
|
||||
List<AppFunctionEnum> masterAppProcedure = projectDeployContext.getMasterAppProcedure();
|
||||
if (CollectionUtils.isEmpty(masterAppProcedure)) {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class BaseFuncScheduler {
|
||||
|
||||
String masterTopicName = projectDeployContext
|
||||
.getMasterNode()
|
||||
.getTopicName();
|
||||
.getAgentTopicName();
|
||||
|
||||
return serverDoRunProcedure(
|
||||
true,
|
||||
@@ -105,7 +105,7 @@ public class BaseFuncScheduler {
|
||||
List<String> agentTopicNameList = projectDeployContext
|
||||
.getAgentNodeList()
|
||||
.stream()
|
||||
.map(ServerInfoPO::getTopicName)
|
||||
.map(ServerInfoPO::getAgentTopicName)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (String agentTopicName : agentTopicNameList) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class HarborFuncScheduler {
|
||||
// 执行 基础功能施工的内容
|
||||
String masterTopicName = projectDeployContext
|
||||
.getMasterNode()
|
||||
.getTopicName();
|
||||
.getAgentTopicName();
|
||||
|
||||
// create harbor project
|
||||
if (!CreateHarborProject(projectDeployContext)) {
|
||||
@@ -123,7 +123,7 @@ public class HarborFuncScheduler {
|
||||
|
||||
// send harbor create message
|
||||
boolean createProjectOK = funcService.callHarborFuncAndJudge(
|
||||
masterNode.getTopicName(),
|
||||
masterNode.getAgentTopicName(),
|
||||
HarborFunctionEnum.CREATE_PROJECT,
|
||||
createProjectArgList
|
||||
);
|
||||
@@ -156,7 +156,7 @@ public class HarborFuncScheduler {
|
||||
|
||||
// send harbor create message
|
||||
boolean listProjectOK = funcService.callHarborFuncAndJudge(
|
||||
masterNode.getTopicName(),
|
||||
masterNode.getAgentTopicName(),
|
||||
HarborFunctionEnum.LIST_PROJECT,
|
||||
listProjectArgList
|
||||
);
|
||||
@@ -202,7 +202,7 @@ public class HarborFuncScheduler {
|
||||
);
|
||||
|
||||
boolean syncHarborProjectOk = funcService.callHarborFuncAndJudge(
|
||||
masterNode.getTopicName(),
|
||||
masterNode.getAgentTopicName(),
|
||||
HarborFunctionEnum.SYNC_PROJECT_BETWEEN_HARBOR,
|
||||
syncHarborArgList
|
||||
);
|
||||
@@ -269,7 +269,7 @@ public class HarborFuncScheduler {
|
||||
);
|
||||
|
||||
return funcService.callHarborFuncAndJudge(
|
||||
masterNode.getTopicName(),
|
||||
masterNode.getAgentTopicName(),
|
||||
HarborFunctionEnum.SYNC_STATUS_HARBOR,
|
||||
syncHarborArgList
|
||||
);
|
||||
|
||||
@@ -116,7 +116,7 @@ public class ImageFuncScheduler {
|
||||
|
||||
ArrayList<String> imageSyncFuncArgs = imageSyncContext.getImageSyncFuncArgs();
|
||||
|
||||
String outsideAgentTopicName = imageSyncContext.getProjectMasterNode().getTopicName();
|
||||
String outsideAgentTopicName = imageSyncContext.getProjectMasterNode().getAgentTopicName();
|
||||
|
||||
// 设置消息体
|
||||
ImageSyncMessage imageSyncMessage = imageSyncContext.getImageSyncMessage();
|
||||
@@ -124,7 +124,7 @@ public class ImageFuncScheduler {
|
||||
imageSyncMessage.setProjectNameSpace(imageSyncContext.getProjectInfoPO().getProjectNamespace());
|
||||
imageSyncMessage.setProjectName(imageSyncContext.getProjectInfoPO().getProjectName());
|
||||
imageSyncMessage.setInnerWorkTopicName(imageSyncContext.getInnerWorkerAgentName());
|
||||
imageSyncMessage.setProjectMasterTopicName(imageSyncContext.getProjectMasterNode().getTopicName());
|
||||
imageSyncMessage.setProjectMasterTopicName(imageSyncContext.getProjectMasterNode().getAgentTopicName());
|
||||
imageSyncMessage.setProjectMasterIP(imageSyncContext.getProjectMasterNode().getServerIpInV4());
|
||||
|
||||
//
|
||||
@@ -156,6 +156,8 @@ public class ImageFuncScheduler {
|
||||
log.info("Image Sync Half Complete ! Gzip file name => {}", gzipFileName);
|
||||
if (imageSyncContext.getDownloadAndCompressOnly()) {
|
||||
log.info("Image Sync download only !");
|
||||
imageSyncMessage.setCurrentProcedure(FINISHED.getFuncName());
|
||||
imageSyncMessage.setIsSyncFinished(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ import io.wdd.func.xray.beans.node.ProxyNode;
|
||||
import io.wdd.func.xray.beans.node.XrayConfigInfo;
|
||||
import io.wdd.func.xray.service.XrayCallAgent;
|
||||
import io.wdd.func.xray.service.XrayCoreService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
@@ -17,7 +20,7 @@ import java.util.List;
|
||||
|
||||
import static io.wdd.func.xray.persisit.cache.ProxyNodeCache.PROXY_NODE_TOPIC_NAME_MAP;
|
||||
|
||||
@RestController
|
||||
//@RestController
|
||||
@RequestMapping("/server/func/xray")
|
||||
@Api(tags = "Xray控制")
|
||||
public class XrayController {
|
||||
|
||||
@@ -65,12 +65,14 @@ public class XrayDBOperator {
|
||||
.getLocation()
|
||||
.split(" ")[0];
|
||||
|
||||
serverCity = "Chengdu";
|
||||
|
||||
// fix bug for Seoul的情况 tmd
|
||||
if (!ALL_SERVER_CITY_INDEX.containsKey(serverCity)) {
|
||||
serverCity = serverInfoVO
|
||||
.getLocation()
|
||||
.split(" ")[1];
|
||||
}
|
||||
// if (!ALL_SERVER_CITY_INDEX.containsKey(serverCity) && serverInfoVO) {
|
||||
// serverCity = serverInfoVO
|
||||
// .getLocation()
|
||||
// .split(" ")[1];
|
||||
// }
|
||||
|
||||
int cityBitMapBase = ALL_SERVER_CITY_INDEX.get(serverCity) * 10;
|
||||
int serverGraphNum = cityBitMapBase;
|
||||
@@ -84,7 +86,7 @@ public class XrayDBOperator {
|
||||
|
||||
return ProxyNode
|
||||
.builder()
|
||||
.agentTopicName(serverInfoVO.getTopicName())
|
||||
.agentTopicName(serverInfoVO.getAgentTopicName())
|
||||
.num(serverGraphNum)
|
||||
.publicIPv4(serverInfoVO.getServerIpPbV4())
|
||||
.publicIPv6(serverInfoVO.getServerIpPbV6())
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.wdd.rpc.init;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import io.wdd.common.handler.MyRuntimeException;
|
||||
import io.wdd.common.utils.TimeUtils;
|
||||
import io.wdd.rpc.message.OctopusMessage;
|
||||
@@ -12,20 +11,17 @@ import io.wdd.rpc.message.sender.OMessageToAgentSender;
|
||||
import io.wdd.rpc.status.deprecate.AgentStatus;
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
import io.wdd.server.utils.DaemonDatabaseOperator;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.*;
|
||||
import org.springframework.amqp.support.AmqpHeaders;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.messaging.handler.annotation.Header;
|
||||
import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static io.wdd.common.config.OctopusObjectMapperConfig.OctopusObjectMapper;
|
||||
|
||||
@@ -103,7 +99,6 @@ public class AcceptAgentInitInfo {
|
||||
*
|
||||
* @param message the message
|
||||
*/
|
||||
@SneakyThrows
|
||||
@RabbitHandler
|
||||
@RabbitListener(
|
||||
bindings =
|
||||
@@ -113,14 +108,14 @@ public class AcceptAgentInitInfo {
|
||||
key = {"${octopus.message.init_to_server_key}"}
|
||||
)
|
||||
,
|
||||
ackMode = "MANUAL"
|
||||
ackMode = "AUTO"
|
||||
)
|
||||
public void handleOctopusAgentBootUpInfo(Message message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) {
|
||||
public void handleOctopusAgentBootUpInfo(@Payload Message message) {
|
||||
|
||||
// manual ack the rabbit message
|
||||
// https://stackoverflow.com/questions/38728668/spring-rabbitmq-using-manual-channel-acknowledgement-on-a-service-with-rabbit
|
||||
|
||||
ServerInfoVO serverInfoVO;
|
||||
ServerInfoVO serverInfoVO = null;
|
||||
|
||||
try {
|
||||
|
||||
@@ -141,19 +136,17 @@ public class AcceptAgentInitInfo {
|
||||
|
||||
// 2. generate the unique topic for agent
|
||||
String agentQueueTopic = generateAgentQueueTopic(serverInfoVO);
|
||||
serverInfoVO.setTopicName(agentQueueTopic);
|
||||
|
||||
// cache enabled for agent re-register
|
||||
// if (!checkAgentAlreadyRegister(agentQueueTopic)) {
|
||||
// log.info("[AGENT INIT] - agent not exist ! start to register !");
|
||||
// }
|
||||
if (StringUtils.isBlank(agentQueueTopic)) {
|
||||
throw new RuntimeException("agent topic name generate error!");
|
||||
}
|
||||
serverInfoVO.setAgentTopicName(agentQueueTopic);
|
||||
|
||||
// whether agent is registered already
|
||||
// save or update the octopus agent server info
|
||||
// 3. save the agent info into database
|
||||
// backend fixed thread daemon to operate the database ensuring the operation is correct !
|
||||
if (!databaseOperator.saveInitOctopusAgentInfo(serverInfoVO)) {
|
||||
throw new MyRuntimeException("database save agent info error !");
|
||||
throw new RuntimeException("database save agent info error !");
|
||||
}
|
||||
|
||||
// 4. generate the Octopus Agent Status Redis Stream Key & Consumer-Group
|
||||
@@ -162,55 +155,14 @@ public class AcceptAgentInitInfo {
|
||||
// 5. send InitMessage to agent
|
||||
sendInitMessageToAgent(serverInfoVO);
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
/**
|
||||
* 有异常就绝收消息
|
||||
* basicNack(long deliveryTag, boolean multiple, boolean requeue)
|
||||
* requeue:true为将消息重返当前消息队列,还可以重新发送给消费者;
|
||||
* false:将消息丢弃
|
||||
*/
|
||||
|
||||
// long deliveryTag, boolean multiple, boolean requeue
|
||||
|
||||
channel.basicNack(
|
||||
deliveryTag,
|
||||
false,
|
||||
true
|
||||
);
|
||||
// long deliveryTag, boolean requeue
|
||||
// channel.basicReject(deliveryTag,true);
|
||||
|
||||
// 这里只是便于出现死循环时查看
|
||||
TimeUnit.SECONDS.sleep(5);
|
||||
|
||||
/*
|
||||
* 一般实际异常情况下的处理过程:记录出现异常的业务数据,将它单独插入到一个单独的模块,
|
||||
* 然后尝试3次,如果还是处理失败的话,就进行人工介入处理
|
||||
*/
|
||||
|
||||
|
||||
throw new MyRuntimeException("Octopus Server Initialization Error, please check !");
|
||||
} catch (Exception e) {
|
||||
log.error("handle init_to_server queue error => {}", e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 无异常就确认消息
|
||||
* 无异常就确认消息
|
||||
* basicAck(long deliveryTag, boolean multiple)
|
||||
* deliveryTag:取出来当前消息在队列中的的索引;
|
||||
* multiple:为true的话就是批量确认,如果当前deliveryTag为5,那么就会确认
|
||||
* deliveryTag为5及其以下的消息;一般设置为false
|
||||
*/
|
||||
// ack the rabbitmq info
|
||||
// If all logic is successful
|
||||
log.info(
|
||||
"Agent [ {} ] has init successfully !",
|
||||
serverInfoVO.getTopicName()
|
||||
);
|
||||
channel.basicAck(
|
||||
deliveryTag,
|
||||
false
|
||||
serverInfoVO.getAgentTopicName()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -259,7 +211,7 @@ public class AcceptAgentInitInfo {
|
||||
// should be the OctopusExchange Name
|
||||
.content(serverInfoContent)
|
||||
.init_time(TimeUtils.currentFormatTime())
|
||||
.uuid(serverInfoVO.getTopicName())
|
||||
.uuid(serverInfoVO.getAgentTopicName())
|
||||
.build();
|
||||
|
||||
oMessageToAgentSender.sendINIT(octopusMessage);
|
||||
@@ -303,7 +255,7 @@ public class AcceptAgentInitInfo {
|
||||
"city are not validated from agent are {}",
|
||||
serverInfoVO
|
||||
);
|
||||
throw new MyRuntimeException("server name not validated !");
|
||||
return "";
|
||||
}
|
||||
|
||||
String machineIdPrefixSixBytes = String.valueOf(
|
||||
@@ -311,7 +263,7 @@ public class AcceptAgentInitInfo {
|
||||
.getMachineId()
|
||||
.toCharArray(),
|
||||
0,
|
||||
6
|
||||
8
|
||||
);
|
||||
|
||||
return serverName + "-" + machineIdPrefixSixBytes;
|
||||
|
||||
@@ -179,7 +179,7 @@ public class AllAgentStatusCache {
|
||||
|
||||
List<String> collect = allAgentInfo
|
||||
.stream()
|
||||
.map(ServerInfoPO::getTopicName)
|
||||
.map(ServerInfoPO::getAgentTopicName)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
ALL_AGENT_TOPIC_NAME_LIST.addAll(collect);
|
||||
|
||||
@@ -31,8 +31,8 @@ public class ServerInfoPO implements Serializable {
|
||||
/**
|
||||
* octopus message unique key name
|
||||
*/
|
||||
@TableField(value = "topic_name")
|
||||
private String topicName;
|
||||
@TableField(value = "agent_topic_name")
|
||||
private String agentTopicName;
|
||||
|
||||
/**
|
||||
* server host name
|
||||
@@ -93,11 +93,35 @@ public class ServerInfoPO implements Serializable {
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* server location , type City Country
|
||||
* 服务器所在的城市信息
|
||||
*/
|
||||
@TableField(value = "city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@TableField(value = "province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@TableField(value = "country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
@TableField(value = "location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 时区
|
||||
*/
|
||||
@TableField(value = "timezone")
|
||||
private String timezone;
|
||||
|
||||
/**
|
||||
* server isp manager
|
||||
*/
|
||||
@@ -116,12 +140,24 @@ public class ServerInfoPO implements Serializable {
|
||||
@TableField(value = "cpu_core")
|
||||
private String cpuCore;
|
||||
|
||||
/**
|
||||
* cpu架构 amd64
|
||||
*/
|
||||
@TableField(value = "cpu_arch")
|
||||
private String cpuArch;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "memory_total")
|
||||
private String memoryTotal;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "swap_total")
|
||||
private String swapTotal;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -152,6 +188,36 @@ public class ServerInfoPO implements Serializable {
|
||||
@TableField(value = "virtualization")
|
||||
private String virtualization;
|
||||
|
||||
/**
|
||||
* 操作系统平台
|
||||
*/
|
||||
@TableField(value = "platform")
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* 操作系统具体类别
|
||||
*/
|
||||
@TableField(value = "platform_family")
|
||||
private String platformFamily;
|
||||
|
||||
/**
|
||||
* 操作系统的版本
|
||||
*/
|
||||
@TableField(value = "platform_version")
|
||||
private String platformVersion;
|
||||
|
||||
/**
|
||||
* 内核版本
|
||||
*/
|
||||
@TableField(value = "kernel_version")
|
||||
private String kernelVersion;
|
||||
|
||||
/**
|
||||
* 内核的架构 x86_64
|
||||
*/
|
||||
@TableField(value = "kernel_arch")
|
||||
private String kernelArch;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -189,10 +255,10 @@ public class ServerInfoPO implements Serializable {
|
||||
private Integer isDelete;
|
||||
|
||||
/**
|
||||
* optimistic lock for concurrent
|
||||
* Agent的版本信息
|
||||
*/
|
||||
@TableField(value = "version")
|
||||
private Integer version;
|
||||
@TableField(value = "agent_version")
|
||||
private String agentVersion;
|
||||
|
||||
/**
|
||||
* 服务器的角色信息
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package io.wdd.server.beans.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -22,134 +20,246 @@ public class ServerInfoVO {
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
@TableField(value = "tenant_name")
|
||||
private String tenantName;
|
||||
|
||||
/**
|
||||
* octopus message unique key name
|
||||
*/
|
||||
@TableField(value = "agent_topic_name")
|
||||
private String agentTopicName;
|
||||
|
||||
/**
|
||||
* server host name
|
||||
*/
|
||||
@TableField(value = "server_name")
|
||||
private String serverName;
|
||||
|
||||
/**
|
||||
* server public ipv4
|
||||
|
||||
*/
|
||||
@TableField(value = "server_ip_pb_v4")
|
||||
private String serverIpPbV4;
|
||||
|
||||
/**
|
||||
* server inner ipv4
|
||||
|
||||
*/
|
||||
@TableField(value = "server_ip_in_v4")
|
||||
private String serverIpInV4;
|
||||
|
||||
/**
|
||||
* server public ipv6
|
||||
|
||||
*/
|
||||
@TableField(value = "server_ip_pb_v6")
|
||||
private String serverIpPbV6;
|
||||
|
||||
/**
|
||||
* server inner ipv6
|
||||
|
||||
*/
|
||||
@TableField(value = "server_ip_in_v6")
|
||||
private String serverIpInV6;
|
||||
|
||||
/**
|
||||
* server register time
|
||||
*/
|
||||
@TableField(value = "register_time")
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
* expire time
|
||||
*/
|
||||
@TableField(value = "expire_time")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer proxyType;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* server location , type City Country
|
||||
* 服务器所在的城市信息
|
||||
*/
|
||||
@TableField(value = "city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@TableField(value = "province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@TableField(value = "country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
@TableField(value = "location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 时区
|
||||
*/
|
||||
@TableField(value = "timezone")
|
||||
private String timezone;
|
||||
|
||||
/**
|
||||
* server isp manager
|
||||
*/
|
||||
@TableField(value = "provider")
|
||||
private String provider;
|
||||
|
||||
/**
|
||||
* split by ,
|
||||
*/
|
||||
private String managePort;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "cpu_brand")
|
||||
private String cpuBrand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "cpu_core")
|
||||
private String cpuCore;
|
||||
|
||||
/**
|
||||
* cpu架构 amd64
|
||||
*/
|
||||
@TableField(value = "cpu_arch")
|
||||
private String cpuArch;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "memory_total")
|
||||
private String memoryTotal;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "swap_total")
|
||||
private String swapTotal;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "disk_total")
|
||||
private String diskTotal;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "disk_usage")
|
||||
private String diskUsage;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "io_speed")
|
||||
private String ioSpeed;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "tcp_control")
|
||||
private String tcpControl;
|
||||
|
||||
/**
|
||||
* server virtualization method
|
||||
*/
|
||||
@TableField(value = "virtualization")
|
||||
private String virtualization;
|
||||
|
||||
/**
|
||||
* 操作系统平台
|
||||
*/
|
||||
@TableField(value = "platform")
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* 操作系统具体类别
|
||||
*/
|
||||
@TableField(value = "platform_family")
|
||||
private String platformFamily;
|
||||
|
||||
/**
|
||||
* 操作系统的版本
|
||||
*/
|
||||
@TableField(value = "platform_version")
|
||||
private String platformVersion;
|
||||
|
||||
/**
|
||||
* 内核版本
|
||||
*/
|
||||
@TableField(value = "kernel_version")
|
||||
private String kernelVersion;
|
||||
|
||||
/**
|
||||
* 内核的架构 x86_64
|
||||
*/
|
||||
@TableField(value = "kernel_arch")
|
||||
private String kernelArch;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "os_info")
|
||||
private String osInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "os_kernel_info")
|
||||
private String osKernelInfo;
|
||||
|
||||
/**
|
||||
* 服务器能否访问公网
|
||||
*/
|
||||
@TableField(value = "can_access_public")
|
||||
private Integer canAccessPublic;
|
||||
|
||||
/**
|
||||
* machine uuid from /etc/machineid
|
||||
*/
|
||||
@TableField(value = "machine_id")
|
||||
private String machineId;
|
||||
|
||||
/**
|
||||
* octopus message unique key name
|
||||
*/
|
||||
private String topicName;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "comment")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 0 alive || 1 deleted
|
||||
*/
|
||||
@TableField(value = "is_delete")
|
||||
private Integer isDelete;
|
||||
|
||||
/**
|
||||
* Agent的版本信息
|
||||
*/
|
||||
@TableField(value = "agent_version")
|
||||
private String agentVersion;
|
||||
|
||||
/**
|
||||
* 服务器的角色信息
|
||||
*/
|
||||
@TableField(value = "role")
|
||||
private String role;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.wdd.server.beans.po.ServerInfoPO;
|
||||
/**
|
||||
* @author wddsh
|
||||
* @description 针对表【server_info】的数据库操作Mapper
|
||||
* @createDate 2024-03-26 18:11:29
|
||||
* @createDate 2024-04-29 16:46:02
|
||||
* @Entity io.wdd.server.beans.po.ServerInfoPO
|
||||
*/
|
||||
public interface ServerInfoMapper extends BaseMapper<ServerInfoPO> {
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.wdd.server.beans.po.ServerInfoPO;
|
||||
/**
|
||||
* @author wddsh
|
||||
* @description 针对表【server_info】的数据库操作Service
|
||||
* @createDate 2024-03-26 18:11:29
|
||||
* @createDate 2024-04-29 16:46:02
|
||||
*/
|
||||
public interface ServerInfoService extends IService<ServerInfoPO> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* @author wddsh
|
||||
* @description 针对表【server_info】的数据库操作Service实现
|
||||
* @createDate 2024-03-26 18:11:29
|
||||
* @createDate 2024-04-29 16:46:02
|
||||
*/
|
||||
@Service
|
||||
public class ServerInfoServiceImpl extends ServiceImpl<ServerInfoMapper, ServerInfoPO>
|
||||
|
||||
@@ -9,7 +9,7 @@ spring:
|
||||
allow-circular-references: true
|
||||
allow-bean-definition-overriding: true
|
||||
rabbitmq:
|
||||
host: 42.192.52.227
|
||||
host: 10.250.0.100
|
||||
port: 20672
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
@@ -22,9 +22,9 @@ spring:
|
||||
enabled: true
|
||||
# retry interval unit ms
|
||||
max-interval: 65000
|
||||
initial-interval: 65000
|
||||
initial-interval: 2000
|
||||
redis:
|
||||
host: 42.192.52.227
|
||||
host: 10.250.0.100
|
||||
port: 21370
|
||||
database: 0
|
||||
password: boge8tingH
|
||||
@@ -46,7 +46,7 @@ spring:
|
||||
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://42.192.52.227:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://10.250.0.100:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<resultMap id="BaseResultMap" type="io.wdd.server.beans.po.ServerInfoPO">
|
||||
<id property="serverId" column="server_id" jdbcType="BIGINT"/>
|
||||
<result property="tenantName" column="tenant_name" jdbcType="VARCHAR"/>
|
||||
<result property="topicName" column="topic_name" jdbcType="VARCHAR"/>
|
||||
<result property="agentTopicName" column="agent_topic_name" jdbcType="VARCHAR"/>
|
||||
<result property="serverName" column="server_name" jdbcType="VARCHAR"/>
|
||||
<result property="serverIpPbV4" column="server_ip_pb_v4" jdbcType="VARCHAR"/>
|
||||
<result property="serverIpInV4" column="server_ip_in_v4" jdbcType="VARCHAR"/>
|
||||
@@ -17,37 +17,52 @@
|
||||
<result property="expireTime" column="expire_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="city" column="city" jdbcType="VARCHAR"/>
|
||||
<result property="province" column="province" jdbcType="VARCHAR"/>
|
||||
<result property="country" column="country" jdbcType="VARCHAR"/>
|
||||
<result property="location" column="location" jdbcType="VARCHAR"/>
|
||||
<result property="timezone" column="timezone" jdbcType="VARCHAR"/>
|
||||
<result property="provider" column="provider" jdbcType="VARCHAR"/>
|
||||
<result property="cpuBrand" column="cpu_brand" jdbcType="VARCHAR"/>
|
||||
<result property="cpuCore" column="cpu_core" jdbcType="VARCHAR"/>
|
||||
<result property="cpuArch" column="cpu_arch" jdbcType="VARCHAR"/>
|
||||
<result property="memoryTotal" column="memory_total" jdbcType="VARCHAR"/>
|
||||
<result property="swapTotal" column="swap_total" jdbcType="VARCHAR"/>
|
||||
<result property="diskTotal" column="disk_total" jdbcType="VARCHAR"/>
|
||||
<result property="diskUsage" column="disk_usage" jdbcType="VARCHAR"/>
|
||||
<result property="ioSpeed" column="io_speed" jdbcType="VARCHAR"/>
|
||||
<result property="tcpControl" column="tcp_control" jdbcType="VARCHAR"/>
|
||||
<result property="virtualization" column="virtualization" jdbcType="VARCHAR"/>
|
||||
<result property="platform" column="platform" jdbcType="VARCHAR"/>
|
||||
<result property="platformFamily" column="platform_family" jdbcType="VARCHAR"/>
|
||||
<result property="platformVersion" column="platform_version" jdbcType="VARCHAR"/>
|
||||
<result property="kernelVersion" column="kernel_version" jdbcType="VARCHAR"/>
|
||||
<result property="kernelArch" column="kernel_arch" jdbcType="VARCHAR"/>
|
||||
<result property="osInfo" column="os_info" jdbcType="VARCHAR"/>
|
||||
<result property="osKernelInfo" column="os_kernel_info" jdbcType="VARCHAR"/>
|
||||
<result property="canAccessPublic" column="can_access_public" jdbcType="TINYINT"/>
|
||||
<result property="machineId" column="machine_id" jdbcType="VARCHAR"/>
|
||||
<result property="comment" column="comment" jdbcType="VARCHAR"/>
|
||||
<result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
|
||||
<result property="version" column="version" jdbcType="INTEGER"/>
|
||||
<result property="agentVersion" column="agent_version" jdbcType="VARCHAR"/>
|
||||
<result property="role" column="role" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
server_id
|
||||
,tenant_name,topic_name,
|
||||
,tenant_name,agent_topic_name,
|
||||
server_name,server_ip_pb_v4,server_ip_in_v4,
|
||||
server_ip_pb_v6,server_ip_in_v6,register_time,
|
||||
expire_time,update_time,create_time,
|
||||
location,provider,cpu_brand,
|
||||
cpu_core,memory_total,disk_total,
|
||||
city,province,country,
|
||||
location,timezone,provider,
|
||||
cpu_brand,cpu_core,cpu_arch,
|
||||
memory_total,swap_total,disk_total,
|
||||
disk_usage,io_speed,tcp_control,
|
||||
virtualization,os_info,os_kernel_info,
|
||||
can_access_public,machine_id,comment,
|
||||
is_delete,version,role
|
||||
virtualization,platform,platform_family,
|
||||
platform_version,kernel_version,kernel_arch,
|
||||
os_info,os_kernel_info,can_access_public,
|
||||
machine_id,comment,is_delete,
|
||||
agent_version,role
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -44,7 +44,7 @@ public class TestImageSyncScheduler {
|
||||
ArrayList<String> ImageFullNameList = new ArrayList<>(List.of(
|
||||
// "harbor.cdcyy.com.cn/cmii/cmii-live-operator:5.2.0",
|
||||
// "harbor.cdcyy.com.cn/cmii/cmii/srs:v5.0.195"
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-mission:5.3.0-cqly-042901"
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-platform:5.3.0-cqly-042902"
|
||||
));
|
||||
|
||||
Boolean downloadAndCompressOnly = false;
|
||||
@@ -102,7 +102,7 @@ public class TestImageSyncScheduler {
|
||||
));
|
||||
|
||||
ArrayList<String> ImageFullNameList = new ArrayList<>(List.of(
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-industrial-portfolio:5.4.0-cqly-042801"
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-platform:5.3.0-cqly-042901"
|
||||
));
|
||||
|
||||
Boolean downloadAndCompressOnly = true;
|
||||
|
||||
Reference in New Issue
Block a user