百度智能云智能边缘进程模式节点安装(linux端)
文档简介:
1、节点安装:
创建进程模式节点,填写节点相关信息;
点击安装,如下图所示:
选择操作系统:Linux
复制baetyl程序安装命令,在边缘节点上执行
1、节点安装
- 创建进程模式节点,填写节点相关信息;
- 点击安装,如下图所示:
- 选择操作系统:Linux
- 复制baetyl程序安装命令,在边缘节点上执行,
# curl模式 curl -sSL https://baetyl-repo-gz.gz.bcebos.com/v2/install.sh | bash # wget模式 wget
--no-check-certificate https://baetyl.bj.bcebos.com/test/install.sh | bash
如下图所示:
- 复制节点安装命令,在边缘节点上执行,如下图所示:
2、查看边缘服务状态
进程模式下,边缘计算框架baetyl会将边缘应用托管给systemd,并以服务的形式发布,可以通过systemctl命令查看。
# 通过systemctl查看baetyl服务 systemctl | grep baetyl # 返回结果 baetyl-edge-system.baetyl-broker-77zsf48j5.
1663915447jqisxn.baetyl-broker.1.service loaded active running baetyl-edge-system.baetyl-broker-77zsf48j5.
1663915447jqisxn.baetyl-broker.1.service baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service loaded active running
baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service baetyl-edge-system.baetyl-init-igkjsqy4b.1663915447d2ahdm.baetyl-init.1.service loaded active running
baetyl-edge-system.baetyl-init-igkjsqy4b.1663915447d2ahdm.baetyl-init.1.service
可以看到,边缘侧的服务名称,与云端副本名称是保持一致的,如下图所示:
3、查看边缘服务日志
3.1 通过应用日志文件查看
在进程模式节点的节点日志查看章节,有详细说明边缘应用日志查看方法。
3.2 通过journalctl查看
因为边缘应用都托管给了systemd,所以可以通过journalctl -u [服务名称]命令查看服务日志。但是这个日志主要是systemd的管理日志,而不是服务本身的日志。所以如果要查看应用本身的日志,还是需要通过日志文件方式查看。
# 通过journalctl -u [服务名称]查看日志 journalctl -u baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie
.baetyl-core.1.service # 返回结果 -- Logs begin at Tue 2022-08-23 15:07:59 CST, end at Wed 2022-09-28 14:41:40 CST. -- Sep 23 14:44:46 pd-vm systemd[1]: Started baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service. Sep 23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts":1663915486.1608543,"caller":"plugin/register.go:
31","msg":"plugin is registered","plugin":"httplink"} Sep 23 14:44:46 pd-vm baetyl[135195]: {"level":"info"
,"ts":1663915486.1609461,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"defaultpubsub"}
Sep 23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts":1663915486.1610336,"caller":"plugin/register.go:31"
,"msg":"plugin is registered","plugin":"mqttlink"} Sep 23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts":
1663915486.1610367,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"nodestats"} Sep
23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts":1663915486.1610398,"caller":"plugin/register.go:31",
"msg":"plugin is registered","plugin":"nvstats"} Sep 23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts"
:1663915486.1610427,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"qpsstats"} Sep
23 14:44:46 pd-vm baetyl[135195]: {"level":"info","ts":1663915486.1610472,"caller":"plugin/register.go:31","
msg":"plugin is registered","plugin":"wslink"} Sep 24 00:25:07 pd-vm systemd[1]: Stopping baetyl-edge-system.
baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service... Sep 24 00:25:07 pd-vm systemd[1]: baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service: Succeeded. Sep 24 00:25:07 pd-vm systemd[1]: Stopped baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service. -- Reboot -- Sep 26 09:44:30 pd-vm systemd[1]: Started baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service. Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts":1664156671.2211812,"caller":"plugin/register.go:31",
"msg":"plugin is registered","plugin":"httplink"} Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts"
:1664156671.2229228,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"defaultpubsub"}
Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts":1664156671.2247353,"caller":"plugin/register.go:31",
"msg":"plugin is registered","plugin":"mqttlink"} Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts"
:1664156671.224744,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"nodestats"}
Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts":1664156671.2247474,"caller":"plugin/register.go:31"
,"msg":"plugin is registered","plugin":"nvstats"} Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts"
:1664156671.2247503,"caller":"plugin/register.go:31","msg":"plugin is registered","plugin":"qpsstats"}
Sep 26 09:44:31 pd-vm baetyl[582]: {"level":"info","ts":1664156671.224759,"caller":"plugin/register.go:31"
,"msg":"plugin is registered","plugin":"wslink"} Sep 27 09:38:55 pd-vm systemd[1]: Stopping baetyl-edge-
system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service... Sep 27 09:38:56 pd-vm systemd[1]: baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service: Succeeded. Sep 27 09:38:56 pd-vm systemd[1]: Stopped baetyl-edge-system.baetyl-core-sggwknd8w.1663915447w8dtie.baetyl-core.1.service.
4、节点卸载
如果要卸载边缘节点,执行如下命令
sudo baetyl delete && sudo baetyl delete -n baetyl-edge