边缘计算平台EdgeX Foundry安装
要求:
![](https://img.haomeiwen.com/i10839544/c2ca7a2e19ddd466.png)
EdgeX Foundry的安装提供了多种方式:
(1)Docker compose files安装(推荐)
(2)源码编译安装(作为edgex Foundry开发人员)
(3)其他方式(其他个人或组织提供)
1、docker compose files安装
通过docker-compose file文件安装EdgeX
前提条件:已安装docker及docker-compose
下载compose file文件(https://github.com/edgexfoundry/developer-scripts/tree/master/releases),启动服务即可
![](https://img.haomeiwen.com/i10839544/da7c60e9e871a6db.png)
注意: 服务启动前,会先pull镜像,可能耗时较长,可以先使用docker-compose pull镜像到本地后,在执行docker-compose up
可以看到edgex有多达十几个微服务,都以docker容器的方式运行。其中:edgex-core-xxx对应core services层服务, edgex-device-xxx对应device services层服务,edgex-support-xxx对应support services层服务,edgex-export-xxx对应export services层服务。edgex-mongo是存储数据的数据库服务。compose-files_portainer_1是容器管理平台。edgex-ui-go是edgex的UI 。
每个微服务各司其职,服务端口情况如下:
![](https://img.haomeiwen.com/i10839544/e0e9a8005f3787f3.png)
Edgex Foundry UI,http://localhost:4000/ Admin/admin
![](https://img.haomeiwen.com/i10839544/3632a5f31fe2a980.png)
容器管理平台portainer,可以对容器、镜像等进行管理
http://localhost:9000/ admin
![](https://img.haomeiwen.com/i10839544/f1835f2f8370fb97.png)
服务注册、发现中心consul
http://localhost:8500/
![](https://img.haomeiwen.com/i10839544/0717335122433018.png)
后端数据存储服务mongo,本地安装mongodb compass可视化工具连接mongo服务即可
![](https://img.haomeiwen.com/i10839544/843d4cb79d415c6a.png)
2、源码安装
前提:
1、已安装go(ll编译go代码)
2、已安装ZeroMq(edgex中各微服务通过zeromq通信)
3、已安装数据库服务mongo(提供后端数据存储)
安装步骤:
1、下载代码
git clone https://github.com/edgexfoundry/edgex-go.git或者git clone git@github.com:edgexfoundry/edgex-go.git
![](https://img.haomeiwen.com/i10839544/907ab8869ee756c4.png)
2、编译
cd edgex-go
make build
![](https://img.haomeiwen.com/i10839544/888715f10670d6ca.png)
3、运行
cd bin
./edgex-launch.sh
或者
make run
![](https://img.haomeiwen.com/i10839544/c53bc7796c06d9e3.png)
详细可参见,参考2、3
3、其他方式
开源项目一:edgexfoundry-install
地址:
github --> https://github.com/lesliechung88/edgexfoundry-install/
gitee --> https://gitee.com/hui_gege/edgexfoundry-install
开源项目二:edgexfoundry-k8s
地址:
github --> https://github.com/lesliechung88/edgexfoundry-k8s
gitee --> https://gitee.com/hui_gege/edgexfoundry-k8s
参考:
1、https://fuji-docs.edgexfoundry.org/Ch-GettingStartedUsers.html
2、https://fuji-docs.edgexfoundry.org/Ch-GettingStartedDevelopers.html
3、https://github.com/edgexfoundry/edgex-go
网友评论