diff --git a/agent-go/executor/BaseFunction.go b/agent-go/executor/BaseFunction.go index ea82c8d..1bea52a 100644 --- a/agent-go/executor/BaseFunction.go +++ b/agent-go/executor/BaseFunction.go @@ -939,19 +939,19 @@ func (op *AgentOsOperator) installHarbor() [][]string { { "sed", "-i", - "s/$HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g", + "s/HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g", "/root/wdd/harbor/harbor.yml", }, { "sed", "-i", - "s/$HarborHostPort/8033/g", + "s/HarborHostPort/8033/g", "/root/wdd/harbor/harbor.yml", }, { "sed", "-i", - "s/$HarborHostPort/V2ryStr@ngPss/g", + "s/HarborAdminPas/V2ryStr@ngPss/g", "/root/wdd/harbor/harbor.yml", }, { @@ -1009,6 +1009,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) { } // download offline file + log.Info("[install harbor] - start to download harbor offline installer !") resultOk, resultLog := AllCompleteExecutor([][]string{ { "mkdir", @@ -1058,6 +1059,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) { }) // configuration + log.Info("[install harbor] - start to download harbor config file!") AllCommandExecutor([]string{ "wget", "--no-check-certificate", @@ -1069,23 +1071,25 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) { return false, []string{"harbor config template file download error !"} } + log.Info("[install harbor] - start to modify harbor config file!") + AllCompleteExecutor([][]string{ { "sed", "-i", - "s/$HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g", + "s/HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g", "/root/wdd/harbor/harbor.yml", }, { "sed", "-i", - "s/$HarborHostPort/8033/g", + "s/HarborHostPort/8033/g", "/root/wdd/harbor/harbor.yml", }, { "sed", "-i", - "s/$HarborPassword/V2ryStr@ngPss/g", + "s/HarborAdminPas/V2ryStr@ngPss/g", "/root/wdd/harbor/harbor.yml", }})