AI防损项目
本帖最后由 King 于 2022-8-4 19:17 编辑日志清理 30天一次
密码:ccl12345
新店配置:
2个文件夹 yml 文件,deploy->group_vars,inventories
部署core:deploy->roles->core->main.yml
要改版本号,use_encrypted_code(使用加密代码):true打开。其他不用改
摄像头只改ip地址:
deploy/roles/core/files/cr/data/sote_info --->xxx.csv
.j2模板文件不大需要改,配置好core 等,ansible 会调用这几个J2 生成其他.sh 脚本
新店需要整理一个基础表
店名、摄像头号、core ip等
gitlab 和 ftp 都有一份core 等包,gitlab 需要开发上传, FTP上是运维下载使用
1、/etc/hosts
2.\\wsl$\Ubuntu-20.04\ccl\deployment\deploy\inventories\ccl_pc0.yml
\\wsl$\Ubuntu-20.04\ccl\deployment\deploy\inventories\hosts
3.\\wsl$\Ubuntu-20.04\ccl\deployment\deploy\group_vars\ccl_pc0.yml
\\wsl$\Ubuntu-20.04\ccl\deployment\deploy\group_vars\all.yml(不需要改)默认
4.\\wsl$\Ubuntu-20.04\ccl\deployment\deploy\host_vars\ccl_pc0.yml
加密库的最新版本附带了它们自己的本机依赖项,但要获得它们,您需要升级 pip,可能还需要升级虚拟环境。所以对我来说,解决方案是:
pip install --upgrade --force-reinstall pip virtualenv
# python3 -m pip list
Package Version
---------- -------
pip 21.3.1
setuptools 40.6.2
wheel 0.37.1
# python3 -m pip install cryptography
Collecting cryptography
Downloading cryptography-38.0.3-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB)
|████████████████████████████████| 4.2 MB 78 kB/s
Collecting cffi>=1.12
Downloading cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB)
|████████████████████████████████| 402 kB 81 kB/s
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
|████████████████████████████████| 118 kB 103 kB/s
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.15.1 cryptography-38.0.3 pycparser-2.21
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
# python3 -m pip list
Package Version
------------ -------
cffi 1.15.1
cryptography 38.0.3
pip 21.3.1
pycparser 2.21
setuptools 40.6.2
wheel 0.37.1
#
本帖最后由 King 于 2022-11-16 13:17 编辑
我应该在docker-compose.yml文件所在的正确目录下执行docker compose命令
# 关闭
$ docker-compose down -v
# 启动 执行启动,需要有docker-compose.yml 配置文件
$ docker-compose up -d
# 如果出现以下错误,请启动docker,或重启docker
$ docker-compose ps
no configuration file provided: not found
$ systemctl start docker
$ systemctl restart docker
本帖最后由 King 于 2022-11-22 20:09 编辑
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum update
sudo yum install docker-ce docker-ce-cli containerd.io
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.11.0
本帖最后由 King 于 2022-11-14 11:09 编辑
$ docker pull chenhw2/aliyun-ddns-cli
$ docker run -d \
-e "AKID=LTAI5tSNmEVgeEpVXcUQNVZm" \
-e "AKSCT=nBBt9ITC20Sedm0V9ruWaBa20aDKB8" \ -e "DOMAIN=ddns.aliyun.win" \
-e "REDO=600" \
chenhw2/aliyun-ddns-cli
用户登录名称 ccl-ai@34116573.onaliyun.com
登录密码 Rq31TQy|gm(EOXKxm8fFSS$1tsmi(gEO
AccessKey ID LTAI5tEaCRUR7TPCUF4Z2Xeu
AccessKey Secret rD7NzRDJUkn3ojiqe3P719SbrSrhsJ RD 详细X
基本翻译
abbr. DOS 命令:删除空的子目;注册营养师(Registered Dietitian);乡村免费邮递(Rural Delivery)
网络释义
RD: 放电电阻
RD 潜脑调查室: Real Drive
Waterloo Rd: 窝打老道
本帖最后由 King 于 2022-11-23 17:30 编辑
tail -200f /var/log/messages
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://rvg26q5g.mirror.aliyuncs.com"],
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
},
"data-root": "/ccl/docker_home/var/lib/docker",
"storage-driver": "overlay2"
}
systemctl daemon-reload
systemctl restart docker
vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
systemctl daemon-reload
systemctl restart docker
本帖最后由 King 于 2022-12-1 13:29 编辑
sudo docker run -d --name=rabbit -p 5672:5672 -p 5671:5671 -p 4369:4369 -p 15671:15671 -p 15672:15672 -p 25672:25672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=123456 myregistry.com:5443/rabbitmq:3-management
sudo mount -t ntfs /dev/sdb3 /ccl/core_0/log/move
之后 重启mgmt 可以读到日志
core/current下运行
./logs_shell.sh 1查看交易信号
查看已启动rabbitmq 信息
root@CCL-CharlesKing:/ccl/deployment/deploy# curl http://192.168.199.23:8082/info/mq
{"ip": "192.168.199.23", "user": "ccl", "pass": "CCL2020ccl!", "port": "5672"}root@CCL-CharlesKing:/ccl/deployment/deploy#
1、备份或删除当前时区文件mv /etc/localtime /etc/localtime.CST-8
#rm -f /etc/localtime
2、创建新的UTC时区文件
ln -s /usr/share/zoneinfo/UTC /etc/localtime
3、查看
timedatectl
4、查看当前时间
date
页:
[1]