换源,参考以下网址
https://blog.csdn.net/MangoHHHH/article/details/110563964
下载安装docker
sudo curl -fsSL https://get.daocloud.io/docker | sh
验证是否安装成功
sudo docker run hello-world1.2 安装docker-compose
sudo pip3 install docker-compose
如果报错找不到ffi.h文件,参考以下网址
https://blog.csdn.net/boling_cavalry/article/details/101105693
如果在安装过程中卡住不动就使用如下命令
sudo pip3 -v install docker-compose
验证是否安装成功
docker-compose version1.3 安装EdgeX
获取edgex-compose所有的文件
sudo git clone https://github.com/edgexfoundry/edgex-compose.git
使用带ui的EdgeX的yml文件,并重命名为docker-compose.yml
注意自己操作系统选择对应架构的yml文件
sudo cp edgex-compose/docker-compose-no-secty-with-ui-arm64.yml docker-compose.yml
docker启动EdgeX参考如下网址
https://blog.csdn.net/qq_43796312/article/details/121330293
2. k3s+Edgex 2.1 raspberry 2.1.1 Raspbian Buster 启用旧版的 iptablesRaspbian Buster 默认使用nftables而不是iptables。 k3s 网络功能需要使用iptables,而不能使用nftables。 按照以下步骤切换配置Buster使用legacy iptables:
sudo iptables -F sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy2.1.2 Raspbian Buster 启用 cgroup
标准的 Raspbian Buster 安装没有启用 cgroups。k3s需要cgroups来启动 systemd 服务。在/boot/cmdline.txt中第一行末尾直接添加cgroup_memory=1 cgroup_enable=memory(不要换行)就可以启用cgroups。重启系统以生效。
reboot2.1.3 server节点
设置K3S_URL参数会使 k3s 以worker模式运行。k3s agent将在所提供的URL上向监听的 k3s服务器注册。K3S_TOKEN使用的值存储在你的服务器节点上的/var/lib/rancher/k3s/server/node-token路径下。
curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_NODE_NAME=master sh -
其中K3S_NODE_NAME是节点名称,可按需更改。
2.1.4 获取tokenK3S_TOKEN使用的值存储在服务器节点上的/var/lib/rancher/k3s/server/node-token路径下。
2.1.5 agent节点curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://master:6443 K3S_TOKEN=K10a9880b0d8360928547521975137be62ba6dbf32ea4ab3e1764c06a930eec0d84::server:57b40274552955b9e01d8d7e00f4e666 K3S_NODE_NAME=agent01 sh -
其中K3S_URL中的master是server节点地址,自行更换;K3S_TOKEN的值获取参考2.1.4操作。
2.1.6 禁止调度server可选,在server节点上执行如下命令,部署EdgeX时不会在server节点上运行pod
kubectl cordon server2.1.7 获取k3s部署EdgeX的yaml文件
参考如下网址:
https://mp.csdn.net/mp_blog/creation/editor/121344430
2.1.8 使用yaml文件部署EdgeXkubectl apply -f k3s-redis-no-secty-with-ui-arm64.yaml
查看node信息
kubectl get node
查看node详细信息
kubectl get node -o wide
查看pod信息
kubectl get pod
查看pod详细信息
kubectl get pod -o wide2.2 ubuntu
参考树莓派部署的2.1.3-2.1.8,注意使用的yaml文件需要对应amd64架构。



