Skip to content

Commit

Permalink
[MCIS] DEBIAN OS 지원
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyeongchoi authored and inno-cloudbarista committed Oct 27, 2022
1 parent 72282c3 commit 07b4883
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file not shown.
3 changes: 3 additions & 0 deletions pkg/api/core/agent/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

const (
UBUNTU = "UBUNTU"
DEBIAN = "DEBIAN"
CENTOS = "CENTOS"
AGENT_NAMESPACE = "cb-dragonfly"
AGENT_CLUSTERROLE = "cb-dragonfly-agent-clusterrole"
Expand Down Expand Up @@ -53,6 +54,8 @@ func CleanAgentInstall(info AgentInstallInfo, sshInfo *sshrun.SSHInfo, osType *s
uninstallCmd = fmt.Sprintf("sudo rpm -e telegraf")
} else if strings.Contains(*osType, UBUNTU) {
uninstallCmd = fmt.Sprintf("sudo dpkg -r telegraf")
} else if strings.Contains(*osType, DEBIAN) {
uninstallCmd = fmt.Sprintf("sudo dpkg -r telegraf")
}
sshrun.SSHRun(*sshInfo, uninstallCmd)

Expand Down
3 changes: 3 additions & 0 deletions pkg/api/core/agent/mcis/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func InstallAgent(info common.AgentInstallInfo) (int, error) {
} else if strings.Contains(osType, common.UBUNTU) {
targetFile = fmt.Sprintf("$HOME/cb-dragonfly/cb-agent.deb")
installCmd = fmt.Sprintf("sudo dpkg -i $HOME/cb-dragonfly/cb-agent.deb")
} else if strings.Contains(osType, common.DEBIAN) {
targetFile = fmt.Sprintf("$HOME/cb-dragonfly/cb-agent.deb")
installCmd = fmt.Sprintf("sudo dpkg -i $HOME/cb-dragonfly/cb-agent.deb")
}

mcisInstallFile := rootPath + fmt.Sprintf("/file/agent/mcis/install_mcis_script.sh")
Expand Down

0 comments on commit 07b4883

Please sign in to comment.