EdgeX Explorations Tiejun Chen Huaqiao Zhang VMware
EdgeX Explorations Tiejun Chen Huaqiao Zhang VMware
EdgeX Explorations Tiejun Chen Huaqiao Zhang VMware
@Tiejun_Chen @Huaqiao_Zhang
Agenda
• EdgeX Foundry introduction
• EdgeX Foundry practices and explorations
– EdgeX Foundry solution
• Preempt-RT Linux over minimal Linux distribution
• Standard | Preempt-RT Linuxkit
• HW-assisted Virtualization solution
• Todo
– EdgeX Foundry Web UI
• Demo
• Todo
• Liota & EdgeX Foundry
EdgeX Foundry Overview
• An open source, vendor neutral project (and ecosystem)
• A microservice, loosely coupled software framework for
IoT edge computing
• Hardware and OS agnostic
• Goal: enable and encourage growth in IoT solutions
– The community builds and maintains common building blocks and
APIs
– Plenty of room for adding value and getting a return on investment
– Allowing best-of-breed solutions
EdgeX Micro Service Architecture
• Contextually, EdgeX micro services are divided into 4 layers
• Device Services (device services for various protocols like Modbus, BACnet, …
and SDK to create new device services)
– Communicate in native sensor/device protocol to the physical – that is to the IoT
“things”
– Transform sensor data to common format
– Translate command requests to actuate devices (in native protocol/format)
• Core Services (core data, metadata, command & configuration/registration)
– Offers temporary persistence of edge data and facilitates actuation of things
through common API
– Collect sensor data
– Understand what sensors/devices are connected how to communicate with them
(metadata)
– Provision facility for new sensors/devices (and device services)
– Manage device actuation requests to device services/devices
– Provide micro service registry
– Provide micro service configuration
• Supporting Services (logging, notifications, scheduler, rules engine)
– Normal software application duties plus “edge intelligence”
– Logging
– Notifications and alerting
– Scheduling and clean up
– Rules engine
• Export Services (client, distribution)
– On or off box client registration of data
– Distribution center of sensor data to clients
– Transport edge data to the enterprise and cloud systems in a manner they request
EdgeX Foundry Practice and Exploration
• IoT devices
– Resource-constrained
– Real time requirement
• Practice and Exploration
– Using minimal Linux distributions
– Integrating preemp-rt Linux kernel patches
EdgeX Foundry Practice and Exploration
• Linuxkit-EdgeX.yml
kernel:
image: linuxkit/kernel:4.14.62 or 4.14.59-rt
cmdline: "console=tty0"
init:
…
onboot:
…
services:
…
- name: compose
image: tiejunworld/edgex-compose:0.1
binds:
- /var/run:/var/run
- /etc/compose:/compose
rootfsPropagation: shared
capabilities:
- CAP_SYS_ADMIN
files:
- path: var/lib/docker
directory: true
- path: etc/docker/daemon.json
contents: '{"debug": true, "hosts": ["unix:///var/run/docker.sock"]}'
mode: "0644"
EdgeX Foundry Practice and Exploration
• Linuxkit-EdgeX.yml
…
- path: etc/compose/docker-compose-barcelona-0.2.1.yml
source: docker-compose-barcelona-0.2.1.yml
- path: etc/compose/images/edgexfoundry/docker-core-command:0.2.1.tar
source: image-cache/edgexfoundry/docker-core-command:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-core-config-seed:0.2.1.tar
source: image-cache/edgexfoundry/docker-core-config-seed:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-core-data:0.2.1.tar
source: image-cache/edgexfoundry/docker-core-data:0.2.1.tar
…
- path: etc/compose/images/edgexfoundry/docker-edgex-volume:0.2.tar
source: image-cache/edgexfoundry/docker-edgex-volume:0.2.tar
- path: etc/compose/images/edgexfoundry/docker-export-client:0.2.1.tar
source: image-cache/edgexfoundry/docker-export-client:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-export-distro:0.2.1.tar
source: image-cache/edgexfoundry/docker-export-distro:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-support-logging:0.2.1.tar
source: image-cache/edgexfoundry/docker-support-logging:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-support-notifications:0.2.tar
source: image-cache/edgexfoundry/docker-support-notifications:0.2.tar
- path: etc/compose/images/edgexfoundry/docker-support-rulesengine:0.2.1.tar
source: image-cache/edgexfoundry/docker-support-rulesengine:0.2.1.tar
- path: etc/compose/images/edgexfoundry/docker-support-scheduler:0.2.1.tar
source: image-cache/edgexfoundry/docker-support-scheduler:0.2.1.tar
EdgeX Foundry Practice and Exploration
Autosar
RTOS AGL GENIVI Android
OS
Hypervisor
CPU GPU/FPGA Memory Devices
Bosch
Hypervisor
Hardware platform
EdgeX Foundry Practice and Exploration
Hypervisor
Hardware platform
EdgeX Foundry Practice and Exploration
Hypervisor
Hardware platform
Todo 1/4
• EdgeX Foundry into virtualized IoT system
– Protect data
• EdgeX Foundry with AMP
• EdgeXFaas (Ongoing)
• Integrate Edgex Foundry ROS (Ongoing)
– Who takes control of devices
Todo 2/4
• EdgeX Foundry into virtualized IoT system
– Keep data private
EdgeX GOS
edgex-export-services Guest OS Guest OS
edgex-core-services
edgex-device-service
Hypervisor
Hardware platform
Todo 3/4
• EdgeX Foundry with AMP
– Minimal Linuxkit including EdgeX
edgex-supporting-services
edgex-core-services IoT OS
edgex-device-service
Hardware platform
Core
Core A
A Core
Core B
B
Todo 4/4
• EdgexFaas
– EdgeX with Function As A Service
EdgeX GOS
Event
Event engine
engine || API
API Gateway
Gateway
edgex-supporting-services Preempt-rt GOS
Unikernel
container container
edgex-device-services
Hypervisor
Hardware platform
EdgeX Foundry UI
• Motivation
– What if we have no web console?
• Master all kinds of knowledge like docker, yml, profiles, services, …
• Complexity
– Too much operation steps
– Different data structure
– But what if we have a web UI console specific to EdgeX
Foundry?
• Using EdgeX Foundry naturally
• Debugging Edgex Foundry easily
EdgeX Foundry UI Landscape
EdgeX Foundry UI framework
EdgeX Foundry UI workflow
Data
A: EdgeX
Foundry
Services
B: EdgeX
One Single User Select One Access Other Dynamic
User Login Foundry
Console Given Gateway Page Proxy
Services
C: EdgeX
Foundry
Store Gateway Services
Metadata Get Gateway Instance IP Selected
By The Current User
EdgeX Foundry UI Demo
EdgeX Foundry UI
https://www.youtube.com/watch?v=2EOHR_gUeic
Enable Modbus/RS485
https://www.youtube.com/watch?v=_2AHiUcMzew&t=399s
EdgeX Foundry UI Todo
• Already merged into
https://github.com/edgexfoundry-holding/edgex-ui-go
• Next
– Start/Stop/Update EdgeX Microservice
– Support log | notification | dashboard
– Integrate map service
I love everything
[email protected]
EdgeX Foundry Summary
• A collection of a dozen+ microservices
–Written in multiple languages (Java, Go, C, … we are polyglot
believers!!)
–Several commonly used library projects (common domain objects,
client libraries, etc.)
• Microservices are deployed via Docker and Docker
Compose
• REST communications between the service
–Some services exchange data via message bus (core data to export
services and rules engine)
• EdgeX data flow:
–It can trigger device actuation through Command service
–Sensor data is collected by a Device Service from a thing
–Data is passed to the Core Services for local persistence
–Data is then passed to Export Services for transformation, formatting,
filtering and can then be sent “north” to enterprise/cloud systems
–Data is then available for edge analysis and can trigger device
actuation through Command service