edgexfoundry / edgexfoundry/device-usb-camera

Allow control of the dockerized RTSP server

Open
#48 5 comments 0 reactions 0 assignees View on GitHub
1-low enhancement help wanted
Dominant language
Go
Stars
13
Forks
30
PR merge metrics
No merged PRs in 30d

Description

# 🚀 Feature Request

### Relevant Package [**REQUIRED**]
Device USB Camera and RTSP Server

### Description [**REQUIRED**]
The Dockerfile uses `aler9/rtsp-simple-server` as a base:
https://github.com/edgexfoundry/device-usb-camera/blob/0d2f133a70ca139fe5a25e6e35809f1e9812dab5/Dockerfile#L36

And runs the process before starting the camera service:
https://github.com/edgexfoundry/device-usb-camera/blob/0d2f133a70ca139fe5a25e6e35809f1e9812dab5/docker-entrypoint.sh#L3-L7

At the same time, the device service allows configuration of the RTSP server:
https://github.com/edgexfoundry/device-usb-camera/blob/0d2f133a70ca139fe5a25e6e35809f1e9812dab5/cmd/res/configuration.toml#L108-L110

I'm not convinced that adding an RTSP server inside the same docker container is a good idea. Note that rtsp-simple-server is already dockerized and easily deployable as standalone: https://hub.docker.com/r/aler9/rtsp-simple-server

There are a few issues:
- The USB Camera service config allows using an external server, but does not allow disabling the internal one. The 9-10MB for the executable gets pulled in regardless.
- It is unclear how someone can configure and secure the internal RTSP server. Does the [upstream documentation](https://github.com/aler9/rtsp-simple-server#table-of-contents) apply to the Device USB service container too? Our README doesn't make that clear.
- Embedding the rtsp-simple-server adds maintenance burden to EdgeX. I don't think this dependency was approved by the TSC. It's been a few weeks and we are already a few versions behind.

### Describe the solution you'd like
The control of the RTSP server process can be made possible for example by reading an env var in docker-entrypoint.sh to decide if the process should run.

If the RTSP server wasn't embedded, I could easily deploy the project's [container](https://hub.docker.com/r/aler9/rtsp-simple-server) together with the Device Usb Camera service container.

### Describe alternatives you've considered

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.