[ Agent ] [ Executor ] - 新增InstallHarbor部分
This commit is contained in:
@@ -939,19 +939,19 @@ func (op *AgentOsOperator) installHarbor() [][]string {
|
|||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g",
|
"s/HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborHostPort/8033/g",
|
"s/HarborHostPort/8033/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborHostPort/V2ryStr@ngPss/g",
|
"s/HarborAdminPas/V2ryStr@ngPss/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1009,6 +1009,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// download offline file
|
// download offline file
|
||||||
|
log.Info("[install harbor] - start to download harbor offline installer !")
|
||||||
resultOk, resultLog := AllCompleteExecutor([][]string{
|
resultOk, resultLog := AllCompleteExecutor([][]string{
|
||||||
{
|
{
|
||||||
"mkdir",
|
"mkdir",
|
||||||
@@ -1058,6 +1059,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// configuration
|
// configuration
|
||||||
|
log.Info("[install harbor] - start to download harbor config file!")
|
||||||
AllCommandExecutor([]string{
|
AllCommandExecutor([]string{
|
||||||
"wget",
|
"wget",
|
||||||
"--no-check-certificate",
|
"--no-check-certificate",
|
||||||
@@ -1069,23 +1071,25 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
|||||||
return false, []string{"harbor config template file download error !"}
|
return false, []string{"harbor config template file download error !"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info("[install harbor] - start to modify harbor config file!")
|
||||||
|
|
||||||
AllCompleteExecutor([][]string{
|
AllCompleteExecutor([][]string{
|
||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g",
|
"s/HarborHostName/" + op.AgentServerInfo.ServerIPInV4 + "/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborHostPort/8033/g",
|
"s/HarborHostPort/8033/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sed",
|
"sed",
|
||||||
"-i",
|
"-i",
|
||||||
"s/$HarborPassword/V2ryStr@ngPss/g",
|
"s/HarborAdminPas/V2ryStr@ngPss/g",
|
||||||
"/root/wdd/harbor/harbor.yml",
|
"/root/wdd/harbor/harbor.yml",
|
||||||
}})
|
}})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user