[ Cmii ] [ Octopus ] - reformat agent-go - 3

This commit is contained in:
zeaslity
2024-03-29 15:57:23 +08:00
parent 3968fd57e1
commit cf30d8852b
3 changed files with 23 additions and 20 deletions

View File

@@ -340,7 +340,7 @@ func buildAgentOsOperator(agentInfo *a_status.AgentInfo, agentServerInfo *a_agen
// 2023年8月4日 pass through some key information // 2023年8月4日 pass through some key information
ossOfflinePrefix := "http://bastion.io" ossOfflinePrefix := "http://bastion.io"
if a_agent.AgentConfig != nil { if a_agent.AgentConfig != nil {
ossOfflinePrefix := a_agent.AgentConfig.GetString("octopus.agent.executor.ossOfflinePrefix") ossOfflinePrefix = a_agent.AgentConfig.GetString("octopus.agent.executor.ossOfflinePrefix")
if !strings.HasSuffix(ossOfflinePrefix, "/") { if !strings.HasSuffix(ossOfflinePrefix, "/") {
ossOfflinePrefix += "/" ossOfflinePrefix += "/"
} }

View File

@@ -9,7 +9,7 @@ spring:
allow-circular-references: true allow-circular-references: true
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
rabbitmq: rabbitmq:
host: 10.250.0.100 host: 42.192.52.227
port: 20672 port: 20672
username: boge username: boge
password: boge8tingH password: boge8tingH
@@ -24,7 +24,7 @@ spring:
max-interval: 65000 max-interval: 65000
initial-interval: 65000 initial-interval: 65000
redis: redis:
host: 10.250.0.100 host: 42.192.52.227
port: 21370 port: 21370
database: 0 database: 0
password: boge8tingH password: boge8tingH
@@ -47,7 +47,7 @@ spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.250.0.100:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8 url: jdbc:mysql://42.192.52.227:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: boge username: boge
password: boge8tingH password: boge8tingH
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource

View File

@@ -48,14 +48,17 @@ public class TestBaseFuncScheduler {
// Long projectServerId = 1722453318596550657L;// lappro // Long projectServerId = 1722453318596550657L;// lappro
// Long projectServerId = 1752602668144975873L;// cqlyj // Long projectServerId = 1752602668144975873L;// cqlyj
// Long projectServerId = 1764575895186030593L;// 上海雷视联动 // Long projectServerId = 1764575895186030593L;// 上海雷视联动
Long projectServerId = 1765290465066692610L;// 吉林移动 // Long projectServerId = 1765290465066692610L;// 吉林移动
// Long projectServerId = 1765654823726669826L;// 资阳公安 // Long projectServerId = 1765654823726669826L;// 资阳公安
Long projectServerId = 1773619219367120898L; // 内网35-71项目
projectDeployContext.setProjectId(projectServerId); projectDeployContext.setProjectId(projectServerId);
// String masterNodeServerName = "Shanghai-amd64-09"; // cgga // String masterNodeServerName = "Shanghai-amd64-09"; // cgga
String masterNodeServerName = "Chengdu-amd64-51"; // 吉林移动 // String masterNodeServerName = "Chengdu-amd64-51"; // 吉林移动
String masterNodeServerName = "Chengdu-amd64-71"; // 吉林移动
// String masterNodeServerName = "Ziyang-amd64-61"; // 资阳公安 // String masterNodeServerName = "Ziyang-amd64-61"; // 资阳公安
ProjectServerVO projectServerVO = coreProjectServerService.projectServerOne(projectServerId); ProjectServerVO projectServerVO = coreProjectServerService.projectServerOne(projectServerId);
@@ -76,24 +79,24 @@ public class TestBaseFuncScheduler {
List<BaseFunctionEnum> masterNodeProcedure = List.of( List<BaseFunctionEnum> masterNodeProcedure = List.of(
// BaseFunctionEnum.DISABLE_SWAP, BaseFunctionEnum.DISABLE_SWAP,
// BaseFunctionEnum.DISABLE_SELINUX, BaseFunctionEnum.DISABLE_SELINUX,
// BaseFunctionEnum.SHUTDOWN_FIREWALL, BaseFunctionEnum.SHUTDOWN_FIREWALL,
// BaseFunctionEnum.INSTALL_DOCKER, BaseFunctionEnum.INSTALL_DOCKER,
// BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY, // BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY,
// BaseFunctionEnum.INSTALL_DOCKER_COMPOSE, BaseFunctionEnum.INSTALL_DOCKER_COMPOSE
// BaseFunctionEnum.MODIFY_DOCKER_CONFIG // BaseFunctionEnum.MODIFY_DOCKER_CONFIG
// BaseFunctionEnum.INSTALL_HARBOR // BaseFunctionEnum.INSTALL_HARBOR
); );
List<BaseFunctionEnum> agentNodeProcedure = List.of( List<BaseFunctionEnum> agentNodeProcedure = List.of(
BaseFunctionEnum.DISABLE_SWAP, // BaseFunctionEnum.DISABLE_SWAP,
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY, // BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY,
BaseFunctionEnum.DISABLE_SELINUX, // BaseFunctionEnum.DISABLE_SELINUX,
BaseFunctionEnum.SHUTDOWN_FIREWALL, // BaseFunctionEnum.SHUTDOWN_FIREWALL,
BaseFunctionEnum.INSTALL_DOCKER, // BaseFunctionEnum.INSTALL_DOCKER,
BaseFunctionEnum.INSTALL_DOCKER_COMPOSE, // BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
BaseFunctionEnum.MODIFY_DOCKER_CONFIG // BaseFunctionEnum.MODIFY_DOCKER_CONFIG
); );
projectDeployContext.setMasterNodeBaseProcedure(masterNodeProcedure); projectDeployContext.setMasterNodeBaseProcedure(masterNodeProcedure);
@@ -111,7 +114,7 @@ public class TestBaseFuncScheduler {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// baseFuncScheduler.runProcedure(projectDeployContext); baseFuncScheduler.runProcedure(projectDeployContext);
// harborFuncScheduler.runProcedure(projectDeployContext); // harborFuncScheduler.runProcedure(projectDeployContext);
@@ -136,7 +139,7 @@ public class TestBaseFuncScheduler {
); );
projectDeployContext.setMasterAppProcedure(appFunctionEnumList); projectDeployContext.setMasterAppProcedure(appFunctionEnumList);
appFuncScheduler.runProcedure(projectDeployContext); // appFuncScheduler.runProcedure(projectDeployContext);
masterNodeProcedure = List.of(BaseFunctionEnum.CHRONY_TO_MASTER); masterNodeProcedure = List.of(BaseFunctionEnum.CHRONY_TO_MASTER);