From f733b6408a56f81ea2dab05ce20d663257b8a616 Mon Sep 17 00:00:00 2001 From: ZhouYixun <291028775@qq.com> Date: Sat, 21 May 2022 00:03:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=BD=E5=86=85=E4=B8=8E=E6=B5=B7?= =?UTF-8?q?=E5=A4=96=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/application-sonic-agent.yml | 2 +- src/main/docker/docker-compose.yml | 2 -- src/main/docker/docker-compose2.yml | 38 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/main/docker/docker-compose2.yml diff --git a/config/application-sonic-agent.yml b/config/application-sonic-agent.yml index b212ef55..c09cfda1 100644 --- a/config/application-sonic-agent.yml +++ b/config/application-sonic-agent.yml @@ -1,6 +1,6 @@ zookeeper: # zookeeper的ip地址,对应server的zookeeper,不能填localhost、127.0.0.1之类的无效ipv4 - registry-host: 127.0.0.1 + registry-host: 192.168.0.2 # zookeeper的端口 registry-port: 2181 # 本机网卡ip地址,不能填localhost、127.0.0.1之类的无效ipv4 diff --git a/src/main/docker/docker-compose.yml b/src/main/docker/docker-compose.yml index 01fc40a3..0bdbe363 100644 --- a/src/main/docker/docker-compose.yml +++ b/src/main/docker/docker-compose.yml @@ -1,8 +1,6 @@ version: '3' services: sonic-agent: - #下方为Docker Hub镜像,推荐海外用户使用,默认使用国内加速镜像 -# image: "sonicorg/sonic-agent-linux:v1.3.2-release" image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.0-beta" environment: - ZOOKEEPER_HOST=192.168.1.1 diff --git a/src/main/docker/docker-compose2.yml b/src/main/docker/docker-compose2.yml new file mode 100644 index 00000000..1d3f2da0 --- /dev/null +++ b/src/main/docker/docker-compose2.yml @@ -0,0 +1,38 @@ +version: '3' +services: + sonic-agent: + image: "sonicorg/sonic-agent-linux:v1.4.0-beta" + environment: + - ZOOKEEPER_HOST=192.168.1.1 + - ZOOKEEPER_PORT=2181 + # 替换为部署Agent机器的ipv4 + - AGENT_HOST=192.168.1.1 + # 替换为Agent服务的端口,可以自行更改 + - AGENT_PORT=7777 + # 替换为前端新增Agent生成的key + - AGENT_KEY=29002272-4659-4808-a804-08ce3388b136 + # 是否使用Sonic机柜,可以前往https://sonic-cloud.gitee.io/#/Cabinet了解更多 + - CABINET_ENABLE=true + - CABINET_STOREY=1 + - CABINET_KEY=e33cd65c-a40e-431f-9e65-4a91bac6f487 + # 是否使用安卓模块 + - ANDROID_ENABLE=true + # 是否开启远程adb调试功能 + - USE_ADBKIT=true + # 是否使用iOS模块 + - IOS_ENABLE=true + # 替换为你自己使用的wda的bundleId,如果没有.xctrunner后缀会自动补全,建议使用公司的开发者证书 + - WDA_BUNDLE_ID=com.facebook.WebDriverAgentRunner.xctrunner + # 是否启用Appium + - APPIUM_ENABLE=true + # 是否启用webview调试功能 + - WEBVIEW_ENABLE=true + # 谷歌调试端口,一般不需要修改(默认0使用随机端口,如果需要开启防火墙给外部使用,请设置固定端口如7778) + - CHROME_DRIVER_PORT=0 + # 是否开启sonic-go-mitmproxy代理功能 + - SGM_ENABLE=true + network_mode: "host" + privileged: true + volumes: + - /dev/bus/usb:/dev/bus/usb + - /var/run/usbmuxd:/var/run/usbmuxd \ No newline at end of file From 9a992da43565f69c380bdba5946a24b17e29f5a1 Mon Sep 17 00:00:00 2001 From: ZhouYixun <291028775@qq.com> Date: Sat, 21 May 2022 00:12:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0jvm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index d08e0e7e..7d0a047a 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -86,4 +86,4 @@ ADD /plugins /root/plugins ADD /src/main/docker/config /root/config ADD /target/sonic-agent-linux-x86_64.jar /root RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime -ENTRYPOINT ["/root/jdk-15.0.2+7/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-opens java.base/java.lang=ALL-UNNAMED","--add-opens java.base/java.util=ALL-UNNAMED","--add-opens java.base/java.math=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"] +ENTRYPOINT ["/root/jdk-15.0.2+7/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"]