支持批量部署。
This commit is contained in:
parent
16550480ac
commit
fc74d8c115
@ -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 "PermitRootLogin yes\nPasswordAuthentication yes\n" >> /etc/ssh/sshd_config;\
|
||||||
echo root:123456 |chpasswd
|
echo root:123456 |chpasswd
|
||||||
|
|
||||||
|
COPY localtime /etc
|
||||||
COPY nats-server /usr/bin/
|
COPY nats-server /usr/bin/
|
||||||
COPY checksum /usr/bin/
|
COPY checksum /usr/bin/
|
||||||
COPY yuzhen_iot /yuzhen_iot/
|
COPY yuzhen_iot /yuzhen_iot/
|
||||||
|
11
README.md
11
README.md
@ -17,4 +17,13 @@
|
|||||||
* -v /etc/localtime:/etc/localtime ,保持和主机相同时区
|
* -v /etc/localtime:/etc/localtime ,保持和主机相同时区
|
||||||
|
|
||||||
### 设置自动重启
|
### 设置自动重启
|
||||||
`docker update --restart=always ${CONTAINER}`
|
`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 支持批量部署。
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -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" ]
|
3
start.sh
3
start.sh
@ -2,6 +2,9 @@
|
|||||||
echo "start ssh"
|
echo "start ssh"
|
||||||
service ssh start
|
service ssh start
|
||||||
|
|
||||||
|
echo "start set project"
|
||||||
|
/yuzhen_iot/prod_manage/app/plumber -project /home/yz_project.csv -S $1
|
||||||
|
|
||||||
echo "start scheduler"
|
echo "start scheduler"
|
||||||
/yuzhen_iot/service_manage/manage/app/scheduler
|
/yuzhen_iot/service_manage/manage/app/scheduler
|
||||||
echo "yuzhen exit!"
|
echo "yuzhen exit!"
|
1
yuzhen_iot/prod_manage/app/Version
Executable file
1
yuzhen_iot/prod_manage/app/Version
Executable file
@ -0,0 +1 @@
|
|||||||
|
v1.1.12
|
Binary file not shown.
BIN
yuzhen_iot/prod_manage/app/npc
Executable file
BIN
yuzhen_iot/prod_manage/app/npc
Executable file
Binary file not shown.
Binary file not shown.
BIN
yuzhen_iot/prod_manage/app/ttyd
Executable file
BIN
yuzhen_iot/prod_manage/app/ttyd
Executable file
Binary file not shown.
13
yz_project.csv
Normal file
13
yz_project.csv
Normal file
@ -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,,,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
Loading…
x
Reference in New Issue
Block a user