RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
The job of the BundleGenerator is to produce from a SoC-agnostic oci Application Container Image a so called "bundle" or also refered to as "bundle-image". This bundle-image contains those same Application binaries (*) but now also a container run config (see dobby / oci runtime-spec config).
That container run config contains a part which will be generic, same across all STB platforms (eg same security config/policy) but also contains a part that is STB platform specific part because it needs to mount bind SoC specific Gfx libs in that container.
Result is a run config and bundle that is specific for a STB platform. Moreover depending on what is inside the firmware image & version of the STB platform it might be compatible or not. (eg RDK6 vs RDK5)
To indicate the compatibility of a bundle with set or series of firmware versions a "dacBundleFirmwareCompatibilityKey" string is introduced and will be further explained below. End result is a bundle that is compatible with series of firmware versions for a specific STB platform.
In order to generate bundles of all applications for the various platforms we need to provide the bundlegenerator Cloud Component with set of STB template files, 2 files delivered as one .tgz, here after referred to as stbBundleTemplate.tgz, that are specific for those STB platforms and guaranteed to work on specific set/series of its firmware versions.
These template files need to be delivered by CPE team to DAC cloud team in certain format/location and have specific naming convention in order for bundle generator to associate and generate bundles for the right STB platformName with a compatible firmware version set.
The sections below will describe what is inside this stbBundleTemplate.tgz and what is the naming convention of it.
Before going there it is good to understand what bundle generator expects as input parameters and provides as output.
Below if concrete format of a JIT-BG RabbitMQ message towards bundlegenerator to generate a bundle (taken from description in JIT-BG Interactions#6)JIT-BGtoBundleGenviaRabbitMQ and code https://bitbucket.upc.biz/projects/SPARK/repos/bundle-generator-service/browse/service/config_dev.json )
(*) = same Application Binaries : Depending on how you configure the bundlegenerator it could also remove some binaries (and replace them with bind mounts from associated files on rootfs) to optimize size but this has big disadvantage that you will introduce much stricter dependencies of the bundles on specific firmware version, move away from self-sufficient & portabilty goal and in practice lose your independence of STB host rootfs/firmware version, need to recheck apps upon each firmware upgrade, we will not do that, is against scaling of binary compatible DAC & Appstore.
The CPE team is responsible for generating the stbBundleTemplate.tgz for the relevant platforms and naming them correctly according to naming convention explained in this section
And CPE team must deliver the stbBundleTemplate.tgz to DAC cloud and based on the naming convention the Cloud bundle generation service will associate the incoming bundle generation request with the right associated stbBundleTemplate.tgz to create the right bundle
stbBundleTemplate.tgz contains 2 files inside which are described in the following subsection
The naming convention of the stbBundleTemplate.tgz is {platformName}-{dacBundleFirmwareCompatibilityKey}_dac_configs.tgz
see this naming convention, mapping and concrete example in code block below
The naming pattern is ├── {platformName}-{dacBundleFirmwareCompatibilityKey}_dac_configs.tgz │ ├── {platformName}.json │ └── {platformName}_libs.json During the DAC cloud development we did not define in {dacBundleFirmwareCompatibilityKey} yet, there you will see it as {firmwareVersion} in their documentation/configs but they mean the same, so value will be same. ├── {platformName}-{firmwareVersion}_dac_configs.tgz │ ├── {platformName}.json │ └── {platformName}_libs.json Concrete examples ├── 2008C-STB_0.1.1-38e90b375c587cd2a378f7c04e1016f9b33ad2f3-dbg_dac_configs.tgz │ ├── 2008C-STB.json │ └── 2008C-STB_libs.json ├── VIP7002W_0.1.1-53c2928ebfa3011a18f572e2d8e7a56e03cbed02-dbg_dac_configs.tgz │ ├── VIP7002W.json │ └── VIP7002W_libs.json
Below you can find the definition and further naming convention of {platformName} and {dacBundleFirmwareCompatibilityKey}
Since bundles are CPE model/platform specific we need to define the names of these models/platforms in DAC cloud platform/ASMS and use the appropriate platformName when we want to get such bundle.
The platformNames for the VA are in file names of templates.tgz, see are https://github.com/stagingrdkm/lgpub/tree/master/dac/templates/oe_3.1
The platformName of DAC cloud does not necessary correspond one to one to RDK model name in the firmware of particular model. Hence you might need to use mapping table. we created such mapping table in config of thunder lisa service
The STB can based on this config, retrieve platformName to be used towards DAC cloud by retrieving the "dacBundlePlatformNameOverride" value from LISA#lisa.dac.confg
To indicate the compatibility of a bundle with set or series of firmware versions of a given platform a dacBundleFirmwareCompatibilityKey key/value is introduced.
When requesting to generate or download a bundle this identifier must be provided as input parameter in order to generate or return the right bundle.
The value is a concatenation of 3 strings, defined here below as "stringA-stringB-stringC" with
concatenated the above examples results in value of dacPlatformFWCompatibleBundleVersion = "0.1.0-406e1982d1a9ce6359e5a11bb08502b63d51ae47-dbg"
The STB can retrieve the "dacBundleFirmwareCompatibilityKey" configured in its firmware version from LISA. See use getMetadata {"type":"application/LISA", "id":"lisa.dac.confg", "version":"0"} in LISA#lisa.dac.confg
Generation of this dacPlatformFWCompatibleBundleVersion is being done manually by CPE team using hash script https://github.com/stagingrdkm/lgpriv/blob/1deb05c8a5a1c3d3e78a00f8fc47f8e2844b8cf8/lg_platform_templates/oe_3.1/calc_hashes.sh on stbDacContainerConfig and stbDacLibs files, latter file is generated together the firmware image creation.
CPE team needs to then create associated stbBundleTemplate.tgz ( {platformName}-{dacBundleFirmwareCompatibilityKey}_dac_configs.tgz ) and distributed to DAC cloud team for them to add to bundlegenerator service. For now this creation and distribution is manual job by CPE team for each platform. Later on we can look at automating this with jenkins.
ResidentApp/STB can retrieve the "dacBundleFirmwareCompatibilityKey" configured in its firmware version using LISA API getMetadata {"type":"application/LISA", "id":"lisa.dac.confg", "version":"0"} see info in LISA#lisa.dac.confg
(on condition it is configured in LISA as part of its LISA thunder config).
At the moment (in this startup phase) the templates are stored in https://github.com/stagingrdkm/lgpub/tree/master/dac/templates
( in future we might move to other git location, stagingrdkm is not ideal long term place for this)