CentOS/RHEL Prerequisites

This document describes CentOS / RHEL-specific prerequisites for a BareOS PMK cluster.

Install the Operating System and Update Packages

Install the latest version of RHEL or CentOS 7.9 and run the following command to update all installed packages.

Bash
Copy

Manual Prerequisite

The steps below are completed automatically by the PMK CLI. If you would like to complete the prerequisites manually, follow the steps below.

Disable firewalld

Users need to disable firewalld, as there is a known incompatibility between firewalld and docker’s use of iptables. You can find more information on this issue on GitHub. Run the following command to disable firewalld.

Bash
Copy

Disable any other incompatible networking services

Ensure that there is no other external / incompatible networking software running on the node, as it can interfere with docker and Kubernetes networking services.

Prepare Docker Storage

On CentOS/RHEL 7, docker uses the devicemapper storage driver, by default, to manage container images and disk layers. For production, the storage driver must be configured to use direct-lvm mode (The loop-lvm mode is acceptable for testing but is not supported for production deployments). The direct-lvm mode requires one free block device (a disk or a partition).

Follow the steps given below to prepare docker storage on your node.

If docker is currently installed and running on this node, this procedure will result in resetting of container storage for docker. As a result it will end up deleting all existing docker images and containers on the node

Choose an Existing Block Device or Create a New Block Device

See the Basic Prerequisites for recommendations on the size of the disk or partition.

If a free block device is available on the node, note the path of the block device, e.g., /dev/sdb for a disk, /dev/sdc1 for a partition. You will need to specify it later during creation of the LVM thin pool.

If a free block device is not available, create a new block device, then note the block device path. You can create a block device either by attaching a new disk to the node, or creating a new partition on an existing disk. To create a new partition on a disk, use fdisk (man 8 fdisk) and set the partition type to 8e (Linux LVM). See the Linux Partition HOWTO page for more detailed information on creating disk partitions on RHEL/CentOS systems.

Create LVM thin pool on the Block Device

Once a free block device is available, follow the steps provided below to create an LVM thin pool on the block device.

Step 1.

Ensure that LVM is installed on the host:

Bash
Copy

Step 2.

The lvm2 package should be listed as installed. If it is not installed, run the following command to install the lvm2 package.

Bash
Copy

Step 3.

Download the bash script to create an LVM thin pool from GitHub:

Bash
Copy

Step 4.

Change the file permissions to make the script executable:

Bash
Copy

Step 5.

Run the script with the path of the free block device chosen or created above and the name of the volume group:

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated