Comments (4)
Hello Chris,
If the card gets exposed through udev, you can certainly expose it to pods using Akri, no code change needed. This use case should be covered by Akri as is.
Let us know!
from akri.
Hi @cwoolum! As @jiria mentioned, our udev protocol supports discovering anything on the Linux device file system. You simply have to specify a udev rule that can be used to locate the device[s] in your Configuration. As to making your Akri Configuration, you can either modify our sample udevVideo Configuration or create your own. I'll walk you through both.
We will create a Configuration that will discover all devices in the sound subsytem and deploy an nginx broker pod. Your udev rule will probably be more specific. This rule will discover all devices listed when you run udevadm trigger --verbose --dry-run --type=devices --subsystem-match=sound
- Option 1: Modifying the udevVideo Configuration
Simply run the following on your cluster. Be sure to initialize your cluster for Akri. Steps for this can be found at the beginning of the rpi4 demo.
helm repo add akri-helm-charts https://deislabs.github.io/akri/
helm install akri akri-helm-charts/akri \
--set useLatestContainers=true \
--set udevVideo.enabled=true \
--set udevVideo.udevRules[0]='SUBSYSTEM=="sound"' \
--set udevVideo.brokerPod.image.repository='nginx'
You will see nginx brokers deployed to every discovered sound device.
- Option 2: Create a Configuration
It's easier to work off an existing Configuration, so download the udevVideo one by running:
helm template akri akri-helm-charts/akri \
--set useLatestContainers=true \
--set udevVideo.enabled=true \
--set controller.enabled=false \
--set agent.enabled=false > udevAudio.yaml
Open the yaml and remove all RBAC content (everything above line 79).
Feel free to change Configuration name:
metadata:
name: my-udev-audio
Change the udev rule to fit your needs:
udev:
udevRules:
- SUBSYSTEM=="sound"
Change brokerPodSpec
. Make the broker pod container point to your broker -- nginx in this example. Delete all the environment variables, which were specific to the sample udevVideo broker.
brokerPodSpec:
containers:
- name: my-broker
image: "nginx:latest"
imagePullPolicy: Always
securityContext:
privileged: true
resources:
limits:
"{{PLACEHOLDER}}" : "1"
Now, install Akri (the controller, agent, and CRDs):
helm repo add akri-helm-charts https://deislabs.github.io/akri/
helm install akri akri-helm-charts/akri \
--set useLatestContainers=true
Finally, apply your new udevAudio Configuration with kubectl apply -f udevAudio.yaml
You will see nginx brokers deployed to every discovered sound device.
Run microk8s kubectl get akric
and you will see my-udev-audio
. Delete the configuration and see the Controller automatically bring down the brokers by running kubectl delete akric my-udev-audio
Let me know if you have any questions or run into any problems.
from akri.
@cwoolum, we have updated our provided Configuration helm templates to be more generic rather than specific to one scenario, usb cameras for udev. Thank you for pointing out this needed change! We have provided documentation on how to customize that generic udev configuration, say to discover on-device audio. I am closing this, but feel free to re-open it if you have any other questions or feel like the documentation could be expanded upon.
from akri.
Thanks for the detailed response and the update to the docs! I can't wait to jump into this when I get a chance!
from akri.
Related Issues (20)
- udev-video-broker gets OOM error in microk8s HOT 2
- Remove dependency on outdated cross images HOT 6
- Akri discovery handler unable to detect ip camera HOT 5
- Controller pod restarts when instance watcher restarts HOT 1
- Transport error when Agent calls gRPC discover() to some Discovery Handlers
- Use rust-based coverage tools rather than tarpaulin HOT 1
- LoRaWAN Support HOT 7
- OPC-UA Instance ID: ApplicationName is not the best choice ? HOT 1
- Pods with unready Containers exist on this node, we can't clean the slots yet HOT 5
- containerd.socket mounting inside container - security concern / best practice deviation? HOT 5
- agent-registration.sock and udev.sock socket files world readable HOT 2
- Multiple configuration doesnt work -- helm install fails on rbac.enabled=false HOT 1
- RUSTSEC-2024-0003: Resource exhaustion vulnerability in h2 may lead to Denial of Service (DoS) HOT 1
- Put Akri on Adoption List of Related Projects HOT 3
- Switch from Prometheus to Open Telemetry for metric HOT 2
- Need to restart Configuration validating webhook when certificates are rotated HOT 2
- Discovery Handlers should generate universal device ID HOT 2
- Use cert-manager to manage webhook certs HOT 1
- RUSTSEC-2024-0320: yaml-rust is unmaintained. HOT 1
- (Define and) use Akri-specific Secret types HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akri.