[ Agent ] [ App ] - offline build nfs client - 2
This commit is contained in:
@@ -782,12 +782,7 @@ func (op *AgentOsOperator) installDockerOfflineExec(args []string) (bool, []stri
|
|||||||
"/root/install",
|
"/root/install",
|
||||||
})
|
})
|
||||||
|
|
||||||
AllCommandExecutor([]string{
|
HardCodeCommandExecutor("chmod 777 -R /root/install/docker/*")
|
||||||
"chmod",
|
|
||||||
"777",
|
|
||||||
"-R",
|
|
||||||
"/root/install/docker/*",
|
|
||||||
})
|
|
||||||
|
|
||||||
resultOk, l := HardCodeCommandExecutor("mv /root/install/docker/* /usr/bin")
|
resultOk, l := HardCodeCommandExecutor("mv /root/install/docker/* /usr/bin")
|
||||||
if !resultOk {
|
if !resultOk {
|
||||||
@@ -2052,33 +2047,13 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok, resultLog := AllCompleteExecutor([][]string{
|
BasicRemoveFolderComplete("/root/.oh-my-zsh")
|
||||||
{
|
BasicRemoveFolderComplete("/root/wdd/zsh-install.sh")
|
||||||
"rm",
|
BasicRemoveFolderComplete("/root/wdd/oh-my-zsh-plugins-list.txt")
|
||||||
"-rf",
|
BasicCreateFolder("/root/wdd/")
|
||||||
"/root/.oh-my-zsh",
|
|
||||||
},
|
ok, resultLog := AllCommandExecutor(
|
||||||
{
|
append(op.InstallCommandPrefix, "zsh", "git"))
|
||||||
"rm",
|
|
||||||
"-rf",
|
|
||||||
"/root/wdd/zsh-install.sh",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rm",
|
|
||||||
"-rf",
|
|
||||||
"/root/wdd/oh-my-zsh-plugins-list.txt",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mkdir",
|
|
||||||
"-p",
|
|
||||||
"/root/wdd/",
|
|
||||||
},
|
|
||||||
append(
|
|
||||||
op.InstallCommandPrefix,
|
|
||||||
"zsh",
|
|
||||||
"git",
|
|
||||||
),
|
|
||||||
})
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return false, resultLog
|
return false, resultLog
|
||||||
}
|
}
|
||||||
@@ -2091,14 +2066,8 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) {
|
|||||||
zshRemoteGitUrl = "https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh"
|
zshRemoteGitUrl = "https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh"
|
||||||
}
|
}
|
||||||
log.InfoF("开始下载zsh的安装脚本 => %s", zshRemoteGitUrl)
|
log.InfoF("开始下载zsh的安装脚本 => %s", zshRemoteGitUrl)
|
||||||
resultOk, l := AllCommandExecutor([]string{
|
|
||||||
"wget",
|
resultOk, l := BasicDownloadFile(zshRemoteGitUrl, "/root/wdd/zsh-install.sh")
|
||||||
"--timeout=5",
|
|
||||||
zshRemoteGitUrl,
|
|
||||||
"-qO",
|
|
||||||
"/root/wdd/zsh-install.sh",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
if !resultOk {
|
if !resultOk {
|
||||||
l = append(l, "zsh-install.sh 下载失败! 安装终止")
|
l = append(l, "zsh-install.sh 下载失败! 安装终止")
|
||||||
return false, l
|
return false, l
|
||||||
@@ -2218,6 +2187,6 @@ func (op *AgentOsOperator) ok(funcArgs []string) [][]string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (op *AgentOsOperator) okExec(funcArgs []string) (bool, []string) {
|
func (op *AgentOsOperator) okExec(funcArgs []string) (bool, []string) {
|
||||||
log.WarnF("call empty base func ! func args are => %#v", funcArgs)
|
log.WarnF("[okExec] - call empty base func ! func args are => %#v ", funcArgs)
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ public class BaseFuncScheduler {
|
|||||||
|
|
||||||
|
|
||||||
List<BaseFunctionEnum> masterNodeProcedureList = List.of(
|
List<BaseFunctionEnum> masterNodeProcedureList = List.of(
|
||||||
BaseFunctionEnum.DISABLE_SWAP,
|
// BaseFunctionEnum.DISABLE_SWAP,
|
||||||
BaseFunctionEnum.SHUTDOWN_FIREWALL,
|
// BaseFunctionEnum.SHUTDOWN_FIREWALL,
|
||||||
BaseFunctionEnum.CHRONY_TO_MASTER,
|
// BaseFunctionEnum.CHRONY_TO_MASTER,
|
||||||
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
|
// BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ public class BaseFuncScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BaseFunctionEnum> masterNodeDurationTaskList = List.of(
|
List<BaseFunctionEnum> masterNodeDurationTaskList = List.of(
|
||||||
BaseFunctionEnum.INSTALL_NFS_SERVER_ONLINE,
|
// BaseFunctionEnum.INSTALL_NFS_SERVER_ONLINE,
|
||||||
BaseFunctionEnum.INSTALL_DOCKER,
|
BaseFunctionEnum.INSTALL_DOCKER,
|
||||||
BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
|
BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
|
||||||
BaseFunctionEnum.MODIFY_DOCKER_CONFIG,
|
BaseFunctionEnum.MODIFY_DOCKER_CONFIG,
|
||||||
|
|||||||
Reference in New Issue
Block a user