Installing Single Node OpenShift on Bare Metal
Note: This is part of a series. Make sure you started here: Building a Portable Kubernetes Home Lab with OpenShift - OKD4
We’re going to install an OpenShift OKD SNO cluster on a bare metal server. The bootstrap node will run on your workstation. This particular tutorial is biased towards a MacBook workstation. However, you can easily modify this to run the bootstrap node on Fedora or other Linux flavor.
Prepare Your Workstation For Bootstrap
Before you proceed, you need to setup your workstation for running the Bootstrap node. Or, if you have a NUC available, then you can set it up as a KVM host and run the bootstrap there. These instructions assume that you are using your workstation.
Set Up a MacBook for Qemu with Bridged Network
Set Up SNO Configuration
-
You need to know two things at this point:
-
The MAC address of your NUC
-
The type of SSD installed, SATA or NVMe
-
-
copy the cluster config file from ${HOME}/okd-lab/kamarotos/examples/domain-configs/sno-bm.yaml:
cd ${HOME}/okd-lab/kamarotos git pull cp ${HOME}/okd-lab/kamarotos/examples/domain-configs/sno-bm.yaml ${HOME}/okd-lab/lab-config/domain-configs/dev.yaml
-
Read the
MAC
address off of the bottom of the NUC and add it to the cluster config file:Edit
${HOME}/okd-lab/lab-config/domain-configs/dev.yaml
and replaceYOUR_HOST_MAC_HERE
with the MAC address of your NUC.Note: Use lower case letters in the MAC.
-
You need to know whether you have NVME or SATA SSDs in the NUC.
-
If you have an NVME drive installed in the NUC, you do not need to modify anything.
-
If you have SATA M.2 drive instead of NVME then edit:
${OKD_LAB_PATH}/lab-config/domain-configs/dev.yaml
, and replacenvme0n1
withsda
. -
If you have more than one drive installed, then edit:
${OKD_LAB_PATH}/lab-config/domain-configs/dev.yaml
, and replacedisk2: NA
withdisk2: nvme0n2
ordisk2: sdb
as appropriate
-
-
Replace the value of
BOOTSTRAP_BRIDGE
:Edit
${HOME}/okd-lab/lab-config/domain-configs/dev.yaml
and replaceBOOTSTRAP_BRIDGE
with the${BOOTSTRAP_BRIDGE}
that you set in the step: Prepare Your Workstation For Bootstrap -
Set the OpenShift version for the lab to the latest available:
labcli --latest -d=dev
-
Your OpenShift cluster configuration YAML file should look similar, (but not necessarily exactly), to this:
cluster: name: okd4-snc cluster-cidr: 10.88.0.0/14 service-cidr: 172.20.0.0/16 local-registry: nexus.my.awesome.lab:5001 proxy-registry: nexus.my.awesome.lab:5000 remote-registry: quay.io/openshift/okd butane-spec-version: 1.4.0 release: 4.10.0-0.okd-2022-05-07-021833 bootstrap: metal: true mac-addr: "52:54:00:a1:b2:c3" ip-addr: 10.11.13.49 boot-dev: /dev/sda bridge-dev: en6 node-spec: memory: 12288 cpu: 2 root_vol: 50 control-plane: metal: true okd-hosts: - mac-addr: "1c:69:11:22:33:44" boot-dev: /dev/sda sno-install-dev: /dev/sda name: okd4-snc-node ip-addr: 10.11.13.200