How to Install additional package on cluster nodes

Latest response

How do I install additional rpm packages on to the OCP worker nodes. I tried rpm-ostree install and it failed with "error: No enabled repositories"

The output of 'rpm-ostree status' cmd is as follows

sh-4.4# rpm-ostree status
State: idle
Deployments:
* pivot://quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d94c4dfe32d6b9321b61e221c35559e22cf6e96f75bef0345fe978530fff3e02
CustomOrigin: Managed by machine-config-operator
Version: 47.83.202104250838-0 (2021-04-25T08:41:57Z)

ostree://3fdd1488024f054e39b1be508781d535d1ac7ed423bb3b4b656c2f345934220d
Version: 47.83.202103251640-0 (2021-03-25T16:44:03Z)

Do I need to configure the repo, if so how? or
Do I need to use the MachineConfig and the operator to get this done?
This is post OCP install though.

Responses

According to RedHat https://access.redhat.com/solutions/4500211, it is not possible to add packages just like one did with YUM or APT tools. Instead the use of DaemonSets, Operators or MachineConfigs on the Openshift 4.x is recommended.

Is there a relevant example to achieve it via MachineConfigs for ROSA?

You can add repo configurations to /etc/yum.repos.d. There is no subscription-manager in RHCOS, so there is no convenient way to access RHEL's yum repositories. You may have success installing from EPEL, etc.