[ Agent ] [ Initialization ] - add harbor func
This commit is contained in:
@@ -969,7 +969,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
||||
// check docker-compose
|
||||
if !BasicFileExistAndNotNull("/usr/local/bin/docker-compose") {
|
||||
return false, []string{
|
||||
"docker-compose uninstalled ! can't install harbor!",
|
||||
"[install harbor] - docker-compose uninstalled ! can't install harbor!",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -987,7 +987,7 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
||||
})
|
||||
if ok {
|
||||
alreadyInstalledLog := []string{
|
||||
"install harbor, container harbor-core already running! harbor installed !",
|
||||
"[install harbor] - container harbor-core already running! harbor installed !",
|
||||
}
|
||||
|
||||
log.Info(alreadyInstalledLog[0])
|
||||
@@ -1091,20 +1091,29 @@ func (op *AgentOsOperator) installHarborExec() (bool, []string) {
|
||||
"-i",
|
||||
"s/$HarborAdminPas/V2ryStr@ngPss/g",
|
||||
"/root/wdd/harbor/harbor.yml",
|
||||
}})
|
||||
},
|
||||
{
|
||||
"chmod",
|
||||
"+x",
|
||||
"/root/wdd/harbor/install.sh",
|
||||
},
|
||||
})
|
||||
|
||||
log.InfoF("harbor config changed success to => %s!", op.AgentServerInfo.ServerIPInV4)
|
||||
log.InfoF("[install harbor] - harbor config changed success to => %s!", op.AgentServerInfo.ServerIPInV4)
|
||||
|
||||
// install
|
||||
executor, l := AllCommandExecutor([]string{
|
||||
log.Info("[install harbor] - going to start harbor !")
|
||||
ReadTimeCommandExecutor([]string{
|
||||
"bash",
|
||||
"/root/wdd/harbor/install.sh",
|
||||
"--with-chartmuseum",
|
||||
})
|
||||
if !executor {
|
||||
return false, l
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
return true, l
|
||||
msg := "[install harbor] - harbor start complete !"
|
||||
log.Info(msg)
|
||||
|
||||
return true, []string{msg}
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) chronyToPublicNTP() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user