RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Obtain the OCI Image using Skopeo (open-source tool by RedHat)
Unpack the OCI image with Umoci (open-source tool by OCI)
Validate App is compatible
Modify the OCI config based on the platform template. This includes but is not limited to:
Environment Variables
Mounts for sockets, libraries
Device whitelisting
User and groups
RDK plugins (networking, loopback mounts, logging)
To create a bundle that is compatible for an application, BundleGen requires a small amount of metadata about the application. This can be thought of as similar to a manifest in Android apps. The app metadata can include information about storage and memory requirements, whether the app needs graphics support and network access such as port forwarding.
The app metadata is a JSON file, an example of which is below:
Code Block | ||
---|---|---|
| ||
{
"id": "com.rdk.wayland-egl-test",
"type": "application/vnd.rdk-app.dac.native",
"version": "1.0.0",
"description": "Simple wayland egl demo, showing green rectangle",
"priority": "optional",
"graphics": true,
"network": {
"type": "open"
},
"storage": {},
"resources": {
"ram": "128M"
},
"features": [],
"mounts": []
} |
The full syntax can be found here: https://github.com/rdkcentral/BundleGen/blob/master/docs/AppMetadata.md
The example images built by the SDK contain metadata files which are the embedded inside the OCI image for BundleGen to use: https://github.com/stagingrdkm/meta-dac-sdk/tree/master/recipes-example/images/metadatas
If using images from the Docker hub or other OCI registry that were not generated by the DAC SDK, then you will need to manually write a metadata file for the app and provide the file to BundleGen in the generate command via the optional --appmetadata argument.
Before you can use BundleGen, you must create an OCI image containing your application using the SDK and upload it to an OCI registry such as the Docker Hub. Once that is complete, follow the below instructions to use BundleGen.
...
Now you can create bundle from images by doinggenerated by the SDK by running the generate commad: bundlegen generate --platform <platform-name> --appmetadata <path-to-app-metadata> <img-url> <output-dir>. Example:
Code Block |
---|
$ bundlegen generate --platform rpi3 --appmetadata my-app.json docker://my-app ~/outputdirectory |
...