惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
腾讯CDC
Project Zero
Project Zero
C
CXSECURITY Database RSS Feed - CXSecurity.com
IT之家
IT之家
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Threatpost
N
News | PayPal Newsroom
C
Cybersecurity and Infrastructure Security Agency CISA
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
B
Blog RSS Feed
Forbes - Security
Forbes - Security
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
P
Proofpoint News Feed
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
T
Tenable Blog
MyScale Blog
MyScale Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
W
WeLiveSecurity
D
DataBreaches.Net
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
罗磊的独立博客
The Last Watchdog
The Last Watchdog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
美团技术团队
Microsoft Security Blog
Microsoft Security Blog

Nemo

再见,2025 Complete ORB-SLAM3 Setup Guide for Jetson Xavier NX with RealSense D455 20250723 再见,2024 Using CertBot for Automatic Secure EMQX Broker Create Your Own GPS Data Publisher Support SSL AGV Dispatching System Technical Documentation Finding Nemo No title 香港賽馬會呈獻系列:黑白——攝影敘事 再见,2023 团团是只猫 Design an FSM for Robot State Machines – Basics of Computer Science Data-driven robot lifespan: Collection 数据驱动的机器人寿命:收集、诊断、预测 Exploring the design space of binary search trees 特首来了 Large language models, explained with a minimum of math and jargon 设计有缓存异步逻辑的监控脚本并测试其资源占用 使用loguru记录串口数据并使用Docker搭建ARM开发环境 在vscode的Dev Container中构建.NET开发环境及使用doxygen和graphviz绘制函数调用图 State or Status? A*算法两种时间复杂度 /A* Algorithm: Two Types of Time Complexity 使用KD-Tree快速收敛到最近坐标点/Fast convergence to the nearest coordinate point using KD-Tree 翻译 || 总结 - Go语言中的空结构体(The empty struct) 再见,2022 从PE工作报告中能读出什么 Give me miles, give me truth AMR调度系统性能优化/AMR Dispatch System Performance Optimization 条件触发AMR避让流程/Conditionally triggered AMR avoidance process 调度系统中加密算法的使用/增加SM4补0方法/Use of encryption algorithms in scheduling systems/add SM4 complementary 0 method 一篇关于北京四天三夜的攻略 2022 藏疆自驾 策划/招募书 AMR仿真模型/AMR Simulation Model 东东有鱼2022年会分享 使用perf-FlameGraph监控系统性能 Beyond Compare 4删除试用 你的灵魂有香气 Pyinstaller打包Python项目 [转载]Python中的单例模式的几种实现方式的及优化 - Nemo 再见! 2020 1024 UML软件建模 入职优必选一个月 写论文时 那些让你开心的软件 - Nemo 分享一个记录刷题次数的模版 LeetCode-查找表类算法题精析 PyCharm 调用vs 2010 C++库导致提示报错R6034解决方法 MySQL基础教程 多种数据结构的Python实现形式 字节跳动-挑战字符串 选择排序 二分查找和大O表示法 算法中的动态规划问题 高高手课程-青山裕企人像摄影 笔记(内含福利)
Docker实现调度系统整体部署/Docker implementation of dispatching system overall deployment
Nemo · 2022-08-25 · via Nemo

背景

传统的AMR调度系统架构的部署方式和操作面板限制较高。为了打破这种限制,本文提出了使用容器技术实现AMR调度系统迁移性强、成本低廉、多平台化的方案。

涉及到以下内容:

  • Docker镜像自动化部署
  • Django代码加密
  • Dispatching代码加密

Docker

使用centos8.2镜像搭建服务:

  • ssh
  • nginx
  • python
  • mysql
  • redis
  • django
  • mqtt

搭建过程很简单,就不赘述了。规划好各个服务之间的端口区间和统一配置文件,自启动服务,再打包就好了。

自动化部署脚本

利用Docker便于迁移的特性,实现Linux/win的自动化部署

利用Docker便于迁移的特性,实现Linux/win的自动化部署。部署前需要查看宿主机空闲的端口区间是否满足系统部署需要。例如,win下可以使用以下命令查看占用的ipv4的端口区间:

netsh interface ipv4 show excludedportrange protocol=tcp

建议自动化部署脚本具备全离线安装,适应局域网环境。以下是简易版的部署手册:

确认安装清单

共11个文件,其中镜像ubt-amrb-dc.tar的MD5为:f4094908523158f0dd9d66fb4eab56cd,建议复制完成后检查其MD5值是否相同。

微信截图_20220321152009.png

确认客户机环境

为保障性能和稳定性,不推荐在Windows下使用虚拟机搭建业务环境,且需确保环境配置最低为:内存:4G,硬盘空间:60G

确认客户机环境为Centos:

cat /etc/redhat-release

如果显示:CentOS Linux release 7.9.2009 (Core)则符合要求,版本大数为7.9即可。

创建工作目录

如果权限不够,输入:

sudo su

/home下创建rcs目录:

mkdir /home/rcs
拷贝安装文件

确定U盘文件格式为exfat,复制文件到工作目录

mv ./rcs /home/rcs
自动化安装

提升脚本权限:

chmod +x installer.x

运行安装脚本:

./installer.x
导入镜像 ubt-amrb-dc.tar 中...
sha256:97ee8a0f2bf1389ceb2e1703a0328ff86f3400b3d511eacfd2b2b4200e570736
启动容器 with ubt-amrb-dc.tar...
b699b460410477cde69bf730acb5b6f67067f1c1aa2790a1050460b4344acd4e
部署完成!

等待安装完成后,检测docker容器是否运行:

docker ps -a

如果看到ubt-amrb容器运行则安装成功

调试

建议执行诸如重启客户机器和常规冒烟操作测试是否安装成功

tips

  • 进行必要的容器安全设置,不暴露非必要端口、使用秘钥登录、定时清理其他服务、宿主机使用安全策略等

  • 推荐使用systemctl代替/etc/rc.loacl

  • 统一配置文件存放

  • 测试系统周期运行日志文件大小,设定最小需求空间

Django代码加密

常见的有:

  • pyarmor
  • 混淆加密:注意提示语别混淆了,不然显示乱码

按需选择,测试通过就好了

Dispatching代码加密

纯Python程序可以使用pyinstall加密,加密过程见博客:


Background

The traditional architecture of the AMR scheduling system has high deployment and operation panel limitations. To break this limitation, this article proposes a solution that uses container technology to achieve strong migration, low cost, and multi-platform AMR scheduling system.

The following contents are involved:

  • Docker image automation deployment
  • Django code encryption
  • Dispatching code encryption

Docker

Use the centos8.2 image to build the following services:

  • ssh
  • nginx
  • python
  • mysql
  • redis
  • django
  • mqtt

The installation process is very simple and will not be repeated here. Plan the port range between each service and the unified configuration file, start the service automatically, and then package it.

Automation Deployment Script

Use the feature that Docker is easy to migrate to achieve automated deployment on Linux/win.

Before deployment, you need to check whether the available port range of the host meets the system deployment needs. For example, you can use the following command to view the IPv4 port range occupied by win:

netsh interface ipv4 show excludedportrange protocol=tcp

It is recommended that the automated deployment script have full offline installation capabilities to adapt to the local area network environment. Following is the simplified deployment manual:

Confirm Installation List

There are a total of 11 files, among which the MD5 of the image ubt-amrb-dc.tar is: f4094908523158f0dd9d66fb4eab56cd, it is recommended to check whether their MD5 values are the same after copying is completed.

https://kanghaov-img-1256185664.file.myqcloud.com/2022/03/21/bbd7762e298b2.png

Confirm Client Environment

To ensure performance and stability, it is not recommended to use virtual machines to build business environments under Windows, and it is necessary to ensure that the environment configuration is at least: memory: 4G, disk space: 60G.

Confirm that the client environment is CentOS:

cat /etc/redhat-release

If it displays: CentOS Linux release 7.9.2009 (Core), it meets the requirements, and the version number is greater than or equal to 7.9.

Create Working Directory

If the permission is not enough, enter:

sudo su

Create the rcs directory under /home:

mkdir /home/rcs

Copy Installation Files

Make sure the USB file format is exfat and copy the files to the working directory.

mv ./rcs /home/rcs

Automated Installation

Elevate the script permissions:

chmod +x installer.x

Run the installation script:

./installer.x
Importing image ubt-amrb-dc.tar...
sha256:97ee8a0f2bf1389ceb2e1703a0328ff86f3400b3d511eacfd2b2b4200e570736
Starting container with ubt-amrb-dc.tar...
b699b460410477cde69bf730acb5b6f67067f1c1aa2790a1050460b4344acd4e
Deployment completed!

After waiting for the installation to complete, check whether the docker container is running:

docker ps -a

If you see the ubt-amrb container running, the installation is successful.

Debugging

It is recommended to perform necessary container security settings, do not expose unnecessary ports, use key login, regularly clean up other services, and use security policies on the host.

  • Recommend using systemctl instead of /etc/rc.local
  • Unified configuration file storage
  • Test the size of the running log file of the system and set the minimum space requirement

Django Code Encryption

Common ones are:

  • pyarmor
  • Obfuscation encryption: pay attention to not obfuscate the prompt language, otherwise it will display garbled characters.

Choose as needed, and pass the test.

Dispatching Code Encryption

Pure Python programs can use PyInstall encryption, and the encryption process is shown in the blog: