diff --git a/agent-go/executor/script/1_node_important.sh b/agent-go/executor/script/1_node_important.sh index 47335f6..0f0bc2d 100644 --- a/agent-go/executor/script/1_node_important.sh +++ b/agent-go/executor/script/1_node_important.sh @@ -25,7 +25,7 @@ PrivateServerIPs=(192.168.0.65 192.168.0.45 192.168.0.7) # 内网服务器的IP StorageServerIPs=(192.168.0.2) # 存储服务器的IP地址,默认在第一台上安装heketi,默认第一台作为NFS服务端 NfsPath=/nfsdata # nfs路径,需要事先创建并进行文件夹赋权 MinioStorageType=volume # 选项:volume 或者 pv Minio集群底层的存储方式,使用4PV还是使用 1PV-4Volume的形式 -OSSPublicURL=https://oss2.demo.uavcmlc.com:18000/wangdada/ # 可以不配置,会从DockerHub拉取所有镜像(3GB) +OSSPublicURL=https://oss2.demo.uavcmlc.com:18000$()/wangdada/ # 可以不配置,会从DockerHub拉取所有镜像(3GB) ### 需要修改以上的内容 ### ### 需要修改以上的内容 ### diff --git a/agent-go/go.mod b/agent-go/go.mod index 7662bdc..61aedec 100644 --- a/agent-go/go.mod +++ b/agent-go/go.mod @@ -1,4 +1,4 @@ -module agent-go + module agent-go go 1.18 diff --git a/agent-go/octopus-agent-wdd.yaml b/agent-go/octopus-agent-wdd.yaml new file mode 100644 index 0000000..d316ac2 --- /dev/null +++ b/agent-go/octopus-agent-wdd.yaml @@ -0,0 +1,91 @@ +server: + port: 8000 + +logging: + level: + web: info + +octopus: + message: + # agent boot up default common exchange + init_exchange: InitExchange + # server will send message to agent using this common queue + init_to_server: InitToServer + # agent boot up default common exchange routing key + init_to_server_key: InitToServerKey + # server will receive message from agent using this common queue + init_from_server: InitFromServer + # agent boot up default common exchange routing key + init_from_server_key: InitFromServerKey + # initialization register time out (unit ms) default is 5 min + init_ttl: "3000000" + # Octopus Exchange Name == server comunicate with agent + octopus_exchange: OctopusExchange + # Octopus Message To Server == all agent send info to server queue and topic + octopus_to_server: OctopusToServer + executor: + name: executor-functions + status: + name: octopus-agent + healthy: + type: cron + cron: 10 */1 * * * ? * + start-delay: 30 + metric: + pinch: 20 + agent: + executor: + # agent执行一条Command的最长超时时间 + processMaxTimeOut: 60 + status: + app: + - Nginx/nginx + - MySQL/mysql + - Xray/xray + - OctopusAgent/octopus-agent + - Redis/redis + - RabbitMQ/rabbitmq + +spring: + main: + allow-circular-references: true + allow-bean-definition-overriding: true + rabbitmq: + host: 42.192.52.227 + # host: 192.168.35.71 + port: 20672 + username: boge + password: boge8tingH + virtual-host: /wdd + listener: + simple: + retry: + # ack failed will reentrant the Rabbit Listener + max-attempts: 2 + enabled: true + # retry interval unit ms + max-interval: 65000 + initial-interval: 65000 + +#spring: +# application: +# name: octopus-agent +# profiles: +# active: dev +# cloud: +# nacos: +# config: +# group: dev +# config-retry-time: 3000 +# file-extension: yaml +# max-retry: 3 +# # server-addr: "150.230.198.103:21060" +# server-addr: "42.192.52.227:21060" +# timeout: 5000 +# config-long-poll-timeout: 5000 +# extension-configs: +# - group: dev +# data-id: "common-dev.yaml" +# +#server: +# port: 8000 \ No newline at end of file diff --git a/agent-go/readme.md b/agent-go/readme.md index 25e3305..421d1a1 100644 --- a/agent-go/readme.md +++ b/agent-go/readme.md @@ -19,8 +19,8 @@ 4. shell脚本 -- 执行shell脚本 3. 执行结果上报 - 1. 执行日志合并收集,统一上报 - 2. 执行结果上报 + 1. 执行日志合并收集,统一上报 + 2. 执行结果上报 ## Status @@ -28,4 +28,13 @@ 2. 收集Agent自身的服务器信息 3. 上报Agent的版本信息 -## \ No newline at end of file +--- + +# 使用JupyterLab在 网页 运行Go程序 + +1. 安装pip +2. 安装jupyter lab + 语言包 +3. 安装golang +4. 配置环境变量 +5. 安装GONB +6. 启动jupyter lab即可 diff --git a/server/src/main/java/io/wdd/rpc/message/OctopusMessage.java b/server/src/main/java/io/wdd/rpc/message/OctopusMessage.java index 2027258..3e7d7e6 100644 --- a/server/src/main/java/io/wdd/rpc/message/OctopusMessage.java +++ b/server/src/main/java/io/wdd/rpc/message/OctopusMessage.java @@ -31,6 +31,12 @@ public class OctopusMessage { // agent reply message content Object result; + + /** + * 执行结果的状态Code + */ + String ResultCode; + /** * Agent 完成操作的时间 */