uname -r
docker --version
安装参考链接:
https://blog.csdn.net/chezong/article/details/128917107
curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/ireland/docker-compose-no-secty.yml -o docker-compose.yml;
docker-compose up -d
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/
此刻部署成功。
重新运行的时候,报错
查看状态也没启动
百度原因是中途进行了防火墙的关闭;需要重启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
发现没有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端口的访问结果: