https://github.com/superedge/orin-device-system
A framework to manage devices of edge nodes
https://github.com/superedge/orin-device-system
Last synced: 2 months ago
JSON representation
A framework to manage devices of edge nodes
- Host: GitHub
- URL: https://github.com/superedge/orin-device-system
- Owner: superedge
- License: other
- Created: 2023-05-09T09:48:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-10T08:45:54.000Z (about 2 years ago)
- Last Synced: 2025-01-15T15:16:02.037Z (4 months ago)
- Language: Go
- Size: 138 KB
- Stars: 1
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Orin Device System
## About Project
The Orin system-level chip is the latest generation of automotive autonomous driving intelligent chips released by NVIDIA in 2019. Typically, for common scenarios, devices like Orin can be integrated into a Kubernetes cluster using the device-plugin mechanism, providing edge computing power support for workloads. However, when multiple Orin SoC chips are located on the same block board and a node contains multiple Orin boards, users often need to request multiple Orin SoCs on the same board for performance and bandwidth requirements. In such cases, the custom resource packing and topology scheduling device-plugin cannot handle it effectively.
The Orin Device System achieves two-level scheduling for Orin SoCs based on container packing scheduling (default scheduling algorithm) through the extension scheduler and device-plugin, enabling coordination between the cloud and edge. The first level involves selecting the node, and the second level involves selecting the board on the node. Additionally, the scheduling results are injected into the Pods through the device-plugin, allowing the Pods to utilize Orin SoCs on the same board. This enables the capability of using Orin SoCs on the same board for the Pods.
## Architecture
## Prerequisites
- Kubernetes v1.22+
- golang 1.17+
- docker or containerd## Build Image
Run `make scheduler.image.build VERSION=` make to build orin-device-scheduler image
Run `make device.image.build VERSION=` make to build orin-device-plugin image## Getting Started
### Deploy Orin Device Plugin
```
$ kubectl apply -f deploy/orin-device-plugin.yaml
```
For more information , please refer to [Orin Device System](https://github.com/superedge/orin-device-system).### Deploy Orin Device Scheduler
```
$ kubectl apply -f deploy/orin-device-scheduler.yaml
```### Enable Kubernetes scheduler extender
**Below Kubernetes v1.23**
Add the following configuration to `extenders` section in the `--policy-config-file` file (`` is the cluster IP of `orin-device-scheduler service`, which can be found by `kubectl get svc orin-device-scheduler -n kube-system -o jsonpath='{.spec.clusterIP}' `).
```
{
"urlPrefix": "http://:80/scheduler",
"filterVerb": "predicates",
"prioritizeVerb": "priorities",
"bindVerb": "bind",
"weight": 1,
"enableHttps": false,
"nodeCacheCapable": true,
"managedResources": [
{
"name": "superedge.io/device-board"
},
]
}
```You can set a scheduling policy by running `kube-scheduler --policy-config-file ` or `kube-scheduler --policy-configmap `. Here is a [scheduler policy config sample](https://github.com/kubernetes/examples/blob/master/staging/scheduler-policy/scheduler-policy-config.json).
**From Kubernetes v1.23**
Because of `--policy-config-file` flag for the kube-scheduler is not supported anymore. You can use `--config=/etc/kubernetes/scheduler-policy-config.yaml` and create a file `scheduler-policy-config.yaml` compliant to KubeSchedulerConfiguration requirements.
```
apiVersion: kubescheduler.config.k8s.io/v1beta2
kind: KubeSchedulerConfiguration
clientConnection:
kubeconfig: /etc/kubernetes/scheduler.conf
extenders:
- urlPrefix: "http://:80/scheduler"
filterVerb: predicates
prioritizeVerb: priorities
bindVerb: bind
weight: 1
enableHTTPS: false
nodeCacheCapable: true
managedResources:
- name: superedge.io/device-board
```### Create pod using orin device
```
cat <