1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/microshift-adding-repos-to-image-builder.adoc
2023-12-11 15:06:48 +00:00

81 lines
2.1 KiB
Plaintext

// Module included in the following assemblies:
//
// * microshift/microshift-embed-into-rpm-ostree.adoc
// * microshift/microshift-update-rpms-ostree.adoc
:_mod-docs-content-type: PROCEDURE
[id="adding-microshift-repos-image-builder_{context}"]
= Adding {microshift-short} repositories to Image Builder
Use the following procedure to add the {microshift-short} repositories to Image Builder on your build host.
.Prerequisites
* Your build host meets the Image Builder system requirements.
* You have installed and set up Image Builder and the `composer-cli` tool.
* You have root-user access to your build host.
.Procedure
. Create an Image Builder configuration file for adding the `{rpm-repo-version}` RPM repository source required to pull {microshift-short} RPMs by running the following command:
+
[source,text,subs="attributes+"]
----
cat > {rpm-repo-version}.toml <<EOF
id = "{rpm-repo-version}"
name = "Red Hat OpenShift Container Platform {ocp-version} for RHEL {op-system-version-major}"
type = "yum-baseurl"
url = "https://cdn.redhat.com/content/dist/layered/rhel9/$(uname -m)/rhocp/{ocp-version}/os"
check_gpg = true
check_ssl = true
system = false
rhsm = true
EOF
----
. Create an Image Builder configuration file for adding the `fast-datapath` RPM repository by running the following command:
+
[source,text,subs="attributes+"]
----
cat > fast-datapath.toml <<EOF
id = "fast-datapath"
name = "Fast Datapath for RHEL 9"
type = "yum-baseurl"
url = "https://cdn.redhat.com/content/dist/layered/rhel9/$(uname -m)/fast-datapath/os"
check_gpg = true
check_ssl = true
system = false
rhsm = true
EOF
----
. Add the sources to the Image Builder by running the following commands:
+
[source,terminal,subs="attributes+"]
----
$ sudo composer-cli sources add {rpm-repo-version}.toml
----
+
[source,terminal]
----
$ sudo composer-cli sources add fast-datapath.toml
----
.Verification
* Confirm that the sources were added properly by running the following command:
+
[source,terminal]
----
$ sudo composer-cli sources list
----
+
.Example output
+
[source,terminal,subs="attributes+"]
----
appstream
baseos
fast-datapath
{rpm-repo-version}
----