Add application RPMs to a blueprint
To add application RPMs to a blueprint on MicroShift, you must create a local repository that image builder can use to create the ISO. With this procedure, the required container images for your workload can be pulled over the network.
-
You have root access to the host.
-
Workload or application RPMs exist in the
~/rpmbuild/RPMSdirectory.
-
Create a local RPM repository by running the following command:
$ createrepo ~/rpmbuild/RPMS/ -
Give image builder access to the RPM repository by running the following command:
$ sudo chmod a+rx ~You must ensure that image builder has all of the necessary permissions to access all of the files needed for image building, or the build cannot proceed.
-
Create the blueprint file,
repo-local-rpmbuild.tomlusing the following template:id = "local-rpm-build" name = "RPMs build locally" type = "yum-baseurl" url = "file://<path>/rpmbuild/RPMS" check_gpg = false check_ssl = false system = falseReplace
<path>with the path to create a location that you choose. This path is used in later commands in this procedure to set up the repository and copy the RPMs. -
Add the repository as a source for image builder by running the following command:
$ sudo composer-cli sources add repo-local-rpmbuild.toml -
Add the RPM to your blueprint, by adding the following lines:
… [[packages]] name = "<application_workload_manifests>" version = "*" …Replace
<application_workload_manifests>with the name of your workload. -
Push the updated blueprint to image builder by running the following command:
$ sudo composer-cli blueprints push repo-local-rpmbuild.toml -
At this point, you can either run image builder to create the ISO, or embed the container images for offline use.
-
To create the ISO, start image builder by running the following command:
$ sudo composer-cli compose start-ostree repo-local-rpmbuild edge-commitIn this scenario, the container images are pulled over the network by the edge device during startup.
-