EdgeX Foundry (一)安装和部署
创始人
2024-05-25 09:49:03
0
  1. 系统版本

uname -r
  1. docker 版本

docker --version
  1. docker-compose版本

安装参考链接:

https://blog.csdn.net/chezong/article/details/128917107

  1. 拉取edgex foundry 配置文件 docker-compose.yml;

curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/ireland/docker-compose-no-secty.yml -o docker-compose.yml; 
  1. 启动edgex foundry

docker-compose up -d
  1. 查看edgex foundry启动状态

docker-compose ps -a

本地访问,

curl http://localhost:59880/api/v2/event/device/name/Random-Integer-Device

局域网本机浏览器无法连接,发现微服务的IP地址为127.0.0.1,通过修改

vim docker-compose.yml

文件中的IP地址,把所有的127.0.0.1修改为0.0.0.0,表示任意IP地址都可以访问,保存退出,在运行如下命令,从新拉取镜像

docker-compose pull

再运行所有镜像

docker-compose up -d
docker-compose ps -a

现在看到127.0.0.1改成了0.0.0.0;

浏览器输入http://192.168.111.61:8500/

此刻部署成功。

  1. 碰到的问题1

重新运行的时候,报错

查看状态也没启动

百度原因是中途进行了防火墙的关闭;需要重启docker.

systemctl restart docker

然后再来启动。就没问题了。

docker-compose 常用指令。

# 安装并启动EdgeX
sudo docker-compose up -d     # -d 后台运行容器# 查看所有容器运行状况
sudo docker-compose ps# 显示容器日志
docker-compose logs -f [compose-contatainer-name]# 停止容器
sudo docker-compose stop# 启动容器
sudo docker-compose start# 停止和删除所有容器
sudo docker-compose down
  1. 碰到的问题2

发现没有4000端口的ui界面,

发现是下载的版本不一样。上面的是2.0.0版本,需要升级到2.1.0版本

# * EdgeX Foundry, Jakarta (2.0.0) release

升级为

# * EdgeX Foundry, Ireland (2.1.0) release

更新文件:

#  * Copyright 2021 Intel Corporation.
#  *
#  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
#  * in compliance with the License. You may obtain a copy of the License at
#  *
#  * http://www.apache.org/licenses/LICENSE-2.0
#  *
#  * Unless required by applicable law or agreed to in writing, software distributed under the License
#  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
#  * or implied. See the License for the specific language governing permissions and limitations under
#  * the License.
#  *
#  * EdgeX Foundry, Jakarta (2.1.0) release
#  *******************************************************************************/
#
#
#
# ************************ This is a generated compose file ****************************
#
# DO NOT MAKE CHANGES that are intended to be permanent to EdgeX edgex-compose repo.
#
# Permanent changes can be made to the source compose files located in the compose-builder folder
# at the top level of the edgex-compose repo.
#
# From the compose-builder folder use `make build` to regenerate all standard compose files variations
#
networks:edgex-network:driver: bridge
services:app-service-rules:container_name: edgex-app-rules-enginedepends_on:- consul- dataenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_PROFILE: rules-engineEDGEX_SECURITY_SECRET_STORE: "false"REGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-app-rules-engineTRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redisTRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST: edgex-redishostname: edgex-app-rules-engineimage: edgexfoundry/app-service-configurable:2.1.1networks:edgex-network: {}ports:- 59701:59701/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001command:container_name: edgex-core-commanddepends_on:- consul- database- metadataenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"REGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-core-commandhostname: edgex-core-commandimage: edgexfoundry/core-command:2.1.1networks:edgex-network: {}ports:- 59882:59882/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001consul:command: agent -ui -bootstrap -server -client 0.0.0.0container_name: edgex-core-consulhostname: edgex-core-consulimage: consul:1.10.3networks:edgex-network: {}ports:- 8500:8500/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: root:rootvolumes:- consul-config:/consul/config:z- consul-data:/consul/data:zdata:container_name: edgex-core-datadepends_on:- consul- database- metadataenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"MESSAGEQUEUE_HOST: edgex-redisREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-core-datahostname: edgex-core-dataimage: edgexfoundry/core-data:2.1.1networks:edgex-network: {}ports:- 5563:5563/tcp- 59880:59880/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001database:container_name: edgex-redisenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"REGISTRY_HOST: edgex-core-consulhostname: edgex-redisimage: redis:6.2.6-alpinenetworks:edgex-network: {}ports:- 6379:6379/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: root:rootvolumes:- db-data:/data:zdevice-rest:container_name: edgex-device-restdepends_on:- consul- data- metadataenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"MESSAGEQUEUE_HOST: edgex-redisREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-device-resthostname: edgex-device-restimage: edgexfoundry/device-rest:2.1.1networks:edgex-network: {}ports:- 59986:59986/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001device-virtual:container_name: edgex-device-virtualdepends_on:- consul- data- metadataenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"MESSAGEQUEUE_HOST: edgex-redisREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-device-virtualhostname: edgex-device-virtualimage: edgexfoundry/device-virtual:2.1.1networks:edgex-network: {}ports:- 59900:59900/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001metadata:container_name: edgex-core-metadatadepends_on:- consul- database- notificationsenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"NOTIFICATIONS_SENDER: edgex-core-metadataREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-core-metadatahostname: edgex-core-metadataimage: edgexfoundry/core-metadata:2.1.1networks:edgex-network: {}ports:- 59881:59881/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001notifications:container_name: edgex-support-notificationsdepends_on:- consul- databaseenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"REGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-support-notificationshostname: edgex-support-notificationsimage: edgexfoundry/support-notifications:2.1.1networks:edgex-network: {}ports:- 59860:59860/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001rulesengine:container_name: edgex-kuiperdepends_on:- databaseenvironment:CONNECTION__EDGEX__REDISMSGBUS__PORT: 6379CONNECTION__EDGEX__REDISMSGBUS__PROTOCOL: redisCONNECTION__EDGEX__REDISMSGBUS__SERVER: edgex-redisCONNECTION__EDGEX__REDISMSGBUS__TYPE: redisEDGEX__DEFAULT__PORT: 6379EDGEX__DEFAULT__PROTOCOL: redisEDGEX__DEFAULT__SERVER: edgex-redisEDGEX__DEFAULT__TOPIC: rules-eventsEDGEX__DEFAULT__TYPE: redisKUIPER__BASIC__CONSOLELOG: "true"KUIPER__BASIC__RESTPORT: 59720hostname: edgex-kuiperimage: lfedge/ekuiper:1.4.4-alpinenetworks:edgex-network: {}ports:- 59720:59720/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: kuiper:kuipervolumes:- kuiper-data:/kuiper/data:zscheduler:container_name: edgex-support-schedulerdepends_on:- consul- databaseenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-dataINTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-dataREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-support-schedulerhostname: edgex-support-schedulerimage: edgexfoundry/support-scheduler:2.1.1networks:edgex-network: {}ports:- 59861:59861/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001system:container_name: edgex-sys-mgmt-agentdepends_on:- command- consul- data- metadata- notifications- schedulerenvironment:CLIENTS_CORE_COMMAND_HOST: edgex-core-commandCLIENTS_CORE_DATA_HOST: edgex-core-dataCLIENTS_CORE_METADATA_HOST: edgex-core-metadataCLIENTS_SUPPORT_NOTIFICATIONS_HOST: edgex-support-notificationsCLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-schedulerDATABASES_PRIMARY_HOST: edgex-redisEDGEX_SECURITY_SECRET_STORE: "false"EXECUTORPATH: /sys-mgmt-executorMETRICSMECHANISM: executorREGISTRY_HOST: edgex-core-consulSERVICE_HOST: edgex-sys-mgmt-agenthostname: edgex-sys-mgmt-agentimage: edgexfoundry/sys-mgmt-agent:2.1.1networks:edgex-network: {}ports:- 58890:58890/tcpread_only: truerestart: alwayssecurity_opt:- label:disable- no-new-privileges:trueuser: root:rootvolumes:- /var/run/docker.sock:/var/run/docker.sock:zui:container_name: edgex-ui-goenvironment:EDGEX_SECURITY_SECRET_STORE: "false"hostname: edgex-ui-goimage: edgexfoundry/edgex-ui:2.1.0networks:edgex-network: {}ports:- 4000:4000/tcpread_only: truerestart: alwayssecurity_opt:- no-new-privileges:trueuser: 2002:2001
version: '3.7'
volumes:consul-config: {}consul-data: {}db-data: {}kuiper-data: {}

4000端口的访问结果:

相关内容

热门资讯

喜欢穿一身黑的男生性格(喜欢穿... 今天百科达人给各位分享喜欢穿一身黑的男生性格的知识,其中也会对喜欢穿一身黑衣服的男人人好相处吗进行解...
发春是什么意思(思春和发春是什... 本篇文章极速百科给大家谈谈发春是什么意思,以及思春和发春是什么意思对应的知识点,希望对各位有所帮助,...
网络用语zl是什么意思(zl是... 今天给各位分享网络用语zl是什么意思的知识,其中也会对zl是啥意思是什么网络用语进行解释,如果能碰巧...
为什么酷狗音乐自己唱的歌不能下... 本篇文章极速百科小编给大家谈谈为什么酷狗音乐自己唱的歌不能下载到本地?,以及为什么酷狗下载的歌曲不是...
华为下载未安装的文件去哪找(华... 今天百科达人给各位分享华为下载未安装的文件去哪找的知识,其中也会对华为下载未安装的文件去哪找到进行解...
怎么往应用助手里添加应用(应用... 今天百科达人给各位分享怎么往应用助手里添加应用的知识,其中也会对应用助手怎么添加微信进行解释,如果能...
家里可以做假山养金鱼吗(假山能... 今天百科达人给各位分享家里可以做假山养金鱼吗的知识,其中也会对假山能放鱼缸里吗进行解释,如果能碰巧解...
四分五裂是什么生肖什么动物(四... 本篇文章极速百科小编给大家谈谈四分五裂是什么生肖什么动物,以及四分五裂打一生肖是什么对应的知识点,希...
一帆风顺二龙腾飞三阳开泰祝福语... 本篇文章极速百科给大家谈谈一帆风顺二龙腾飞三阳开泰祝福语,以及一帆风顺二龙腾飞三阳开泰祝福语结婚对应...
美团联名卡审核成功待激活(美团... 今天百科达人给各位分享美团联名卡审核成功待激活的知识,其中也会对美团联名卡审核未通过进行解释,如果能...