Chapter 1. Installing from an RPM package
You can install MicroShift from an RPM package on a machine with a supported version of Red Hat Enterprise Linux (RHEL).
1.1. Before installing MicroShift from an RPM package Copy linkLink copied to clipboard!
Preparation of the host machine is recommended before installing MicroShift for memory configuration and FIPS mode.
1.1.1. Configuring volume groups Copy linkLink copied to clipboard!
MicroShift uses the logical volume manager storage (LVMS) Container Storage Interface (CSI) plugin for providing storage to persistent volumes (PVs). LVMS relies on the Linux logical volume manager (LVM) to dynamically manage the backing logical volumes (LVs) for PVs. For this reason, your machine must have an LVM volume group (VG) with unused space in which LVMS can create the LVs for your workload’s PVs.
To configure a volume group (VG) that allows LVMS to create the LVs for your workload’s PVs, lower the Desired Size of your root volume during the installation of RHEL. Lowering the size of your root volume allows unallocated space on the disk for additional LVs created by LVMS at runtime.
1.1.2. Prepare for FIPS mode Copy linkLink copied to clipboard!
If your use case requires running MicroShift containers in FIPS mode, you must install RHEL with FIPS enabled. After the worker machine is configured to run in FIPS mode, your MicroShift containers are automatically configured to also run in FIPS mode.
Because FIPS must be enabled before the operating system that your node uses starts for the first time, you cannot enable FIPS after you deploy a node.
1.2. Preparing to install MicroShift from an RPM package Copy linkLink copied to clipboard!
Configure your RHEL machine to have a logical volume manager (LVM) volume group (VG) with sufficient capacity for the persistent volumes (PVs) of your workload.
Prerequisites
- The system requirements for installing MicroShift have been met.
- You have root user access to your machine.
- You have configured your LVM VG with the capacity needed for the PVs of your workload.
Procedure
-
In the graphical installer under Installation Destination in the Storage Configuration subsection, select Custom
Done to open the dialog for configuring partitions and volumes. The Manual Partitioning window is displayed. - Under New Red Hat Enterprise Linux 9.x Installation, select Click here to create them automatically.
- Select the root partition, /, reduce Desired Capacity so that the VG has sufficient capacity for your PVs, and then click Update Settings.
Complete your installation.
NoteFor more options on partition configuration, read the guide linked in the Additional information section for Configuring Manual Partitioning.
As a root user, verify the VG capacity available on your system by running the following command:
sudo vgs
$ sudo vgsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
VG #PV #LV #SN Attr VSize VFree rhel 1 2 0 wz--n- <127.00g 54.94g
VG #PV #LV #SN Attr VSize VFree rhel 1 2 0 wz--n- <127.00g 54.94gCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3. Installing MicroShift from an RPM package Copy linkLink copied to clipboard!
Use the following procedure to install MicroShift from an RPM package.
Prerequisites
- The system requirements for installing MicroShift have been met.
- You completed the steps of preparing to install MicroShift from an RPM package.
Procedure
For all lifecycles, enable the repository for your release by running the following command:
sudo subscription-manager repos \ --enable rhocp-4.17-for-rhel-9-$(uname -m)-rpms \ --enable fast-datapath-for-rhel-9-$(uname -m)-rpms$ sudo subscription-manager repos \ --enable rhocp-4.17-for-rhel-9-$(uname -m)-rpms \ --enable fast-datapath-for-rhel-9-$(uname -m)-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow For extended support (EUS) releases, also enable the EUS repositories by running the following command:
sudo subscription-manager repos \ --enable rhel-9-for-$(uname -m)-appstream-eus-rpms \ --enable rhel-9-for-$(uname -m)-baseos-eus-rpms$ sudo subscription-manager repos \ --enable rhel-9-for-$(uname -m)-appstream-eus-rpms \ --enable rhel-9-for-$(uname -m)-baseos-eus-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Avoid unintended future updates into an unsupported configuration by locking your operating system version with the following command:
sudo subscription-manager release --set=9.4
$ sudo subscription-manager release --set=9.4Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install MicroShift by running the following command:
sudo dnf install -y microshift
$ sudo dnf install -y microshiftCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Download your installation pull secret from the Red Hat Hybrid Cloud Console to a temporary folder, for example,
$HOME/openshift-pull-secret. This pull secret allows you to authenticate with the container registries that serve the container images used by Red Hat build of MicroShift. To copy the pull secret to the
/etc/criofolder of your RHEL machine, run the following command:sudo cp $HOME/openshift-pull-secret /etc/crio/openshift-pull-secret
$ sudo cp $HOME/openshift-pull-secret /etc/crio/openshift-pull-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the root user the owner of the
/etc/crio/openshift-pull-secretfile by running the following command:sudo chown root:root /etc/crio/openshift-pull-secret
$ sudo chown root:root /etc/crio/openshift-pull-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the
/etc/crio/openshift-pull-secretfile readable and writeable by the root user only by running the following command:sudo chmod 600 /etc/crio/openshift-pull-secret
$ sudo chmod 600 /etc/crio/openshift-pull-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow If your RHEL machine has a firewall enabled, you must configure a few mandatory firewall rules. For
firewalld, run the following commands:sudo firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16
$ sudo firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo firewall-cmd --permanent --zone=trusted --add-source=169.254.169.1
$ sudo firewall-cmd --permanent --zone=trusted --add-source=169.254.169.1Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo firewall-cmd --reload
$ sudo firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
If the Volume Group (VG) that you have prepared for MicroShift used the default name
rhel, no further configuration is necessary. If you have used a different name, or if you want to change more configuration settings, see the "Using the MicroShift configuration file" section.