RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Table of Contents |
---|
Dobby is a management layer above the open-source crun OCI containerization tool, used for managing and running containers.
Dobby is a container management tool, originally developed by Sky and open-sourced to the RDK community. Dobby is a daemon-based program that makes use of the crun runtime and provides a more user-friendly experience for starting/stopping containers, handles container lifecycle management and enhancing the base functionality provided by crun.
...
draw.io Diagram | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The core component of Dobby is the DobbyDaemon. This should be started at STB boot and then listens over dbus for commands. The full dbus API of Dobby can be found here: https://github.com/rdkcentral/Dobby/blob/master/protocol/include/DobbyProtocol.h, although it is not recommended to communicate with Dobby manually over dbus. Instead, Dobby provides abstractions over dbus which are discussed later in this document.
Dobby ships with a systemd unit file called dobby.service, which allows Dobby to be started/stopped by systemd.
For debug builds of Dobby, the DobbyTool binary is installed on the STB. This is a simple command line app that communicates with Dobby directly over dbus to issue common commands. This is very useful for troubleshooting and testing Dobby.
Example:
Code Block | ||
---|---|---|
| ||
# Extract OCI bundle to STB $ tar -xzvf my_app_bundle.tar.gz # Start container $ DobbyTool start my_app ./my_app_bundle/ |
To control Dobby using a JSON-RPC API, then use the OCIContainer Thunder NanoService. This exposes the same functionality as DobbyTool, but in a manner more suited for integration into other code in RDK-V.
On platforms where Thunder is not available, the raw dbus interface can be used instead - OCIContainers only serves as an abstraction over dbus so other components that already communicate with JSON-RPC can easily control Dobby.
Example of OCIContainer to start a container from an OCI bundle:
...
The OCIContainer code contains a README.md file with detailed documentation on its usage - see here: https://github.com/rdkcentral/rdkservices/blob/sprint/2009/OCIContainer/README.md
Thunder includes the ability to run plugins in containers as well as the traditional in/out of process modes. Thunder offers different back-ends for running Thunder plugins in containers, one of which is Dobby. This mode will communicate with Dobby to start/stop Thunder plugins inside Dobby containers. This provides the advantage of meaning Dobby is responsible for running all types of container on the STB, from native apps to Thunder plugins.
...
Then for the plugin(s) you wish to run in a container, set the execution mode to "container" in the plugin configuration file.
Dobby source code lives on the RDKCentral GitHub here: https://github.com/rdkcentral/Dobby and is Apache 2.0 licenced.
...