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 use Bundle Generator, start by launching the Fedora-based VM provided in the BundleGen repo here: https://github.com/rdkcentral/BundleGen/blob/master/Vagrantfile. If you are not sure how to work with Vagrant, see below:
Expand | ||
---|---|---|
| ||
Start by installing Vagrant on your host machine by downloading the relevant version for your OS here: https://www.vagrantup.com/downloads. You must also have VirtualBox installed on your system. Vagrant works with all versions of VirtualBox > 4.0. Download and install the relevant VirtualBox binary from here: https://www.virtualbox.org/wiki/Downloads. To get the virtual machine ready for use, run the following:
When VM is running (after "vagrant up") you can use more than one active session of "vagrant ssh" if needed. In Vagrant there is default mount directory: hosts directory where "Vagrantfile" is stored will be bind-mounted into "/vagrant" inside VM. This can be used to moving files in/out of the VM. So any new file created/moved to Vagrantfile directory should be visible in "/vagrant" and other way around. The files don't always show up instantly. You may need to use "vagrant halt" and "vagrant up" to restart the VM. The files should then be visible in "/vagrant". Known bug: For some reason sometimes in Fedora VM this default bind-mount doesn't work as it should. If that happens and you cannot move files in/out of VM you can use vagrant scp (https://github.com/invernizzi/vagrant-scp) instead. |
Now you can create bundle from images by doing: bundlegen generate --platform <platform-name> --appmetadata <path-to-app-metadata> <img-url> <output-dir>
Note the image URL should be in the form `docker://image-url`. If the image is on the Docker Hub, the full URL can be omitted - e.g `docker://hello-world`.
For more information and documentation on BundleGen, see the repo's readme file here: https://github.com/rdkcentral/BundleGen/blob/master/README.md and the documentation directory: https://github.com/rdkcentral/BundleGen/tree/master/docs