Preparing To Install 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
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 Bare Metal Cluster Configuration
As before, I’m being intentionally prescriptive here to help ensure success the first time you try this.
-
copy the cluster config file from ${HOME}/okd-lab/kamarotos/examples/domain-configs/bare-metal-basic.yaml:
cd ${HOME}/okd-lab/kamarotos git pull cp ${HOME}/okd-lab/kamarotos/examples/domain-configs/bare-metal-basic.yaml ${HOME}/okd-lab/lab-config/domain-configs/dev.yaml
-
Read the
MAC
address off of the bottom of each 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 each 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
-
-
Set the OpenShift version for the lab to the latest available:
labcli --latest -d=dev
-
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 -
Your OpenShift cluster configuration YAML file should look similar to this:
cluster: name: okd4 cluster-cidr: 10.100.0.0/14 service-cidr: 172.30.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 ingress-ip-addr: 10.11.13.2 bootstrap: metal: true mac-addr: "52:54:00:a1:b2:c3" boot-dev: sda ip-addr: 10.11.13.49 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 ip-addr: 10.11.13.60 - mac-addr: "1c:69:ab:cd:12:34" boot-dev: /dev/sda ip-addr: 10.11.13.61 - mac-addr: "1c:69:fe:dc:ba:21" boot-dev: /dev/sda ip-addr: 10.11.13.62