[Agent] [Octopus] - caqa fix bugs

This commit is contained in:
zeaslity
2024-01-30 15:54:33 +08:00
parent a471dabe46
commit 36c650301e
15 changed files with 327 additions and 47 deletions

View File

@@ -100,18 +100,18 @@ public class AppFuncScheduler {
);
List<AppFunctionEnum> appFunctionEnumList = List.of(
AppFunctionEnum.DEPLOY_CHRONY_SERVER,
AppFunctionEnum.DEPLOY_RKE
// 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_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_FRONTEND
// AppFunctionEnum.DEPLOY_BACKEND
// AppFunctionEnum.DEPLOY_K8S_SRS

View File

@@ -96,9 +96,8 @@ public class BaseFuncScheduler {
List<BaseFunctionEnum> masterNodeProcedureList = List.of(
BaseFunctionEnum.DISABLE_SWAP,
BaseFunctionEnum.DISABLE_SELINUX,
BaseFunctionEnum.SHUTDOWN_FIREWALL,
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
BaseFunctionEnum.DISABLE_SELINUX
);
@@ -132,10 +131,9 @@ public class BaseFuncScheduler {
}
List<BaseFunctionEnum> masterNodeDurationTaskList = List.of(
// BaseFunctionEnum.INSTALL_NFS_SERVER_ONLINE,
// BaseFunctionEnum.INSTALL_DOCKER,
// BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
// BaseFunctionEnum.MODIFY_DOCKER_CONFIG,
BaseFunctionEnum.INSTALL_DOCKER,
BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
BaseFunctionEnum.MODIFY_DOCKER_CONFIG
// BaseFunctionEnum.INSTALL_HARBOR
);

View File

@@ -4,6 +4,7 @@ import io.wdd.func.auto.beans.HarborFunctionEnum;
import io.wdd.func.auto.beans.ProjectDeployContext;
import io.wdd.server.beans.po.ServerInfoPO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -182,8 +183,8 @@ public class HarborFuncScheduler {
syncHarborArgList.add(masterNode.getServerIpInV4());
// second arg sourceHarborHost
String sourceHarborHost = getIPv4Address();
syncHarborArgList.add(sourceHarborHost);
// String sourceHarborHost = getIPv4Address();
syncHarborArgList.add("harbor.wdd.io");
// third arg sync project name
syncHarborArgList.add(projectDeployContext.getCurrentSynchronizingProject());
@@ -218,14 +219,16 @@ public class HarborFuncScheduler {
String os = System
.getProperty("os.name")
.toLowerCase();
String devHarborSourceHost = "10.250.0.100";
// String devHarborSourceHost = "10.250.0.100";
String devHarborSourceHost = "20.4.16.200"; // cqga
if (os.contains("linux")) {
try {
InetAddress localhost = InetAddress.getLocalHost();
if (localhost.getHostAddress() != null && !localhost
.getHostAddress()
.isEmpty()) {
.isEmpty() && !StringUtils.startsWith(localhost.getHostAddress(), "127")) {
return localhost.getHostAddress();
} else {

View File

@@ -53,11 +53,11 @@ public class AcceptAgentInitInfo {
"London",
7,
"LosAngeles",
7,
"Beijing",
8,
"Paripark",
9
"Beijing",
9,
"Chongqing",
10
)
);
public static Set<String> ALL_SERVER_ARCH_INFO = new HashSet<>(

View File

@@ -1,14 +1,15 @@
server:
port: 9999
# shanghai 10.250.0.100
# local 10.250.0.100
# shanghai 20.4.16.200
# local 20.4.16.200
# cqga 20.4.16.200
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
rabbitmq:
host: 10.250.0.100
host: 20.4.16.200
port: 20672
username: boge
password: boge8tingH
@@ -23,7 +24,7 @@ spring:
max-interval: 65000
initial-interval: 65000
redis:
host: 10.250.0.100
host: 20.4.16.200
port: 21370
database: 0
password: boge8tingH
@@ -46,7 +47,7 @@ spring:
datasource:
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://20.4.16.200:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: boge
password: boge8tingH
type: com.zaxxer.hikari.HikariDataSource