[ Agent ] [ BASE ] - add default ssh key install

This commit is contained in:
zeaslity
2023-11-21 10:35:43 +08:00
parent c876701099
commit 2f5ae75d61
5 changed files with 120 additions and 6 deletions

View File

@@ -115,13 +115,28 @@ func (op *AgentOsOperator) deployRke(funcArgs []string) (bool, []string) {
if !ok {
return false, resultLog
}
ok, resultLog = BasicDownloadFile(op.OssOfflinePrefix+"rke-cluster-template.yaml", "/root/wdd/rke-cluster.yml")
ok, resultLog = BasicDownloadFile(op.OssOfflinePrefix+"rke-cluster-template.yaml", "/root/wdd/cluster.yml")
if !ok {
return false, resultLog
}
AllCompleteExecutor([][]string{
{
"chmod",
"+x",
"/usr/local/bin/rke",
},
{
"chmod",
"+x",
"/usr/local/bin/kubectl",
},
})
//
// replace ip addr
parseIP := net.ParseIP(funcArgs[1])
parseIP := net.ParseIP(funcArgs[0])
if parseIP == nil {
return false, []string{
"[deployRke] - ip args error !",
@@ -159,7 +174,7 @@ func (op *AgentOsOperator) deployK8sDashboard(funcArgs []string) (bool, []string
// kubectl
// replace
parseIP := net.ParseIP(funcArgs[1])
parseIP := net.ParseIP(funcArgs[0])
if parseIP == nil {
return false, []string{
"[deployK8sDashboard] - ip args error !",