diff --git a/Dockerfile b/Dockerfile index 3b0d096..5b3dae6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apt update;dpkg --add-architecture i386;apt update;apt install -y --no-insta echo "PermitRootLogin yes\nPasswordAuthentication yes\n" >> /etc/ssh/sshd_config;\ echo root:123456 |chpasswd +COPY localtime /etc COPY nats-server /usr/bin/ COPY checksum /usr/bin/ COPY yuzhen_iot /yuzhen_iot/ diff --git a/README.md b/README.md index 52c7581..194f373 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,13 @@ * -v /etc/localtime:/etc/localtime ,保持和主机相同时区 ### 设置自动重启 -`docker update --restart=always ${CONTAINER}` \ No newline at end of file +`docker update --restart=always ${CONTAINER}` + +### 批量部署 +使用docker-compose +将需要创建的网关ID 按照示例文件批量添加,同时在 yz_project.csv 中添加所有网关的配置信息 +如上两个配置修改完成后,执行 `docker-compose up -d` 即可 + +更新日志 +2024-12-10 09:52:45 factory升级v1.1.9 +2024-12-20 17:46:40 支持批量部署。 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ca85808 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +x-service-common: &service-common + image: gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.7 + restart: on-failure + volumes: + - ./yz_project.csv:/home/yz_project.csv + +services: + YZXHRC0124L200001: + <<: *service-common + command: [ "/home/start.sh", "YZXHRC0124L200001" ] + + YZXHRC0124L200002: + <<: *service-common + command: [ "/home/start.sh", "YZXHRC0124L200002" ] diff --git a/localtime b/localtime new file mode 100644 index 0000000..91f6f8b Binary files /dev/null and b/localtime differ diff --git a/start.sh b/start.sh index f7632d6..89e9e48 100755 --- a/start.sh +++ b/start.sh @@ -2,6 +2,9 @@ echo "start ssh" service ssh start +echo "start set project" +/yuzhen_iot/prod_manage/app/plumber -project /home/yz_project.csv -S $1 + echo "start scheduler" /yuzhen_iot/service_manage/manage/app/scheduler echo "yuzhen exit!" \ No newline at end of file diff --git a/yuzhen_iot/prod_manage/app/Version b/yuzhen_iot/prod_manage/app/Version new file mode 100755 index 0000000..19f5e1b --- /dev/null +++ b/yuzhen_iot/prod_manage/app/Version @@ -0,0 +1 @@ +v1.1.12 diff --git a/yuzhen_iot/prod_manage/app/factory b/yuzhen_iot/prod_manage/app/factory index 35c1881..82b332c 100755 Binary files a/yuzhen_iot/prod_manage/app/factory and b/yuzhen_iot/prod_manage/app/factory differ diff --git a/yuzhen_iot/prod_manage/app/npc b/yuzhen_iot/prod_manage/app/npc new file mode 100755 index 0000000..f697ea0 Binary files /dev/null and b/yuzhen_iot/prod_manage/app/npc differ diff --git a/yuzhen_iot/prod_manage/app/plumber b/yuzhen_iot/prod_manage/app/plumber index 14aadc2..0b580af 100755 Binary files a/yuzhen_iot/prod_manage/app/plumber and b/yuzhen_iot/prod_manage/app/plumber differ diff --git a/yuzhen_iot/prod_manage/app/ttyd b/yuzhen_iot/prod_manage/app/ttyd new file mode 100755 index 0000000..ce006d6 Binary files /dev/null and b/yuzhen_iot/prod_manage/app/ttyd differ diff --git a/yz_project.csv b/yz_project.csv new file mode 100644 index 0000000..517529b --- /dev/null +++ b/yz_project.csv @@ -0,0 +1,13 @@ +hardware_sn,hardware_mode,hardware_ver,uiot_addr,uiot_port,uiot_name,uiot_key,uiot_authmode,ntp_host,register_url ,frp_server_addr,frp_server_port +,,,,,,,,,,, +${device_SN},Horseman-A21,H21.0.0.1,106.75.75.68,1883,mxpoty5rco1jhwde|${device_SN}|2,pykqg5qpzspfce3w,0,106.75.75.68,,, +YZXHRA21A0321H160451,Horseman-A21,H21.0.0.1,124.70.13.110,1883,zzhtn1urep3vmvpv|YZXHRA21A0321H160451|1,c4bae55ep4ijnx49,0, cn.pool.ntp.org,,, +00257C30DD3A,Horseman-A21,H25.0.0.1,iot.yuzhen-iot.com,1883,k4nof78df3lxmd53|00257C30DD3A|2,bgldgnqgtjxglfp3,0,cn.pool.ntp.org,http://124.70.108.207:8080/dlp/v1/device/backupAndRestore,, +,,,,,,,,,,, +YZXHRA11102209160196,Horseman-A11,H11.0.0.1,106.75.75.68,1883,69g17ocen1v22o04|YZXHRA11102209160196|2,wlfnt3cqjby16ogs,0,106.75.75.68,,, +YZXHRC0124L200001,Horseman-A21,H21.0.0.1,106.75.75.68,1883,mxpoty5rco1jhwde|YZXHRC0124L200001|2,pykqg5qpzspfce3w,0,106.75.75.68,,, +YZXHRC0124L200002,Horseman-A21,H21.0.0.1,106.75.75.68,1883,mxpoty5rco1jhwde|YZXHRC0124L200002|2,pykqg5qpzspfce3w,0,106.75.75.68,,, + + + +