[ Agent ] [ App ] - modify srs bugs

This commit is contained in:
zeaslity
2023-12-06 10:38:41 +08:00
parent 46c9668ce6
commit 16bb653254
2 changed files with 32 additions and 6 deletions

View File

@@ -954,19 +954,31 @@ func (op *AgentOsOperator) deploySRS(funcArgs []string) (bool, []string) {
} }
parseIP := net.ParseIP(funcArgs[0]) parseIP := net.ParseIP(funcArgs[0])
if parseIP == nil { if parseIP == nil {
return false, append(result, "ip args error !") return false, append(result, "ip args error !", funcArgs[0])
} }
if !BasicReplace(k8sSRSYamlFilePath, "A1C2IP", funcArgs[0]) { if !BasicReplace(k8sSRSYamlFilePath, "A1C2IP", funcArgs[0]) {
result = append(result, "替换A1C2IP信息") result = append(result, "替换A1C2IP信息")
return false, result return false, result
} }
// A1C1IP
parseIP = net.ParseIP(funcArgs[3])
if parseIP == nil {
return false, append(result, "ip args error !", funcArgs[3])
}
if !BasicReplace(k8sSRSYamlFilePath, "A1C1IP", funcArgs[3]) {
result = append(result, "替换A1C1IP信息")
return false, result
}
if !BasicReplace(k8sSRSYamlFilePath, "A1C1JS", funcArgs[4]) { if !BasicReplace(k8sSRSYamlFilePath, "A1C1JS", funcArgs[4]) {
result = append(result, "替换A1C1JS信息") result = append(result, "替换A1C1JS信息")
return false, result return false, result
} }
// M2D2IP
parseIP = net.ParseIP(funcArgs[5]) parseIP = net.ParseIP(funcArgs[5])
if parseIP == nil { if parseIP == nil {
return false, append(result, "ip args error !") return false, append(result, "ip args error !", funcArgs[5])
} }
if !BasicReplace(k8sSRSYamlFilePath, "M2D2IP", funcArgs[5]) { if !BasicReplace(k8sSRSYamlFilePath, "M2D2IP", funcArgs[5]) {
result = append(result, "替换M2D2IP信息") result = append(result, "替换M2D2IP信息")
@@ -985,6 +997,16 @@ func (op *AgentOsOperator) deploySRS(funcArgs []string) (bool, []string) {
} }
// check pod ok // check pod ok
if !K8sCheckPodStatusTimeout("helm-live-srs-rtc-0", funcArgs[1], 120) {
return false, []string{
"helm-live-srs-rtc-0 run failed !",
}
}
if !K8sCheckDeploymentStatusTimeout("helm-live-op-v2", funcArgs[1], 120) {
return false, []string{
"helm-live-op-v2 run failed !",
}
}
// 成功启动 // 成功启动
return true, []string{ return true, []string{

View File

@@ -44,7 +44,10 @@ public class AppFuncScheduler {
.getMasterNode() .getMasterNode()
.getServerIpPbV4()); .getServerIpPbV4());
appFuncArgs.add(projectInfoPO.getProjectWebServicePort()); appFuncArgs.add(projectInfoPO.getProjectWebServicePort());
appFuncArgs.add("M2D2IP"); // M2D2IP
appFuncArgs.add(projectDeployContext
.getMasterNode()
.getServerIpInV4());
appFuncArgs.add(projectInfoPO.getProjectVersion()); appFuncArgs.add(projectInfoPO.getProjectVersion());
// jackeyLoveFile // jackeyLoveFile
appFuncArgs.add("init_5.1.0.tar"); appFuncArgs.add("init_5.1.0.tar");
@@ -103,9 +106,10 @@ public class AppFuncScheduler {
// AppFunctionEnum.DEPLOY_K8S_MYSQL // AppFunctionEnum.DEPLOY_K8S_MYSQL
// AppFunctionEnum.DEPLOY_K8S_REDIS // AppFunctionEnum.DEPLOY_K8S_REDIS
// AppFunctionEnum.DEPLOY_K8S_PVC // AppFunctionEnum.DEPLOY_K8S_PVC
AppFunctionEnum.DEPLOY_INGRESS, // AppFunctionEnum.DEPLOY_INGRESS,
AppFunctionEnum.DEPLOY_FRONTEND, // AppFunctionEnum.DEPLOY_FRONTEND
AppFunctionEnum.DEPLOY_BACKEND // AppFunctionEnum.DEPLOY_BACKEND
AppFunctionEnum.DEPLOY_K8S_SRS
); );