[agent-go] [Bastion] - swap firewall

This commit is contained in:
zeaslity
2024-04-18 10:35:39 +08:00
parent abe83b68e9
commit 8e43f1f90f
5 changed files with 248 additions and 110 deletions

View File

@@ -33,6 +33,12 @@ const (
InstallDocker = "docker"
InstallDockerCompose = "dockercompose"
InstallHarbor = "harbor"
InstallDefaultSsh = "ssh"
DisableSwap = "swap"
DisableSelinux = "selinux"
DisableFirewall = "firewall"
ModifySysConfig = "sysconfig"
ModifyDockerConfig = "dockerconfig"
InstallMinio = "minio"
RemoveDocker = "removedocker"
Exit = "exit"
@@ -107,14 +113,26 @@ func BastionModeInit() {
// 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:
agentOperator.InstallDockerComposeBastion()
beautifulPrintExeResult(agentOperator.InstallDockerComposeBastion())
case InstallMinio:
agentOperator.InstallMinioBastion()
case InstallHarbor:
a_executor.InstallHarborBastion()
beautifulPrintExeResult(agentOperator.InstallHarborBastion())
case RemoveDocker:
beautifulPrintExeResult(agentOperator.RemoveDockerBastion())
case Exit: