[ Cmii ] [ Octopus ] - project a lot
This commit is contained in:
55
agent-go/BastionInitializaion.go
Normal file
55
agent-go/BastionInitializaion.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"wdd.io/agent-go/executor"
|
||||
"wdd.io/agent-go/register"
|
||||
"wdd.io/agent-go/status"
|
||||
)
|
||||
|
||||
func BastionModeInit() {
|
||||
|
||||
// Build For Operator
|
||||
agentServerInfo := ®ister.AgentServerInfo{
|
||||
ServerName: "BastionSingle",
|
||||
ServerIPPbV4: "127.0.0.1",
|
||||
ServerIPInV4: "127.0.0.1",
|
||||
ServerIPPbV6: "",
|
||||
ServerIPInV6: "",
|
||||
Location: "Bastion",
|
||||
Provider: "Bastion",
|
||||
ManagePort: "22",
|
||||
CPUCore: "",
|
||||
CPUBrand: "",
|
||||
OSInfo: "",
|
||||
OSKernelInfo: "",
|
||||
TCPControl: "",
|
||||
Virtualization: "",
|
||||
Platform: "",
|
||||
PlatformFamily: "",
|
||||
PlatformVersion: "",
|
||||
KernelVersion: "",
|
||||
KernelArch: "",
|
||||
IoSpeed: "",
|
||||
MemoryTotal: "",
|
||||
DiskTotal: "",
|
||||
DiskUsage: "",
|
||||
Comment: "",
|
||||
MachineID: "",
|
||||
AgentVersion: "",
|
||||
TopicName: "BastionNode",
|
||||
}
|
||||
|
||||
// re-get agentInfo from status module
|
||||
agentInfo := status.ReportAgentInfo()
|
||||
refreshAgentInfoByStatusInfo(agentInfo, agentServerInfo)
|
||||
BuildAgentOsOperator(agentInfo, agentServerInfo)
|
||||
|
||||
// install docker
|
||||
agentOsOperator := executor.AgentOsOperatorCache
|
||||
// boot up minio & rabbitmq
|
||||
agentOsOperator.InstallDockerFromLocalExec(nil)
|
||||
agentOsOperator.InstallDockerComposeFromLocalExec()
|
||||
|
||||
// build for socks server
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user