IMPORTANT: yurt-device-controller has been merged into the openyurt repo, so project is no longer being actively maintained and has been archived.
This project has been archived and is no longer being actively maintained. This means you can view and copy the code, but cannot make changes or propose pull requests.
While you're here, feel free to review the code and learn from it. If you wish to use the code or revive the project, you can fork it to your own GitHub account.
This repository contains three CRD/controllers, Device, DeviceService and DeviceProfile:
-
The
DeviceProfile
defines a type of devices using same kind of protocol, which includes some generic information like the manufacturer's name, the device description, and the device model. DeviceProfile also defines what kind of resources (e.g., temperature, humidity) this type of device provided and how to read/write these resources. -
The
DeviceService
defines the way of how to connect a device to the OpenYurt, like the URL of the device. TheDeviceService
can not exist alone. EveryDeviceService
must associate with aDeviceProfile
. -
The
Device
is used to refer to a sensor, actuator, or IoT "thing", it gives the detailed definition of a specific device, like whichDeviceProfile
it belongs to and whichDeviceService
it used to connect to the system.
For details of the design, please see the document.
Yurt-device-controller introduces an approach leverages existing edge computing platforms, like EdgeX Foundry, and uses Kubernetes custom resources to abstract edge devices. Inspiring by the Unix philosophy, "Do one thing and do it well", we believe that Kubernetes should focus on managing computing resources while edge devices management can be done by adopting existing edge computing platforms. Therefore, we define several generic custom resource definitions(CRD) that act as the mediator between OpenYurt and the edge platform. Any existing edge platforms can be integrated into the OpenYurt by implementing custom controllers for these CRDs. These CRDS and corresponding controllers allow users to manage edge devices in a declarative way, which provides users with a Kubernetes-native experience and reduces the complexity of managing, operating and maintaining edge platform devices.
The major Yurt-Device-Controller components consist of:
- Device controller: It can abstract device objects in the edge platform into device CRs and synchronize them to the cloud. With the support of device controller, users can influence the actual device on the edge platform through the operation of cloud device CR, such as creating a device, deleting a device, updating device attributes (such as setting the light on and off, etc.).
- DeviceService controller: It can abstract deviceService objects in the edge platform into deviceService CRs and synchronize them to the cloud. With the support of deviceService Controller, users can view deviceService information of edge platforms in the cloud, and create or delete deviceService CRs to affect the actual deviceService of edge platforms.
- DeviceProfile controller: It can abstract deviceProfile objects in the edge platform into deviceProfile CRs and synchronize them to the cloud. With the support of deviceProfile Controller, users can view deviceProfile information of edge platforms in the cloud, and create or delete deviceProfile CRs to affect the actual deviceService of edge platforms.
To use the yurt-device-controller, you need to deploy the OpenYurt cluster in advance and meet the following two conditions:
- Deploy the yurt-app-manager, the details of yurt-app-manager are in here ;
- Deploy an Edgex Foundry instance in a NodePool by using yurt-edgex-manager, the details of yurt-edgex-manager are in here .
For a complete example, please check out the tutorial
Contributions are welcome, whether by creating new issues or pull requests. See our contributing document to get started.
- Mailing List: openyurt@googlegroups.com
- Slack: channel
- Dingtalk Group (钉钉讨论群)
Yurt-device-controller is under the Apache 2.0 license. See the LICENSE file for details. Certain implementations in Yurt-device-controller rely on the existing code from Kubernetes and OpenKruise the credits go to the original authors.