edegeXFoundry 2.0 搭建教程

简介

edegeXFoundry 2.0 搭建教程_第1张图片

irland版本

edgex foundry 主要分为1.x版本和2.x版本。版本接口和架构差异较大

步骤

1.edgex-go

仓库地址:

GitHub - edgexfoundry/edgex-go: EdgeX Golang Services Monorepo | Owner: Core/Support WG

编译:

make build

执行后会在cmd目录下生成对应的可执行程序。bin目录从2.0版本以后没有服务启动脚本edgex-launch.sh,可以把早期版本复制过来即可。

每个服务下有res文件夹,里面有配置文件configuration.toml

2.edgex-ui-go

可以通过 configuration.toml配置系统,也可以可视化配置系统。可视化需要启动ui服务。服务地址:http://localhost:4000/#/dashboard

仓库地址:

GitHub - edgexfoundry/edgex-ui-go: Owner: Core/Support WG

编译:

make build

运行:

make run

3.device-mqtt-go

edegeXFoundry 2.0 搭建教程_第2张图片

仓库地址:

GitHub - edgexfoundry/device-mqtt-go: Owner: Device WG

说明地址:

MQTT - EdgeX Foundry Documentation

edegeXFoundry 2.0 搭建教程_第3张图片

编译:

make build

运行:

export EDGEX_SECURITY_SECRET_STORE="false"

make run

4.设备mqtt模拟节点

仓库地址:

GitHub - SHILIANG17671467654/mock-device-driver

5.app demo

仓库地址:

GitHub - edgexfoundry/edgex-examples

文档介绍地址:

App Service Examples - EdgeX Foundry Documentation

编译:

make build

运行:

切换到相应目录运行

./app-service

6.资料连接:

GitHub 地址:EdgeX Foundry Project · GitHub

API接口地址

Build, Collaborate & Integrate APIs | SwaggerHub

7.常用测试接口

查询datacore收到了多少数据

http://localhost:59880/api/v2/reading/count

set接口

curl http://localhost:59882/api/v2/device/name/05scu/message -H "Content-Type:application/json" -X PUT -d '{"message":"Hello!"}'

get接口

curl http://localhost:59882/api/v2/device/name/05scu/message

A7核心板灯开关接口

echo 0 > /sys/class/leds/phycore-green/brightness

echo 1 > /sys/class/leds/phycore-green/brightness

你可能感兴趣的:(边缘计算,github)