[agent-deploy] - xzyd project
This commit is contained in:
@@ -100,48 +100,45 @@ func BastionModeInit() {
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
bastion_init.PrintBastionHelp()
|
||||
|
||||
for {
|
||||
fmt.Println()
|
||||
fmt.Print("enter ==> ")
|
||||
|
||||
fmt.Println()
|
||||
fmt.Print("enter ==> ")
|
||||
text, _ := reader.ReadString('\n')
|
||||
text = strings.TrimSpace(text)
|
||||
inputCommand := uniformInputCommand(text)
|
||||
fmt.Println("inputCommand: ", inputCommand)
|
||||
fmt.Println()
|
||||
|
||||
text, _ := reader.ReadString('\n')
|
||||
text = strings.TrimSpace(text)
|
||||
inputCommand := uniformInputCommand(text)
|
||||
fmt.Println("inputCommand: ", inputCommand)
|
||||
fmt.Println()
|
||||
|
||||
// execute the function
|
||||
switch inputCommand {
|
||||
case InstallDefaultSsh:
|
||||
beautifulPrintExeResult(agentOperator.InstallDefaultSshBastion())
|
||||
case DisableSwap:
|
||||
beautifulPrintExeResult(agentOperator.DisableSwapBastion())
|
||||
case DisableSelinux:
|
||||
beautifulPrintExeResult(agentOperator.DisableSelinuxBastion())
|
||||
case DisableFirewall:
|
||||
beautifulPrintExeResult(agentOperator.DisableFirewallBastion())
|
||||
case ModifySysConfig:
|
||||
beautifulPrintExeResult(agentOperator.ModifySysConfigBastion())
|
||||
case InstallDocker:
|
||||
beautifulPrintExeResult(agentOperator.InstallDockerBastion())
|
||||
case ModifyDockerConfig:
|
||||
beautifulPrintExeResult(agentOperator.ModifyDockerConfigBastion())
|
||||
case InstallDockerCompose:
|
||||
beautifulPrintExeResult(agentOperator.InstallDockerComposeBastion())
|
||||
case InstallMinio:
|
||||
agentOperator.InstallMinioBastion()
|
||||
case InstallHarbor:
|
||||
beautifulPrintExeResult(agentOperator.InstallHarborBastion())
|
||||
case RemoveDocker:
|
||||
beautifulPrintExeResult(agentOperator.RemoveDockerBastion())
|
||||
case Exit:
|
||||
os.Exit(0)
|
||||
case Help:
|
||||
bastion_init.PrintBastionHelp()
|
||||
default:
|
||||
fmt.Println("inputCommand is not exist ! Please input again")
|
||||
}
|
||||
// execute the function
|
||||
switch inputCommand {
|
||||
case InstallDefaultSsh:
|
||||
beautifulPrintExeResult(agentOperator.InstallDefaultSshBastion())
|
||||
case DisableSwap:
|
||||
beautifulPrintExeResult(agentOperator.DisableSwapBastion())
|
||||
case DisableSelinux:
|
||||
beautifulPrintExeResult(agentOperator.DisableSelinuxBastion())
|
||||
case DisableFirewall:
|
||||
beautifulPrintExeResult(agentOperator.DisableFirewallBastion())
|
||||
case ModifySysConfig:
|
||||
beautifulPrintExeResult(agentOperator.ModifySysConfigBastion())
|
||||
case InstallDocker:
|
||||
beautifulPrintExeResult(agentOperator.InstallDockerBastion())
|
||||
case ModifyDockerConfig:
|
||||
beautifulPrintExeResult(agentOperator.ModifyDockerConfigBastion())
|
||||
case InstallDockerCompose:
|
||||
beautifulPrintExeResult(agentOperator.InstallDockerComposeBastion())
|
||||
case InstallMinio:
|
||||
agentOperator.InstallMinioBastion()
|
||||
case InstallHarbor:
|
||||
beautifulPrintExeResult(agentOperator.InstallHarborBastion())
|
||||
case RemoveDocker:
|
||||
beautifulPrintExeResult(agentOperator.RemoveDockerBastion())
|
||||
case Exit:
|
||||
os.Exit(0)
|
||||
case Help:
|
||||
bastion_init.PrintBastionHelp()
|
||||
default:
|
||||
fmt.Println("inputCommand is not exist ! Please input again")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var log = logger.Log
|
||||
|
||||
// C:\Users\wddsh\go\bin\gox.exe -osarch="linux/amd64" -output "build/agent-operator_{{.OS}}_{{.Arch}}"
|
||||
// C:\Users\wddsh\go\bin\gox.exe -osarch="linux/amd64" -output "build/octopus-agent_{{.OS}}_{{.Arch}}"
|
||||
// /root/go/bin/gox -osarch="linux/amd64" -output "build/octopus-agent_{{.OS}}_{{.Arch}}"
|
||||
|
||||
// bash <(curl -sL http://172.28.0.10:9000/octopus/init-script-wdd.sh) --offline --url http://172.28.0.10:9000 --agent-install
|
||||
|
||||
Reference in New Issue
Block a user