Enable extended support repositories for image building

If you have an extended support (EUS) release of MicroShift or Red Hat Enterprise Linux (RHEL), you must enable the RHEL EUS repositories for image builder to use. If you do not have an EUS version, you can skip these steps.

Prerequisites
  • You have either an EUS version of MicroShift or RHEL, or you are updating to one.

  • You have root-user access to your build host.

  • You have reviewed the following link:

    • Red Hat Device Edge release compatibility matrix

      Warning

      Keeping component versions in a supported configuration of Red Hat Device Edge can require updating MicroShift and RHEL at the same time. Ensure that your version of RHEL is compatible with the version of MicroShift you are updating to, especially if you are updating MicroShift across two minor versions. Otherwise, you can create an unsupported configuration, break your node, or both. For more information, see the following link:

Procedure
  1. Create the /etc/osbuild-composer/repositories directory by running the following command:

    $ sudo mkdir -p /etc/osbuild-composer/repositories
  2. Copy the /usr/share/osbuild-composer/repositories/rhel-9.6.json file into the /etc/osbuild-composer/repositories directory by running the following command:

    $ sudo cp /usr/share/osbuild-composer/repositories/rhel-9.6.json /etc/osbuild-composer/repositories/rhel-9.6.json
  3. Update the baseos source by modifying the /etc/osbuild-composer/repositories/rhel-9.6.json file with the following values:

    # ...
    "baseurl": "https://cdn.redhat.com/content/eus/rhel9/9.6//baseos/os",
    # ...

    You can replace 9 with the major RHEL version you are using if different from the value in this example, and replace 9.6 with the <major.minor> version. Be certain that the RHEL version you choose is compatible with the MicroShift version you are using.

  4. Optional: Apply the baseos update by running the following command:

    $ sudo sed -i "s,dist/rhel9/9.6/$(uname -m)/baseos/,eus/rhel9/9.6/$(uname -m)/baseos/,g" \
    /etc/osbuild-composer/repositories/rhel-9.6.json

    You can replace 9 with the major RHEL version you are using if different from the value in this example, and replace 9.6 with the <major.minor> version. Be certain that the RHEL version you choose is compatible with the MicroShift version you are using.

  5. Update the appstream source by modifying the /etc/osbuild-composer/repositories/rhel-<major.minor>.json file with the following values:

    # ...
    "baseurl": "https://cdn.redhat.com/content/eus/rhel9/9.6//appstream/os",
    # ...

    You can replace 9 with the major RHEL version you are using if different from the value in this example, and replace 9.6 with the <major.minor> version. Be certain that the RHEL version you choose is compatible with the MicroShift version you are using.

  6. Optional. Apply the appstream update by running the following command:

    $ sudo sed -i "s,dist/rhel9/9.6/$(uname -m)/appstream/,eus/rhel9/9.6/$(uname -m)/appstream/,g" \
    /etc/osbuild-composer/repositories/rhel-9.6.json

    You can replace 9 with the major RHEL version you are using if different from the value in this example, and replace 9.6 with the <major.minor> version. Be certain that the RHEL version you choose is compatible with the MicroShift version you are using.

Verification
  1. Verify the baseos source by running the following command:

    $ sudo composer-cli sources info baseos | grep 'url ='
    Example output
    url = "https://cdn.redhat.com/content/eus/rhel9/9.6/x86_64/baseos/os"
  2. Verify the appstream source by running the following command:

    $ sudo composer-cli sources info appstream | grep 'url ='
    Example output
    url = "https://cdn.redhat.com/content/eus/rhel9/9.6/x86_64/appstream/os"