RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This page documents the prototype BundleGenerator (BundleGen) demo that allows an OCI image to be downloaded from a registry and converted to an OCI bundle*, applying rules based on a platform and app configuration.
The source code for BundleGen can be found on Consult Red's GitLab here: https://redgitlab.redembedded.com:8443/rdk-sig-dac/bundlegen
This shows the Docker "Hello World" image (https://hub.docker.com/_/hello-world) being pulled from the Docker registry and run on both an Ubuntu 16 VM and then an Xi6 STB. The Hello World image is a multi-architecture image, allowing bundlegen to select the correct architecture (amd64 or armv7) based on the platform configuration.
This shows LGI's Wayland-EGL-Test app (https://github.com/stagingrdkm/lgpub/tree/master/dac/apps) running on an Xi6 STB. It also shows how BundleGen refuses to create a bundle for the Vagrant VM since the VM does not have graphics output so the app cannot run on the VM.
TODO:: Add steps to reproduce demo
As shown in the videos, one of the inputs to bundlegen is a JSON file defining the configuration of the platform that will run the device.
This configuration file requires comments/feedback to ensure it covers all use cases. The idea is this config could be mostly automatically generated by a tool either run on the STB or by Bitbake, with only minor sections needing to be filled in by hand. An operator would maintain a platform configuration per-device, with the ability to create a generic "operator.json" file that would allow options to be set for all operator devices (which could be overridden by individual platforms as required).
TODO:: Add example...
One other input is app metadata. This currently is a standalone JSON file, with similar fields to those defined in the MAS, but with a bit more technical information (including bind mounts, storage configuration and network configuration). The goal would be for this to be generated by the SDK tooling, and embedded inside the OCI Image either by extending the image config or including it as a separate layer that can be read by BundleGen.
This metadata would sit alongside the MAS metadata, as this info is more low-level and not required to be known by an app-store service.
TODO:: Add example...
The current demo does not currently match all the libraries in the bundle with those on the STB, although this functionality is planned. This will reduce the final size of the bundle significantly.
The generated bundle is based off a combination of the bundles in use by Sky in production and the latest base config from OCI. This should be reviewed to add any necessary restrictions such as cgroup restrictions, resource limits and mounts.