This repo is based on EdgeXFoundry Export Services
To allow Edgexfoundry export data to MindSphere(Siemens open IoT operating systhem), some codes of export-client and export-distro services need to be rewritten. Two feasible ways at present, one is by Cumulocity, another is using Open Edge Device Kit(OEDK).
- Add
MINDCONNECT_TOPICas the topic of Cumulocity and rewrite related detection code. - Add
internal/export/distro/mindconnect.gofile to exec specific export commands.
- OEDK Documentation here.
- Add
OEDKCONNECT_TOPICas the topic of OEDK and rewrite related detection code. - Add
cmd/export-distro/res/oedkconfig.tomlfor some pre-configurations - Add
internal/export/distro/loadandupdateconfig.gofile for oedk configuration,internal/export/distro/oedktopic.gofile for oedk topics,internal/export/distro/oedkconnect.gofile to exec specific export commands.
- Install and run OEDK and Mosquitto, refer to documentation.
- Run the export-client service and update a new export endpoint by RESTful API of export-client service, use mosquitto address and port, and use
OEDKCONNECT_TOPIC. - Do this step iff OEDK hasn't been initialized. Download onboard key and copy the context to
oedkconfig.tomlin single quotes, that is due to the escape character. Change the IsInitialized option to false. Ignore the DataSorceId and DataPointId. - Run the export-distro.
Note: Only export-distro doesn't support cross compiler. If needed, please built on arm64.
The following is the offical README
EdgeX Foundry is a vendor-neutral open source project hosted by The Linux Foundation building a common open framework for IoT edge computing. At the heart of the project is an interoperability framework hosted within a full hardware- and OS-agnostic reference software platform to enable an ecosystem of plug-and-play components that unifies the marketplace and accelerates the deployment of IoT solutions. This repository contains the Go implementation of EdgeX Foundry microservices. It also includes files for building the services, containerizing the services, and initializing (bootstrapping) the services.
go get github.com/rjeczalik/pkgconfig/cmd/pkg-config
Several EdgeX Foundry services depend on ZeroMQ for communications by default.
The easiest way to get and install ZeroMQ on Linux is to use or follow the following setup script: https://gist.github.com/katopz/8b766a5cb0ca96c816658e9407e83d00.
For MacOS, use brew: brew install zeromq. Please note that the necessary pc file will need to be added to the PKG_CONFIG_PATH environment variable. For example PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.2.5/lib/pkgconfig/
Note: Setup of the ZeroMQ library is not supported on Windows plaforms.
To fetch the code and build the microservice execute the following:
cd $GOPATH/src
go get github.com/edgexfoundry/export-go
cd $GOPATH/src/github.com/edgexfoundry/export-go
# pull the 3rd party / vendor packages
make prepare
# build the microservices
make build
# run the services
make run
Note You will need to have the database running before you execute make run. If you don't want to install a database locally, you can bring one up via their respective Docker containers.
This project has facilities to create and run Docker containers.
See https://docs.docker.com/install/ to learn how to obtain and install Docker.
cd $GOPATH/src
go get github.com/edgexfoundry/export-go
cd $GOPATH/src/github.com/edgexfoundry/export-go
# To create the Docker images
sudo make docker
# To run the containers
sudo make run_docker
EdgeX Foundry is also available as a snap package, for more details on the snap, including how to install it, please refer to EdgeX snap
EdgeX images are kept on organization's DockerHub page. They can be run in orchestration via official docker-compose.yml.
The simplest way is to do this via prepared script in bin directory:
cd bin
./edgex-docker-launch.sh
During development phase, it is important to run compiled binaries (not containers).
There is a script in bin directory that can help you launch the whole EdgeX system:
cd bin
./edgex-launch.sh
- Chat: https://chat.edgexfoundry.org/home
- Mainling lists: https://lists.edgexfoundry.org/mailman/listinfo