[ Cmii ] [ Octopus ] - real project modify to use cmii operator

This commit is contained in:
zeaslity
2024-02-23 15:13:24 +08:00
parent 6e629f84df
commit 9447801212
19 changed files with 151 additions and 33 deletions

View File

@@ -1,5 +1,7 @@
package io.wdd.server.func;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.wdd.func.auto.beans.AppFunctionEnum;
import io.wdd.func.auto.beans.BaseFunctionEnum;
import io.wdd.func.auto.beans.ProjectDeployContext;
@@ -93,12 +95,14 @@ public class TestBaseFuncScheduler {
List<BaseFunctionEnum> masterNodeProcedure = List.of(
// BaseFunctionEnum.DISABLE_SWAP,
// BaseFunctionEnum.SHUTDOWN_FIREWALL,
// BaseFunctionEnum.INSTALL_DOCKER,
// BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY,
// BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
// BaseFunctionEnum.MODIFY_DOCKER_CONFIG,
// BaseFunctionEnum.INSTALL_HARBOR
// BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
BaseFunctionEnum.INSTALL_NFS_SERVER_ONLINE
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
);
List<BaseFunctionEnum> agentNodeProcedure = List.of(
@@ -107,12 +111,24 @@ public class TestBaseFuncScheduler {
// BaseFunctionEnum.INSTALL_DOCKER,
// BaseFunctionEnum.INSTALL_DOCKER_COMPOSE
// BaseFunctionEnum.MODIFY_DOCKER_CONFIG
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
// BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
);
projectDeployContext.setMasterNodeBaseProcedure(masterNodeProcedure);
projectDeployContext.setAgentNodeBaseProcedure(agentNodeProcedure);
// log
ObjectMapper objectMapper = new ObjectMapper();
try {
String s = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(projectDeployContext);
System.out.println();
System.out.println(s);
System.out.println();
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
// baseFuncScheduler.runProcedure(projectDeployContext);
@@ -122,17 +138,17 @@ public class TestBaseFuncScheduler {
List<AppFunctionEnum> appFunctionEnumList = List.of(
// AppFunctionEnum.DEPLOY_CHRONY_SERVER,
// AppFunctionEnum.DEPLOY_RKE
AppFunctionEnum.DEPLOY_K8S_DASHBOARD,
AppFunctionEnum.DEPLOY_NFS,
AppFunctionEnum.DEPLOY_TEST_NFS,
AppFunctionEnum.DEPLOY_K8S_NAMESPACE,
AppFunctionEnum.DEPLOY_K8S_PVC,
AppFunctionEnum.DEPLOY_K8S_MYSQL,
AppFunctionEnum.DEPLOY_K8S_REDIS,
AppFunctionEnum.DEPLOY_K8S_MIDDLEWARES,
AppFunctionEnum.DEPLOY_INGRESS
// AppFunctionEnum.DEPLOY_K8S_DASHBOARD
// AppFunctionEnum.DEPLOY_NFS,
// AppFunctionEnum.DEPLOY_TEST_NFS,
// AppFunctionEnum.DEPLOY_K8S_NAMESPACE,
// AppFunctionEnum.DEPLOY_K8S_PVC,
// AppFunctionEnum.DEPLOY_K8S_MYSQL,
// AppFunctionEnum.DEPLOY_K8S_REDIS,
// AppFunctionEnum.DEPLOY_K8S_MIDDLEWARES
// AppFunctionEnum.DEPLOY_INGRESS
// AppFunctionEnum.DEPLOY_FRONTEND
// AppFunctionEnum.DEPLOY_BACKEND
AppFunctionEnum.DEPLOY_BACKEND
// AppFunctionEnum.DEPLOY_K8S_SRS
);
@@ -145,7 +161,7 @@ public class TestBaseFuncScheduler {
agentNodeProcedure = List.of(BaseFunctionEnum.CHRONY_TO_MASTER);
projectDeployContext.setMasterNodeBaseProcedure(masterNodeProcedure);
projectDeployContext.setAgentNodeBaseProcedure(agentNodeProcedure);
// projectDeployContext.setAgentNodeBaseProcedure(agentNodeProcedure);
// baseFuncScheduler.runProcedure(projectDeployContext);
}