[ Agent ] [ App ] - offline build nfs server
This commit is contained in:
@@ -1202,6 +1202,13 @@ func (op *AgentOsOperator) installNfsServerOnlineExec() (bool, []string) {
|
||||
|
||||
func (op *AgentOsOperator) installNFSServerOfflineExec() (bool, []string) {
|
||||
|
||||
log.InfoF("[installNFSServerOfflineExec] - start to install nfs server offline !")
|
||||
if !BasicCreateFolder("/root/install") {
|
||||
return false, []string{
|
||||
"[installNFSServerOfflineExec] - create install folder error !",
|
||||
}
|
||||
}
|
||||
|
||||
// check for version
|
||||
executor, i := HardCodeCommandExecutor("grep PRETTY_NAME /etc/os-release | cut -d= -f2 | tr -d '\"' | sed 's/ /-/g'")
|
||||
if !executor {
|
||||
|
||||
@@ -38,7 +38,7 @@ octopus:
|
||||
# agent执行一条Command的最长超时时间
|
||||
processMaxTimeOut: 60
|
||||
# ossOfflinePrefix: "https://oss-s1.107421.xyz"
|
||||
ossOfflinePrefix: "http://OFFLINE_HOST_IP9000/octopus/"
|
||||
ossOfflinePrefix: "http://OFFLINE_HOST_IP:9000/octopus/"
|
||||
status:
|
||||
app:
|
||||
- Nginx/nginx
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -27,7 +27,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<java.version>11</java.version>
|
||||
<spring-shell.version>2.1.3</spring-shell.version>
|
||||
<spring-boot-admin.version>2.7.4</spring-boot-admin.version>
|
||||
<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<description>server</description>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -43,10 +43,7 @@ public enum BaseFunctionEnum {
|
||||
"修改docker daemon config, 参数为 Harbor服务器的IP"
|
||||
),
|
||||
|
||||
INSTALL_HARBOR(
|
||||
"installHarbor",
|
||||
"安装Harbor, 默认为2.9.0版本"
|
||||
),
|
||||
|
||||
|
||||
INSTALL_NFS_ONLINE(
|
||||
"installNfsOnline",
|
||||
@@ -58,12 +55,12 @@ public enum BaseFunctionEnum {
|
||||
"安装nfs-server online"
|
||||
),
|
||||
|
||||
INSTALL_CHRONY(
|
||||
INSTALL_CHRONY_DISCARD(
|
||||
"installChrony",
|
||||
"安装Chrony服务器"
|
||||
"安装Chrony服务器, 废弃"
|
||||
),
|
||||
|
||||
CHRONY_TO_PUBLIC_NTP(
|
||||
CHRONY_TO_PUBLIC_NTP_DISCARD(
|
||||
"chronyToPublicNTP",
|
||||
"时间同步至公网NTP服务器"
|
||||
),
|
||||
@@ -73,6 +70,11 @@ public enum BaseFunctionEnum {
|
||||
"安装配置ZSH"
|
||||
),
|
||||
|
||||
INSTALL_HARBOR(
|
||||
"installHarbor",
|
||||
"安装Harbor, 默认为2.9.0版本"
|
||||
),
|
||||
|
||||
CHRONY_TO_MASTER(
|
||||
"chronyToMaster",
|
||||
"时间同步至Master, args为 Master节点IP"
|
||||
|
||||
@@ -97,13 +97,8 @@ public class BaseFuncScheduler {
|
||||
List<BaseFunctionEnum> masterNodeProcedureList = List.of(
|
||||
BaseFunctionEnum.DISABLE_SWAP,
|
||||
BaseFunctionEnum.SHUTDOWN_FIREWALL,
|
||||
BaseFunctionEnum.INSTALL_CHRONY,
|
||||
BaseFunctionEnum.CHRONY_TO_PUBLIC_NTP,
|
||||
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY,
|
||||
BaseFunctionEnum.MODIFY_DOCKER_CONFIG
|
||||
// BaseFunctionEnum.INSTALL_HARBOR,
|
||||
// BaseFunctionEnum.INSTALL_ZSH
|
||||
|
||||
BaseFunctionEnum.CHRONY_TO_MASTER,
|
||||
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY
|
||||
);
|
||||
|
||||
|
||||
@@ -129,12 +124,18 @@ public class BaseFuncScheduler {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// remove first args
|
||||
baseFuncArgList.remove(0);
|
||||
|
||||
}
|
||||
|
||||
List<BaseFunctionEnum> masterNodeDurationTaskList = List.of(
|
||||
BaseFunctionEnum.INSTALL_NFS_SERVER_ONLINE,
|
||||
BaseFunctionEnum.INSTALL_DOCKER,
|
||||
BaseFunctionEnum.INSTALL_DOCKER_COMPOSE,
|
||||
BaseFunctionEnum.MODIFY_DOCKER_CONFIG,
|
||||
BaseFunctionEnum.INSTALL_HARBOR
|
||||
);
|
||||
|
||||
@@ -158,6 +159,9 @@ public class BaseFuncScheduler {
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove
|
||||
baseFuncArgList.remove(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
server:
|
||||
port: 9999
|
||||
|
||||
# shanghai 10.250.0.100
|
||||
# local 10.250.0.100
|
||||
spring:
|
||||
main:
|
||||
allow-circular-references: true
|
||||
allow-bean-definition-overriding: true
|
||||
rabbitmq:
|
||||
host: 42.192.52.227
|
||||
host: 10.250.0.100
|
||||
port: 20672
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
@@ -21,7 +23,7 @@ spring:
|
||||
max-interval: 65000
|
||||
initial-interval: 65000
|
||||
redis:
|
||||
host: 42.192.52.227
|
||||
host: 10.250.0.100
|
||||
port: 21370
|
||||
database: 0
|
||||
password: boge8tingH
|
||||
@@ -52,7 +54,7 @@ spring:
|
||||
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://42.192.52.227:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://10.250.0.100:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
|
||||
@@ -53,11 +53,11 @@ public class TestBaseFuncScheduler {
|
||||
projectDeployContext.setMasterNode(serverInfoPO);
|
||||
|
||||
|
||||
// baseFuncScheduler.runProcedure(projectDeployContext);
|
||||
baseFuncScheduler.runProcedure(projectDeployContext);
|
||||
|
||||
// harborFuncScheduler.runProcedure(projectDeployContext);
|
||||
|
||||
appFuncScheduler.runProcedure(projectDeployContext);
|
||||
// appFuncScheduler.runProcedure(projectDeployContext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user