Skip to content

Commit bf3b830

Browse files
Merge pull request #37 from kate-goldenring/udev-directory
Recommend mounting udev `/run/udev` directory
2 parents fb62eda + ee6900e commit bf3b830

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/demos/usb-camera-demo-rpi4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Look at the Configuration and Instances in more detail.
192192

193193
## Going beyond the demo
194194

195-
1. Plug in real cameras! You can [pass environment variables](../development/broker-development.md#Specifying-additional-broker-environment-variables-in-a-Configuration) to the frame server broker to specify the format, resolution width/height, and frames per second of your cameras.
195+
1. Plug in real cameras! You can [pass environment variables](../development/broker-development.md#Specifying-additional-broker-environment-variables-in-a-Configuration) to the frame server broker to specify the format, resolution width/height, and frames per second of your cameras. Note, if not able to discover cameras, mount the udev directory into the discovery handlers by adding `--set udev.discovery.host.udev=/run/udev` to the installation.
196196
2. Apply the [ONVIF Configuration](../discovery-handlers/onvif.md) and make the streaming app display footage from both the local video devices and onvif cameras. To do this, modify the [video streaming yaml](https://github.com/project-akri/akri/blob/main/deployment/samples/akri-video-streaming-app.yaml) as described in the inline comments in order to create a larger service that aggregates the output from both the `udev-camera-svc` service and `onvif-camera-svc` service.
197197
3. Add more nodes to the cluster.
198198
4. Modify the udev rule to find a more specific subset of cameras

docs/demos/usb-camera-demo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ After installing Akri, since the /dev/video1 and /dev/video2 devices are running
258258
259259
## Going beyond the demo
260260
261-
1. Plug in real cameras! You can [pass environment variables](../development/broker-development.md#Specifying-additional-broker-environment-variables-in-a-Configuration) to the frame server broker to specify the format, resolution width/height, and frames per second of your cameras.
261+
1. Plug in real cameras! You can [pass environment variables](../development/broker-development.md#Specifying-additional-broker-environment-variables-in-a-Configuration) to the frame server broker to specify the format, resolution width/height, and frames per second of your cameras. Note, if not able to discover cameras, mount the udev directory into the discovery handlers by adding `--set udev.discovery.host.udev=/run/udev` to the installation.
262262
2. Apply the [ONVIF Configuration](../discovery-handlers/onvif.md) and make the streaming app display footage from both the local video devices and onvif cameras. To do this, modify the [video streaming yaml](https://github.com/project-akri/akri/blob/main/deployment/samples/akri-video-streaming-app.yaml) as described in the inline comments in order to create a larger service that aggregates the output from both the `udev-camera-svc` service and `onvif-camera-svc` service.
263263
3. Add more nodes to the cluster.
264264
4. Modify the udev rule to find a more specific subset of cameras

docs/discovery-handlers/udev.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ All of Akri's components can be deployed by specifying values in its Helm chart
1010

1111
In order for the Agent to discover udev devices, a udev Discovery Handler must exist. Akri supports an Agent image that includes all supported Discovery Handlers. This Agent will be used if `agent.full=true` is set. By default, a slim Agent without any embedded Discovery Handlers is deployed and the required Discovery Handlers can be deployed as DaemonSets. This documentation will use that strategy, deploying udev Discovery Handlers by specifying `udev.discovery.enabled=true` when installing Akri.
1212

13+
> Note: if not able to discover the udev devices, mount the udev directory into the discovery handlers by adding `--set udev.discovery.host.udev=/run/udev` to the installation.
14+
1315
## udev Configuration Settings
1416

1517
Instead of having to assemble your own udev Configuration yaml, we have provided a [Helm template](https://github.com/project-akri/akri/blob/main/deployment/helm/templates/udev-configuration.yaml). Helm allows us to parametrize the commonly modified fields in our configuration files, and we have provided many for udev (to see them, run `helm inspect values akri-helm-charts/akri`). To apply the udev Configuration to your cluster, simply set `udev.configuration.enabled=true` when installing Akri. Be sure to also **specify one or more udev rules** for the Configuration, as explained [below](#discovery-handler-discovery-details-settings).
@@ -164,6 +166,8 @@ helm install akri akri-helm-charts/akri \
164166
--set udev.configuration.discoveryDetails.udevRules[0]='SUBSYSTEM=="sound"\, ATTR{vendor}=="Great Vendor"'
165167
```
166168

169+
> Note: if not able to discover the udev devices, mount the udev directory into the discovery handlers by adding `--set udev.discovery.host.udev=/run/udev` to the installation.
170+
167171
The following installation examples have been given to show how to the udev Configuration can be tailored to you cluster:
168172

169173
* Modifying the udev rule
@@ -185,6 +189,7 @@ helm install akri akri-helm-charts/akri \
185189
--set udev.configuration.discoveryDetails.udevRules[1]='SUBSYSTEM=="sound"\, ATTR{vendor}=="Awesome Vendor"'
186190
```
187191

192+
> Note: if not able to discover the udev devices, mount the udev directory into the discovery handlers by adding `--set udev.discovery.host.udev=/run/udev` to the installation.
188193
Akri will now discover these devices and advertize them to the cluster as resources. Each discovered device is represented as an Akri Instance. To list them, run `kubectl get akrii`. Note `akrii` is a short name for Akri Instance. All the instances will be named in the format `<configuration-name>-<hash>`. You could change the name of the Configuration and resultant Instances to be `sound-device` by adding `--set udev.configuration.name=sound-devices` to your installation command. Now, you can schedule pods that request these Instances as resources, as explained in the [requesting akri resources document](../user-guide/requesting-akri-resources.md).
189194

190195
## Specifying a broker pod image

0 commit comments

Comments
 (0)